Permalink
Browse files

fix widget links, change line heights and fonts and measure, update v…

…im-for-javascript, fix docs/html build
  • Loading branch information...
1 parent 9adc073 commit 3686c4d83d51538d96d28c991a1766e6ea4f76d9 @davidosomething committed Nov 20, 2016
@@ -23,7 +23,7 @@
/// @group colors
$colors: (
- primary-bg: #fafaf4,
+ primary-bg: #fcfcf9,
primary-text: #3f3a30,
primary-link: #27a,
primary-link--hover: #38b,
@@ -149,7 +149,7 @@ $fw__bold: 700;
/// Font weight for headings
/// @group typography
/// @type FontWeight
-$fw__heading: 900;
+$fw__heading: 400;
/// Font - Sizes
/// @group typography
@@ -166,7 +166,7 @@ $fontsizes: (
nav: 1em,
postlist: 0.66em,
article__meta: 0.66em,
- article__body: 0.94em,
+ article__body: 1.2em,
block: 0.88em,
footer: 0.8em,
),
@@ -178,7 +178,6 @@ $fontsizes: (
h5: 1.2em,
bio__author: 2rem,
bio__links: 2rem,
- article__body: 1em,
),
medium: (
h1: 2.4em,
@@ -524,6 +523,11 @@ tr:nth-child(even) {
}
}
+.siteHeader__changelog,
+.siteHeader__comments {
+ margin-left: 1em;
+}
+
// =============================================================================
// Global Header
@@ -644,6 +648,7 @@ body:not(.slug--home) .globalHeader {
.widget {
@include fs('nav');
+ line-height: 1.5;
margin: 0 0 3rem;
@include mq('small') {
@@ -894,6 +899,7 @@ body:not(.slug--home) .globalHeader {
.article {
margin: 0 auto 4em;
+ max-width: $readable-body-width;
@include mq('large') {
margin-left: 0;
@@ -973,6 +979,7 @@ body:not(.slug--home) .globalHeader {
time {
border: 1px transparent solid;
display: inline-block;
+ margin-right: 0.2em;
white-space: nowrap;
}
@@ -995,9 +1002,8 @@ body:not(.slug--home) .globalHeader {
.article__body {
@include fs('article__body');
- line-height: 1.5;
+ line-height: 1.6;
margin-left: 0.5em;
- max-width: $readable-body-width;
h2 {
@include fs('h3');
@@ -1065,7 +1071,8 @@ body:not(.slug--home) .globalHeader {
}
li {
- line-height: 1.2;
+ line-height: 1.4;
+ margin-bottom: 0.5em;
}
}
@@ -1125,6 +1132,7 @@ body:not(.slug--home) .globalHeader {
> .article__subheader {
@include fs('h3');
font-weight: $fw__body;
+ line-height: 1.24;
}
}
}
@@ -1144,6 +1152,7 @@ body:not(.slug--home) .globalHeader {
> .article__subheader {
@include fs('h4');
font-weight: $fw__body;
+ line-height: 1.24;
}
}
}
View
@@ -129,10 +129,7 @@ gulp.task('ci:lint', [
gulp.task('clean:docs', require('./lib/gulp/clean.js').docs);
-gulp.task('docs', [
- 'docs:css',
- 'docs:js',
-]);
+gulp.task('docs', [ 'docs:css', 'docs:js' ]);
// -----------------------------------------------------------------------------
// Task: Default
@@ -145,7 +142,7 @@ gulp.task('default', [
'js',
'css',
'assets',
- 'docs',
+ //'docs', // html triggers docs
'html',
]);
@@ -1,3 +1,3 @@
<article class="articleTile articleTile--titleOnly">
- <h2><a href="/{{ path }}/">{{{ title }}}</a></h2>
+ <h2><a href="/{{ path }}">{{{ title }}}</a></h2>
</article>
@@ -1,4 +1,4 @@
<article class="articleTile">
- <h2><a href="/{{ path }}/">{{{ title }}}</a></h2>
+ <h2><a href="/{{ path }}">{{{ title }}}</a></h2>
<time datetime="{{ moment datePublished toISOString=null }}">{{ moment datePublished format="MMMM D, YYYY" }}</time>
</article>
@@ -1,4 +1,4 @@
-<div class="article_comments">
+<div id="comments" class="article_comments">
<div id="disqus_thread"></div>
<script>
var disqus_config = function () {
@@ -2,7 +2,13 @@
<body id="top" class="type--{{ type }} section--{{ section }} {{#if slug}}slug--{{slug}}{{/if}}">
<header class="siteHeader">
<div class="siteHeader__title">
- <a href="/" class="siteHeader__siteName">{{ site.title }}</a>{{#if title}}<span class="siteHeader__separator"> | </span><a href="#main" class="siteHeader__pageTitle">{{{ title }}}</a>{{/if}}
+ <a href="/" class="siteHeader__siteName">{{ site.title }}</a>
+ {{#if title}}
+ <span class="siteHeader__separator"> | </span>
+ <a href="#main" class="siteHeader__pageTitle">{{{ title }}}</a>
+ {{#if changelog}}<a href="#changelog" class="siteHeader__changelog">#changelog (upd <time>{{ moment changelog.[0].date format="YYYY-MM-DD" }}</time>)</a>{{/if}}
+ {{#if tags}}<a href="#comments" class="siteHeader__comments">#comments</a>{{/if}}
+ {{/if}}
</div>
</header>
<div class="globalBody">
@@ -38,7 +38,7 @@ module.exports = (options) => {
var data = files[file];
data.permalink = `${options.base}`;
if (data.path) {
- data.permalink += `${data.path}/`;
+ data.permalink += `${data.path}`;
}
log(`${file}`);
@@ -1,7 +1,7 @@
---
slug: "vim-for-javascript"
title: "Setting up Vim for JavaScript development"
-subheader: "Setting up Vim and comparisons of JavaScript-specific Vim plugins"
+subheader: "Configuring Vim and comparisons of JavaScript-specific Vim plugins"
datePublished: 2016-01-09
image: "/assets/img/posts/Vimlogo.svg.png"
tags:
@@ -12,6 +12,12 @@ tags:
- tern
changelog:
-
+ date: 2016-11-20
+ diff: "https://github.com/davidosomething/16.davidosomething.com/commit/"
+ body: |
+ - Updated general completion details and caveat that I've moved on to
+ Neovim.
+ -
date: 2016-11-17
diff: "https://github.com/davidosomething/16.davidosomething.com/commit/5f0086be063229030c1d75832bdd2c26f14118dd"
body: |
@@ -302,7 +308,14 @@ I personally do use this plugin.
- [othree/javascript-libraries-syntax.vim]
-## JavaScript code completion for Vim
+## Code completion for Vim
+
+This is what you might know as "autocomplete" or "Intellisense."
+
+Vim has a built-in completion feature that you can trigger by just using
+`<C-X>` (that's the `control-x` key) and then another control-key sequence like
+`<C-F>` to complete filenames or `<C-O>` to trigger omni-completion. You should
+try it before trying to install a bunch of plugins to modify this behavior.
### Omni completion
@@ -312,12 +325,16 @@ Vim includes basic code completion built in. See [this wikia article] for
information on how to use that. The gist is that the completion system will
run a function, the `omnifunc`, to populate autocompletion pop-up with results.
-To use the default completion function, add this to your vimrc:
+To use the default completion function, you may need to add this to your
+`.vimrc` file:
```vim
autocmd FileType javascript setlocal omnifunc=javascriptcomplete#CompleteJS
```
+You might not need to add it if the `<C-X><C-O>` trigger already works for you,
+it depends on what version of Vim and the Vim runtime you have.
+
For even better completion, consider using a plugin like
[Shougo/neocomplete.vim] or [Valloric/YouCompleteMe]. On Neovim, an option is
[Shougo/deoplete.nvim].
@@ -340,6 +357,10 @@ by providing a list of function names like so:
\ ]
```
+I won't guarantee that the above works, since the plugins get updated regularly
+and neocomplete does not like `omnifunc`s that move the cursor around when the
+function is executed.
+
### Extended omni-completion
The plugin [1995eaton/vim-better-javascript-completion] provides a somewhat
@@ -371,7 +392,7 @@ Installing via [vim-plug], which can run additional commands before plugin
installation, is done like this:
```vim
-Plug 'marijnh/tern_for_vim', { 'do': 'npm install' }
+Plug 'ternjs/tern_for_vim', { 'do': 'npm install' }
```
This will install its npm dependencies for you (Tern runs a node-based analyzer
@@ -380,7 +401,7 @@ in the background while you're editing).
I use this plugin with many of its extra features turned off, just keeping the
completion.
-- [marijnh/tern_for_vim]
+- [ternjs/tern_for_vim]
### Function parameter completion
@@ -491,10 +512,12 @@ different languages. Of note is [jscs](http://jscs.info/) and
## My Vim setup
-You can dig through [my Vim configuration on GitHub]. The plugins I use are
-all in the main vimrc file, and their configurations are interspersed into
-`plugin/`, `ftplugin/`, and `after/*/` to cope with the order in which Vim
-loads files.
+You can dig through [my Vim configuration on GitHub]. Please note that this
+article was written a while ago, and since then I've completely switched over
+to Neovim so a lot of the configuration may not apply to you. The plugins
+I use are all in the main vimrc file, and their configurations are
+interspersed into `plugin/`, `ftplugin/`, and `after/*/` to cope with the
+order in which Vim loads files.
- [my Vim configuration on GitHub]
@@ -526,7 +549,7 @@ loads files.
[Valloric/YouCompleteMe]: https://github.com/Valloric/YouCompleteMe
[1995eaton/vim-better-javascript-completion]: https://github.com/1995eaton/vim-better-javascript-completion
[Shougo/deoplete.nvim]: https://github.com/Shougo/deoplete.nvim
-[marijnh/tern_for_vim]: https://github.com/marijnh/tern_for_vim
+[ternjs/tern_for_vim]: https://github.com/ternjs/tern_for_vim
[othree/jspc.vim]: https://github.com/othree/jspc.vim
[moll/vim-node]: https://github.com/moll/vim-node
[ludovicchabant/vim-gutentags]: https://github.com/ludovicchabant/vim-gutentags

0 comments on commit 3686c4d

Please sign in to comment.