diff options
| author | Anton Bobov <abobov@gmail.com> | 2017-08-06 20:35:17 +0500 |
|---|---|---|
| committer | Anton Bobov <abobov@gmail.com> | 2017-08-06 20:35:17 +0500 |
| commit | fc1bf76fde67eb913adff2f50eeef0d4a468df4a (patch) | |
| tree | 50936084b34ec783f0fe16d11f60d93e154ab5bc /files/.vimrc | |
| parent | f48a20fe77b94474260eb5d46dc6883ce0705803 (diff) | |
Updates.
- [git] new aliases and ignore Infinitest files
- [offlineimap] remove backend option, it's set by default
- [vim] enable spellchecking by default
- [vim] format JSON with jq
- [zsh] run ip via grc coloring
- [zsh] ledger command easy query by camelcase
Diffstat (limited to 'files/.vimrc')
| -rw-r--r-- | files/.vimrc | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/files/.vimrc b/files/.vimrc index f7a764d..da66aef 100644 --- a/files/.vimrc +++ b/files/.vimrc @@ -96,6 +96,7 @@ if has("multi_byte") endif set keymap=russian-jcukenwin set spelllang=ru,en +set spell set iminsert=0 set imsearch=0 @@ -407,6 +408,9 @@ nnoremap <Leader>ev :vsplit $MYVIMRC<CR> " Commands {{{ command DiffOrig vert new | set bt=nofile | r ++edit # | 0d_ \ | diffthis | wincmd p | diffthis +if executable('jq') + command -range Jq <line1>,<line2>!jq --indent 4 . +endif " }}} " Filetype {{{ " XML {{{ @@ -432,9 +436,9 @@ augroup END augroup ft_json au! - if executable('jq') - au FileType json noremap <Leader>jq :%!jq --indent 4 .<CR> - au FileType json vnoremap <Leader>jq :'<,'>!jq --indent 4 .<CR> + if exists(':Jq') + au FileType json noremap <Leader>jq :%Jq<CR> + au FileType json vnoremap <Leader>jq :%Jq<CR> endif augroup END |
