diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2018-08-26 17:40:26 +1200 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2018-08-26 17:40:26 +1200 |
commit | e82ab7f7b65c86d908ded5401ee6c1e6f844657a (patch) | |
tree | 89ea786f8c730d67a7526b0d2ec85507879e2dec /vim | |
parent | Merge branch 'release/v1.60.0' (diff) | |
parent | Bump VERSION (diff) | |
download | dotfiles-1.61.0.tar.gz (sig) dotfiles-1.61.0.zip |
Merge branch 'release/v1.61.0'v1.61.0
* release/v1.61.0:
Bump VERSION
Update/correct section on local leader maps
Add another blank line
Correct some leader map definition comments
Add vertical spacing to leader maps section
Add visual-mode analogues to some leader maps
Upgrade sahara.vim colorscheme
Remove doubleup in Awk ftplugin
Diffstat (limited to 'vim')
-rw-r--r-- | vim/after/ftplugin/awk.vim | 9 | ||||
m--------- | vim/bundle/sahara | 0 | ||||
-rw-r--r-- | vim/vimrc | 52 |
3 files changed, 48 insertions, 13 deletions
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> |