diff options
-rw-r--r-- | README.md | 8 | ||||
-rw-r--r-- | VERSION | 4 | ||||
-rw-r--r-- | vim/after/ftplugin/awk.vim | 9 | ||||
m--------- | vim/bundle/sahara | 0 | ||||
-rw-r--r-- | vim/vimrc | 52 |
5 files changed, 54 insertions, 19 deletions
@@ -380,10 +380,10 @@ separately distributed and installed via submodules instead. #### Compilers I define a few of my own `:compiler` scripts for `~/.vim/compiler`, for use for -checking and linting of appropriate filetypes. Because checking (does it work?) -and linting (is it well-written?) are separate processes for me, I bind them -separately with local leader maps; for example, `_c` runs a `perl -c` syntax -check of Perl scripts, and `_l` runs a Perl::Critic check. +checking and linting of appropriate filetypes. Because checking (does it +compile?) and linting (is it correct and well-written?) are separate processes +for me, I bind them separately with local leader maps; for example, for `perl` +filetypes, `,c` switches `makprg` to `perl -c`, and `,l` to `perlcritic`. #### Neovim @@ -1,2 +1,2 @@ -tejr dotfiles v1.60.0 -Thu Aug 23 00:21:01 UTC 2018 +tejr dotfiles v1.61.0 +Sun Aug 26 05:40:26 UTC 2018 diff --git a/vim/after/ftplugin/awk.vim b/vim/after/ftplugin/awk.vim deleted file mode 100644 index 6a8ac1ac..00000000 --- a/vim/after/ftplugin/awk.vim +++ /dev/null @@ -1,9 +0,0 @@ -" Extra configuration for AWK scripts -if &filetype !=# 'awk' || v:version < 700 - finish -endif - -" Set comment formats -setlocal comments=:# -setlocal formatoptions+=or -let b:undo_ftplugin .= '|setlocal comments< formatoptions' diff --git a/vim/bundle/sahara b/vim/bundle/sahara -Subproject 1c98c61b4674b911dc5ae00cd99ceefc13176a5 +Subproject 485c5477f5cb83c07b0ccc1c198d0a7810c70aa @@ -251,80 +251,123 @@ nmap ]<Space> <Plug>(PutBlankLinesBelow) " \a toggles 'formatoptions' 'a' flag using a plugin nnoremap <Bslash>a :<C-U>ToggleFlagLocal formatoptions a<CR> + " \b toggles copy-pasteable linebreak settings nmap <Bslash>b <Plug>(CopyLinebreakToggle) + " \c toggles 'cursorline' nnoremap <Bslash>c :<C-U>setlocal cursorline! cursorline?<CR> " \C toggles 'cursorcolumn' nnoremap <Bslash>C :<C-U>setlocal cursorcolumn! cursorcolumn?<CR> +if exists(':xnoremap') + xnoremap <Bslash>C :<C-U>setlocal cursorcolumn! cursorcolumn?<CR>gv +endif + " \d inserts the local date (POSIX date) nnoremap <Bslash>d :read !date<CR> " \D inserts the UTC date (POSIX date) nnoremap <Bslash>D :read !date -u<CR> + " \e forces a buffer to be editable nnoremap <Bslash>e :<C-U>setlocal modifiable noreadonly<CR> + " \f shows the current 'formatoptions' at a glance nnoremap <Bslash>f :<C-U>setlocal formatoptions?<CR> -" \F reloads filetype + +" \F reloads filetype plugins nnoremap <Bslash>F :<C-U>doautocmd filetypedetect BufRead<CR> + " \g changes directory to the current file's location nnoremap <Bslash>g :<C-U>cd %:h<CR>:pwd<CR> + " \h toggles highlighting search results nnoremap <Bslash>h :<C-U>set hlsearch! hlsearch?<CR> + " \H shows command history nnoremap <Bslash>H :<C-U>history :<CR> + " \i toggles showing matches as I enter my pattern nnoremap <Bslash>i :<C-U>set incsearch! incsearch?<CR> + " \j jumps to buffers (jetpack) nnoremap <Bslash>j :<C-U>buffers<CR>:buffer<Space> + " \k shows my marks nnoremap <Bslash>k :<C-U>marks<CR> + " \l toggles showing tab, end-of-line, and trailing whitespace nnoremap <Bslash>l :<C-U>setlocal list! list?<CR> +if exists(':xnoremap') + xnoremap <Bslash>l :<C-U>setlocal list! list?<CR>gv +endif + " \m shows normal maps nnoremap <Bslash>m :<C-U>map<CR> " \M shows buffer-local normal maps nnoremap <Bslash>M :<C-U>map <buffer><CR> -" \n toggles line numbers + +" \n toggles line number display nnoremap <Bslash>n :<C-U>setlocal number! number?<CR> -" \N toggles 'ruler' +if exists(':xnoremap') + xnoremap <Bslash>n :<C-U>setlocal number! number?<CR>gv +endif +" \N toggles position display in bottom right nnoremap <Bslash>N :<C-U>set ruler! ruler?<CR> +if exists(':xnoremap') + xnoremap <Bslash>N :<C-U>set ruler! ruler?<CR>gv +endif + " \o opens a line below in paste mode nmap <Bslash>o <Plug>(PasteOpenBelow) " \O opens a line above in paste mode nmap <Bslash>O <Plug>(PasteOpenAbove) + " \p toggles paste mode nnoremap <Bslash>p :<C-U>set paste! paste?<CR> + " \q formats the current paragraph nnoremap <Bslash>q gqap + " \r acts as a replacement operator nmap <Bslash>r <Plug>(ReplaceOperator) if exists(':xmap') xmap <Bslash>r <Plug>(ReplaceOperator) endif + " \R reloads ~/.vimrc nnoremap <Bslash>R :<C-U>source $MYVIMRC<CR> + " \s toggles spell checking nnoremap <Bslash>s :<C-U>setlocal spell! spell?<CR> + " \t shows current filetype nnoremap <Bslash>t :<C-U>setlocal filetype?<CR> -" \T clears filetype (follow with \R) +" \T clears filetype nnoremap <Bslash>T :<C-U>setlocal filetype=<CR> + " \u sets US English spelling (compare \z) nnoremap <Bslash>u :<C-U>setlocal spelllang=en_us<CR> + " \v shows all global variables nnoremap <Bslash>v :<C-U>let g: v:<CR> " \V shows all local variables nnoremap <Bslash>V :<C-U>let b: t: w:<CR> + " \w toggles wrapping nnoremap <Bslash>w :<C-U>setlocal wrap! wrap?<CR> +if exists(':xnoremap') + xnoremap <Bslash>w :<C-U>setlocal wrap! wrap?<CR>gv +endif + " \x strips trailing whitespace via a custom plugin nmap <Bslash>x :StripTrailingWhitespace<CR> if exists(':xmap') xmap <Bslash>x :StripTrailingWhitespace<CR> endif + " \y shows all registers nnoremap <Bslash>y :<C-U>registers<CR> + " \z sets NZ English spelling (compare \u) nnoremap <Bslash>z :<C-U>setlocal spelllang=en_nz<CR> @@ -332,6 +375,7 @@ nnoremap <Bslash>z :<C-U>setlocal spelllang=en_nz<CR> nnoremap <Bslash>= :<C-U>call vimrc#Anchor('1G=G')<CR> " \+ runs the whole buffer through gq, preserving position nnoremap <Bslash>+ :<C-U>call vimrc#Anchor('1GgqG')<CR> + " \. runs the configured make program into the location list nnoremap <Bslash>. :<C-U>lmake!<CR> |