diff options
-rw-r--r-- | .gitmodules | 121 | ||||
-rw-r--r-- | ISSUES.md | 3 | ||||
-rw-r--r-- | VERSION | 4 | ||||
-rw-r--r-- | git/gitconfig.mi5 | 33 | ||||
-rw-r--r-- | vim/after/ftplugin/mail.vim | 67 | ||||
-rw-r--r-- | vim/after/indent/gitconfig.vim | 6 | ||||
-rw-r--r-- | vim/autoload/paste_insert.vim | 14 | ||||
m--------- | vim/bundle/paste_open | 0 | ||||
-rw-r--r-- | vim/filetype.vim | 6 | ||||
-rw-r--r-- | vim/ftplugin/csv.vim | 6 | ||||
-rw-r--r-- | vim/ftplugin/password.vim | 9 | ||||
-rw-r--r-- | vim/ftplugin/tsv.vim | 13 | ||||
-rw-r--r-- | vim/indent/csv.vim | 8 | ||||
-rw-r--r-- | vim/indent/html.vim | 3 | ||||
-rw-r--r-- | vim/indent/password.vim | 11 | ||||
-rw-r--r-- | vim/indent/tsv.vim | 13 | ||||
-rw-r--r-- | vim/plugin/paste_insert.vim | 6 | ||||
-rw-r--r-- | vim/plugin/spellfile_local.vim | 2 | ||||
-rw-r--r-- | vim/vimrc | 106 |
19 files changed, 224 insertions, 207 deletions
diff --git a/.gitmodules b/.gitmodules index 86bad115..5f049838 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,95 +1,92 @@ # Vim plugins [submodule "vim/bundle/big_file_options"] - path = vim/bundle/big_file_options - url = https://sanctum.geek.nz/code/vim-big-file-options.git + path = vim/bundle/big_file_options + url = https://sanctum.geek.nz/code/vim-big-file-options.git [submodule "vim/bundle/colon_operator"] - path = vim/bundle/colon_operator - url = https://sanctum.geek.nz/code/vim-colon-operator.git + path = vim/bundle/colon_operator + url = https://sanctum.geek.nz/code/vim-colon-operator.git [submodule "vim/bundle/copy_linebreak"] - path = vim/bundle/copy_linebreak - url = https://sanctum.geek.nz/code/vim-copy-linebreak.git + path = vim/bundle/copy_linebreak + url = https://sanctum.geek.nz/code/vim-copy-linebreak.git [submodule "vim/bundle/cursorline_current"] - path = vim/bundle/cursorline_current - url = https://sanctum.geek.nz/code/vim-cursorline-current.git + path = vim/bundle/cursorline_current + url = https://sanctum.geek.nz/code/vim-cursorline-current.git [submodule "vim/bundle/digraph_search"] - path = vim/bundle/digraph_search - url = https://sanctum.geek.nz/code/vim-digraph-search.git + path = vim/bundle/digraph_search + url = https://sanctum.geek.nz/code/vim-digraph-search.git [submodule "vim/bundle/equalalways_resized"] - path = vim/bundle/equalalways_resized - url = https://sanctum.geek.nz/code/vim-equalalways-resized.git + path = vim/bundle/equalalways_resized + url = https://sanctum.geek.nz/code/vim-equalalways-resized.git [submodule "vim/bundle/foldlevelstart_stdin"] - path = vim/bundle/foldlevelstart_stdin - url = https://sanctum.geek.nz/code/vim-foldlevelstart-stdin.git + path = vim/bundle/foldlevelstart_stdin + url = https://sanctum.geek.nz/code/vim-foldlevelstart-stdin.git [submodule "vim/bundle/insert_cancel"] - path = vim/bundle/insert_cancel - url = https://sanctum.geek.nz/code/vim-insert-cancel.git + path = vim/bundle/insert_cancel + url = https://sanctum.geek.nz/code/vim-insert-cancel.git [submodule "vim/bundle/insert_suspend_hlsearch"] - path = vim/bundle/insert_suspend_hlsearch - url = https://sanctum.geek.nz/code/vim-insert-suspend-hlsearch.git + path = vim/bundle/insert_suspend_hlsearch + url = https://sanctum.geek.nz/code/vim-insert-suspend-hlsearch.git [submodule "vim/bundle/insert_timeout"] - path = vim/bundle/insert_timeout - url = https://sanctum.geek.nz/code/vim-insert-timeout.git -[submodule "vim/bundle/paste_open"] - path = vim/bundle/paste_open - url = https://sanctum.geek.nz/code/vim-paste-open.git + path = vim/bundle/insert_timeout + url = https://sanctum.geek.nz/code/vim-insert-timeout.git +[submodule "vim/bundle/keep_position"] + path = vim/bundle/keep_position + url = https://sanctum.geek.nz/code/vim-keep-position.git [submodule "vim/bundle/put_blank_lines"] - path = vim/bundle/put_blank_lines - url = https://sanctum.geek.nz/code/vim-put-blank-lines.git + path = vim/bundle/put_blank_lines + url = https://sanctum.geek.nz/code/vim-put-blank-lines.git [submodule "vim/bundle/quickfix_auto_open"] - path = vim/bundle/quickfix_auto_open - url = https://sanctum.geek.nz/code/vim-quickfix-auto-open.git + path = vim/bundle/quickfix_auto_open + url = https://sanctum.geek.nz/code/vim-quickfix-auto-open.git [submodule "vim/bundle/redact_pass"] - path = vim/bundle/redact_pass - url = https://sanctum.geek.nz/code/vim-redact-pass.git + path = vim/bundle/redact_pass + url = https://sanctum.geek.nz/code/vim-redact-pass.git [submodule "vim/bundle/regex_escape"] - path = vim/bundle/regex_escape - url = https://sanctum.geek.nz/code/vim-regex-escape.git + path = vim/bundle/regex_escape + url = https://sanctum.geek.nz/code/vim-regex-escape.git [submodule "vim/bundle/replace_operator"] - path = vim/bundle/replace_operator - url = https://sanctum.geek.nz/code/vim-replace-operator.git + path = vim/bundle/replace_operator + url = https://sanctum.geek.nz/code/vim-replace-operator.git [submodule "vim/bundle/shebang_change_filetype"] - path = vim/bundle/shebang_change_filetype - url = https://sanctum.geek.nz/code/vim-shebang-change-filetype.git + path = vim/bundle/shebang_change_filetype + url = https://sanctum.geek.nz/code/vim-shebang-change-filetype.git [submodule "vim/bundle/shebang_create_exec"] - path = vim/bundle/shebang_create_exec - url = https://sanctum.geek.nz/code/vim-shebang-create-exec.git + path = vim/bundle/shebang_create_exec + url = https://sanctum.geek.nz/code/vim-shebang-create-exec.git [submodule "vim/bundle/squeeze_repeat_blanks"] - path = vim/bundle/squeeze_repeat_blanks - url = https://sanctum.geek.nz/code/vim-squeeze-repeat-blanks.git + path = vim/bundle/squeeze_repeat_blanks + url = https://sanctum.geek.nz/code/vim-squeeze-repeat-blanks.git [submodule "vim/bundle/strip_trailing_whitespace"] - path = vim/bundle/strip_trailing_whitespace - url = https://sanctum.geek.nz/code/vim-strip-trailing-whitespace.git + path = vim/bundle/strip_trailing_whitespace + url = https://sanctum.geek.nz/code/vim-strip-trailing-whitespace.git [submodule "vim/bundle/toggle_flags"] - path = vim/bundle/toggle_flags - url = https://sanctum.geek.nz/code/vim-toggle-flags.git + path = vim/bundle/toggle_flags + url = https://sanctum.geek.nz/code/vim-toggle-flags.git [submodule "vim/bundle/vertical_region"] - path = vim/bundle/vertical_region - url = https://sanctum.geek.nz/code/vim-vertical-region.git + path = vim/bundle/vertical_region + url = https://sanctum.geek.nz/code/vim-vertical-region.git [submodule "vim/bundle/vimrc_reload_filetype"] - path = vim/bundle/vimrc_reload_filetype - url = https://sanctum.geek.nz/code/vim-vimrc-reload-filetype.git + path = vim/bundle/vimrc_reload_filetype + url = https://sanctum.geek.nz/code/vim-vimrc-reload-filetype.git [submodule "vim/bundle/write_mkpath"] - path = vim/bundle/write_mkpath - url = https://sanctum.geek.nz/code/vim-write-mkpath.git + path = vim/bundle/write_mkpath + url = https://sanctum.geek.nz/code/vim-write-mkpath.git # Vim filetype plugins [submodule "vim/bundle/diff_prune"] - path = vim/bundle/diff_prune - url = https://sanctum.geek.nz/code/vim-diff-prune.git + path = vim/bundle/diff_prune + url = https://sanctum.geek.nz/code/vim-diff-prune.git [submodule "vim/bundle/make_target"] - path = vim/bundle/make_target - url = https://sanctum.geek.nz/code/vim-make-target.git + path = vim/bundle/make_target + url = https://sanctum.geek.nz/code/vim-make-target.git [submodule "vim/bundle/perl_version_bump"] - path = vim/bundle/perl_version_bump - url = https://sanctum.geek.nz/code/vim-perl-version-bump.git + path = vim/bundle/perl_version_bump + url = https://sanctum.geek.nz/code/vim-perl-version-bump.git # Vim colorschemes [submodule "vim/bundle/juvenile"] - path = vim/bundle/juvenile - url = https://sanctum.geek.nz/code/vim-juvenile.git + path = vim/bundle/juvenile + url = https://sanctum.geek.nz/code/vim-juvenile.git [submodule "vim/bundle/sahara"] - path = vim/bundle/sahara - url = https://sanctum.geek.nz/code/vim-sahara.git -[submodule "vim/bundle/keep_position"] - path = vim/bundle/keep_position - url = https://sanctum.geek.nz/code/vim-keep-position.git + path = vim/bundle/sahara + url = https://sanctum.geek.nz/code/vim-sahara.git @@ -30,6 +30,3 @@ Known issues pushed upstream. * The `_text_filenames` completion handler for Bash won't work on files with newlines in their names. Can it be made to? -* Something in the mail ftplugin is butchering the headers, probably something - that strips whitespace or quotes. It would probably be better to make the - cleanup it does an explicit action with a buffer-local map. @@ -1,2 +1,2 @@ -tejr dotfiles v6.1.0 -Fri Jun 14 05:39:51 UTC 2019 +tejr dotfiles v6.2.0 +Fri Jun 14 11:00:24 UTC 2019 diff --git a/git/gitconfig.mi5 b/git/gitconfig.mi5 index 292ffe7a..11b815d1 100644 --- a/git/gitconfig.mi5 +++ b/git/gitconfig.mi5 @@ -1,34 +1,37 @@ [commit] - status = false + status = false + +[diff] + algorithm = patience [fetch] - output = compact + output = compact [init] - templateDir = ~/.git-template + templateDir = ~/.git-template [log] - date = local - decorate = short + date = local + decorate = short [merge] - ff = false - log = 1024 + ff = false + log = 1024 [pull] - ff = only + ff = only [push] - default = current + default = current [sendemail] - confirm = compose - smtpServer = <% SENDMAIL %> + confirm = compose + smtpServer = <% SENDMAIL %> [status] - short = true + short = true [user] - name = <% NAME %> - email = <% EMAIL %> - signingKey = <% KEY %> + name = <% NAME %> + email = <% EMAIL %> + signingKey = <% KEY %> diff --git a/vim/after/ftplugin/mail.vim b/vim/after/ftplugin/mail.vim index cfb738a1..f4a4c91d 100644 --- a/vim/after/ftplugin/mail.vim +++ b/vim/after/ftplugin/mail.vim @@ -1,10 +1,17 @@ " Don't append spaces after quote chars, for strict compliance with " format=flowed let b:quote_space = 0 +let b:undo_ftplugin .= '|unlet b:quote_space' " If something hasn't already moved the cursor, we'll move to an optimal point " to start writing -if line('.') == 1 && col('.') == 1 +function! s:SuggestStart() abort + + " Move to top of buffer + call setpos('.', [0, 1, 1, 0]) + + " Move to body text + call search('\m^$', 'c') | + " Start by trying to move to the first quoted line; this may fail if there's " no quote, which is fine @@ -35,29 +42,45 @@ if line('.') == 1 && col('.') == 1 " Now move to the first quoted or unquoted blank line call search('\m^>\= *$', 'c') - -endif +endfunction +command! -bar -buffer SuggestStart + \ call s:SuggestStart() +let b:undo_ftplugin .= '|delcommand SuggestStart' +SuggestStart " Normalise quoting -for lnum in range(1, line('$')) - - " Get current line - let line = getline(lnum) - - " Get the leading quote string, if any; stop if there isn't one - let quote = matchstr(line, '^[> ]\+') - if strlen(quote) == 0 - continue - endif - - " Normalise the quote with no spaces - let quote = substitute(quote, '[^>]', '', 'g') - - " Re-set the line - let line = substitute(line, '^[> ]\+', quote, '') - call setline(lnum, line) - -endfor +function! s:StrictQuote() abort + let body = 0 + for lnum in range(1, line('$')) + + " Get current line + let line = getline(lnum) + + " Skip lines until we hit a blank line, meaning body text + let body = body || !strlen(line) + if !body + continue + endif + + " Get the leading quote string, if any; skip if there isn't one + let quote = matchstr(line, '^>[> ]*') + if !strlen(quote) + continue + endif + + " Normalise the quote with no spaces + let quote = substitute(quote, '[^>]', '', 'g') + + " Re-set the line + let line = substitute(line, '^[> ]\+', quote, '') + call setline(lnum, line) + + endfor +endfunction +command -bar -buffer StrictQuote + \ call s:StrictQuote() +let b:undo_ftplugin .= '|delcommand StrictQuote' +StrictQuote " Add a space to the end of wrapped lines for format-flowed mail setlocal formatoptions+=w diff --git a/vim/after/indent/gitconfig.vim b/vim/after/indent/gitconfig.vim new file mode 100644 index 00000000..16a948ab --- /dev/null +++ b/vim/after/indent/gitconfig.vim @@ -0,0 +1,6 @@ +" Use tabs for indent in Git config files, rather than fighting with the +" frontend tool +setlocal noexpandtab +setlocal softtabstop=0 +let &shiftwidth = &tabstop +let b:undo_indent .= '|setlocal expandtab< softtabstop< shiftwidth<' diff --git a/vim/autoload/paste_insert.vim b/vim/autoload/paste_insert.vim new file mode 100644 index 00000000..fe7cb35f --- /dev/null +++ b/vim/autoload/paste_insert.vim @@ -0,0 +1,14 @@ +augroup paste_insert + autocmd! +augroup END + +function! paste_insert#() abort + autocmd! paste_insert + autocmd paste_insert CursorHold,CursorMoved,User <buffer> + \ set nopaste paste? + \|autocmd! paste_insert + autocmd paste_insert InsertEnter <buffer> + \ set paste paste? + \|autocmd paste_insert InsertLeave <buffer> + \ doautocmd paste_insert User +endfunction diff --git a/vim/bundle/paste_open b/vim/bundle/paste_open deleted file mode 160000 -Subproject 79ee83eac32dbadf722df687e65f07d75a2f8ea diff --git a/vim/filetype.vim b/vim/filetype.vim index 848637dd..6b52fab9 100644 --- a/vim/filetype.vim +++ b/vim/filetype.vim @@ -239,12 +239,6 @@ augroup filetypedetect \,/etc/shadow- \,/etc/shadow.edit \ setfiletype passwd - " pass(1) password files - autocmd BufNewFile,BufRead - \ /dev/shm/pass.?*/?*.txt - \,$TMPDIR/pass.?*/?*.txt - \,/tmp/pass.?*/?*.txt - \ setfiletype password " Perl 5 files autocmd BufNewFile,BufRead \ ?*.pl diff --git a/vim/ftplugin/csv.vim b/vim/ftplugin/csv.vim index 162da402..9bd3e86e 100644 --- a/vim/ftplugin/csv.vim +++ b/vim/ftplugin/csv.vim @@ -4,8 +4,6 @@ if exists('b:did_ftplugin') endif let b:did_ftplugin = 1 -" No autoformatting, literal tabs -setlocal noautoindent -setlocal noexpandtab +" No autoformatting setlocal formatoptions= -let b:undo_ftplugin = 'setlocal autoindent< expandtab< formatoptions<' +let b:undo_ftplugin = 'formatoptions<' diff --git a/vim/ftplugin/password.vim b/vim/ftplugin/password.vim deleted file mode 100644 index 28f5a5e9..00000000 --- a/vim/ftplugin/password.vim +++ /dev/null @@ -1,9 +0,0 @@ -" Only do this when not yet done for this buffer -if exists('b:did_ftplugin') - finish -endif -let b:did_ftplugin = 1 - -" No autoformatting -setlocal formatoptions= -let b:undo_ftplugin = 'setlocal formatoptions<' diff --git a/vim/ftplugin/tsv.vim b/vim/ftplugin/tsv.vim index 162da402..f78da35f 100644 --- a/vim/ftplugin/tsv.vim +++ b/vim/ftplugin/tsv.vim @@ -1,11 +1,2 @@ -" Only do this when not yet done for this buffer -if exists('b:did_ftplugin') - finish -endif -let b:did_ftplugin = 1 - -" No autoformatting, literal tabs -setlocal noautoindent -setlocal noexpandtab -setlocal formatoptions= -let b:undo_ftplugin = 'setlocal autoindent< expandtab< formatoptions<' +" TSVs have the same filetype options as CSVs +runtime! ftplugin/csv.vim diff --git a/vim/indent/csv.vim b/vim/indent/csv.vim index fd3c99de..78bddd33 100644 --- a/vim/indent/csv.vim +++ b/vim/indent/csv.vim @@ -4,8 +4,12 @@ if exists('b:did_indent') endif let b:did_indent = 1 -" Manual indenting and literal tabs for CSVs +" Manual indenting setlocal noautoindent +let b:undo_indent = 'setlocal autoindent<' + +" Literal tabs setlocal noexpandtab setlocal softtabstop=0 -let b:undo_indent = 'setlocal autoindent< expandtab< softtabstop<' +let &shiftwidth = &tabstop +let b:undo_indent = 'setlocal expandtab< softtabstop< shiftwidth<' diff --git a/vim/indent/html.vim b/vim/indent/html.vim index d93443a7..b31564f6 100644 --- a/vim/indent/html.vim +++ b/vim/indent/html.vim @@ -1,2 +1,5 @@ +" No load guard--we want this to run just before the stock runtime script to +" change its behaviour. We don't want to block it. + " Indent after <p> paragraph tags too let html_indent_inctags = 'p' diff --git a/vim/indent/password.vim b/vim/indent/password.vim deleted file mode 100644 index e37d0387..00000000 --- a/vim/indent/password.vim +++ /dev/null @@ -1,11 +0,0 @@ -" Only do this when not done yet for this buffer -if exists('b:did_indent') - finish -endif -let b:did_indent = 1 - -" Manual indenting and literal tabs for passwords -setlocal noautoindent -setlocal noexpandtab -setlocal softtabstop=0 -let b:undo_indent = 'setlocal autoindent< expandtab< softtabstop<' diff --git a/vim/indent/tsv.vim b/vim/indent/tsv.vim index adbde97d..ae72397c 100644 --- a/vim/indent/tsv.vim +++ b/vim/indent/tsv.vim @@ -1,11 +1,2 @@ -" Only do this when not done yet for this buffer -if exists('b:did_indent') - finish -endif -let b:did_indent = 1 - -" Manual indenting and literal tabs for TSVs -setlocal noautoindent -setlocal noexpandtab -setlocal softtabstop=0 -let b:undo_indent = 'setlocal autoindent< expandtab< softtabstop<' +" TSVs have the same indent options as CSVs +runtime! indent/csv.vim diff --git a/vim/plugin/paste_insert.vim b/vim/plugin/paste_insert.vim new file mode 100644 index 00000000..be578746 --- /dev/null +++ b/vim/plugin/paste_insert.vim @@ -0,0 +1,6 @@ +if exists('loaded_paste_insert') + finish +endif +let loaded_paste_insert = 1 +command! -bar PasteInsert + \ call paste_insert#() diff --git a/vim/plugin/spellfile_local.vim b/vim/plugin/spellfile_local.vim index b04b7573..c026d626 100644 --- a/vim/plugin/spellfile_local.vim +++ b/vim/plugin/spellfile_local.vim @@ -10,7 +10,7 @@ let s:spellfile = join([ Establish $MYVIM/cache/spell execute 'set spellfile=$MYVIM/cache/spell/'.s:spellfile -command! AddLocalSpellFile +command! -bar AddLocalSpellFile \ call spellfile_local#() augroup spellfile_local @@ -204,33 +204,33 @@ endfunction command! -bar ReloadVimrc \ noautocmd source $MYVIMRC | call s:ReloadVimrc() -" We'll now reset and define a group of automatic command hooks specific to -" matters related to reloading the vimrc itself. +" We'll now create or reset a group of automatic command hooks specific to +" matters related to reloading the vimrc itself, or maintaining and managing +" options set within it. " augroup vimrc autocmd! +augroup END - " Reload the stub vimrc, and thereby this main one, each time either of them - " is saved. This often makes errors in the file immediately apparent, and - " saves restarting Vim or running the :source command manually, which - " I almost always want to do after changing my vimrc file anyway. - " - autocmd BufWritePost $MYVIMRC,$MYVIM/vimrc - \ ReloadVimrc - - " If Vim is new enough (v7.0.187) to support the ##SourceCmd event for - " automatic command hooks, we'll also apply a hook for that event to catch - " invocations of :source of either vimrc file, and translate that into - " reloading the stub vimrc. - " - " <https://github.com/vim/vim/releases/tag/v7.0.187> - " - if exists('##SourceCmd') - autocmd SourceCmd $MYVIMRC,$MYVIM/vimrc - \ ReloadVimrc - endif +" Reload the stub vimrc, and thereby this main one, each time either of them +" is saved. This often makes errors in the file immediately apparent, and +" saves restarting Vim or running the :source command manually, which +" I almost always want to do after changing my vimrc file anyway. +" +autocmd vimrc BufWritePost $MYVIMRC,$MYVIM/vimrc + \ ReloadVimrc -augroup END +" If Vim is new enough (v7.0.187) to support the ##SourceCmd event for +" automatic command hooks, we'll also apply a hook for that event to catch +" invocations of :source of either vimrc file, and translate that into +" reloading the stub vimrc. +" +" <https://github.com/vim/vim/releases/tag/v7.0.187> +" +if exists('##SourceCmd') + autocmd vimrc SourceCmd $MYVIMRC,$MYVIM/vimrc + \ ReloadVimrc +endif " We're going to be creating a few directories now. The code to do so in " a compatible way is verbose, mostly because we need to check whether the @@ -962,29 +962,32 @@ if !exists('syntax_on') syntax enable endif -" We'll have Vim try to use my 'sahara' fork of the 'desert256' color scheme, -" and if it manages to do so without errors, turn on the 'cursorline' feature, -" since the scheme configures it and 'cursorcolumn' to be a very dark gray -" that doesn't stand out too much against a black background. Aside from the -" aforementioned experiment with monochrome terminals, I exclusively use dark -" backgrounds. +" Before we attempt to pick a syntax highlighting color scheme, we'll set up +" a couple of hooks for colorscheme loading. In this case, we turn +" 'cursorline' on if my 'sahara' colorscheme is loaded, since I've configured +" it to be a very dark gray that doesn't stand out too much against a black +" background. For any other colorscheme, turn the option off, because it +" almost always stands out too much for my liking. " +autocmd vimrc ColorScheme * + \ set nocursorline +autocmd vimrc ColorScheme sahara + \ set cursorline + +" We'll have Vim try to use my 'sahara' fork of the 'desert256' color scheme. " If we fail to load the color scheme, for whatever reason, suppress the -" error, and reset the syntax highlighting, 'background', and 'cursorline' for -" dark-background default colors. I used it for years; it looks and works -" just fine. +" error, and ensure a dark background for the default colorscheme. " -" There's also a very simple grayscale color scheme I occasionally use -" instead called 'juvenile', which is included as a Git submodule with this -" dotfiles distribution. +" There's also a very simple grayscale color scheme I occasionally use instead +" called 'juvenile', which is included as a Git submodule with this dotfiles +" distribution. " try colorscheme sahara - set cursorline catch - colorscheme default - set background=dark - set nocursorline + if &background !=# 'dark' + set background=dark + endif endtry " My mapping definitions begin here. I have some general personal rules for @@ -1251,10 +1254,6 @@ xmap <Leader>n <Esc><Leader>ngv nnoremap <Leader>N \ :<C-U>set ruler! ruler?<CR> xmap <Leader>N <Esc><Leader>Ngv -"" Leader,p toggles paste mode -nnoremap <Leader>p - \ :<C-U>set paste! paste?<CR> -xmap <Leader>p <Esc><Leader>pgv "" Leader,w toggles soft wrapping nnoremap <Leader>w \ :<C-U>setlocal wrap! wrap?<CR> @@ -1314,6 +1313,15 @@ nnoremap <Leader>L \ :<C-U>ToggleFlagLocal colorcolumn +1<CR> xmap <Leader>L <Esc><Leader>Lgv +" This mapping uses my paste_insert.vim plugin to queue up automatic commands +" for the next insert operation. It's still pretty new. It replaces my old +" paste_open.vim plugin which did this only for opening new lines, and which +" kept confusing me. I'm hoping this will be better. + +"" Leader,p prepares the next insert for paste mode +nnoremap <Leader>p + \ :<C-U>PasteInsert<CR> + " These mappings are for managing filetypes. The first one uses the " :ReloadFileType command that was defined much earlier in this file for " application in the vimrc reload command. @@ -1361,6 +1369,9 @@ nnoremap <Leader>H "" Leader,k shows my marks nnoremap <Leader>k \ :<C-U>marks<CR> +"" Leader,K shows functions +nnoremap <Leader>K + \ :<C-U>function<CR> "" Leader,m shows normal maps nnoremap <Leader>m \ :<C-U>nmap<CR> @@ -1370,6 +1381,9 @@ nnoremap <Leader>M "" Leader,S shows loaded scripts nnoremap <Leader>S \ :<C-U>scriptnames<CR> +"" Leader,U shows user commands +nnoremap <Leader>U + \ :<C-U>command<CR> "" Leader,v shows all global and internal variables nnoremap <Leader>v \ :<C-U>let g: v:<CR> @@ -1381,8 +1395,8 @@ nnoremap <Leader>y \ :<C-U>registers<CR> " This group contains mappings concerned with buffer navigation and -" management. I use the "jetpack" buffer jumper one like crazy; I really like -" it. I got it from one of bairui's "Vim and Vigor" comics: +" management. I use the "jetpack" buffer jumper one a lot. I got it from one +" of bairui's "Vim and Vigor" comics: " " <http://of-vim-and-vigor.blogspot.com/p/vim-vigor-comic.html> @@ -1485,10 +1499,6 @@ nnoremap <Leader>? "" Leader,. runs the configured make program into the location list nnoremap <Leader>. \ :<C-U>lmake!<CR> -"" Leader,o opens a line below in paste mode -nmap <Leader>o <Plug>(PasteOpenBelow) -"" Leader,O opens a line above in paste mode -nmap <Leader>O <Plug>(PasteOpenAbove) "" Leader,q formats the current paragraph nnoremap <Leader>q gqap "" Leader,r acts as a replacement operator |