diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2019-06-16 18:06:11 +1200 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2019-06-16 18:06:11 +1200 |
commit | d19e6a42f6aa5c1c8bee8303011f65c7b46b1f00 (patch) | |
tree | cb63061de47fd6c2f45b53bedb48efb41271db0b | |
parent | Merge branch 'release/v6.19.0' into develop (diff) | |
download | dotfiles-d19e6a42f6aa5c1c8bee8303011f65c7b46b1f00.tar.gz dotfiles-d19e6a42f6aa5c1c8bee8303011f65c7b46b1f00.zip |
Add 'foldlevel' setting maps
Not sure I'll keep these; nine keys for what's really one function seems
a bit wasteful, but I'm not using any of them yet.
-rw-r--r-- | vim/vimrc | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -1564,6 +1564,15 @@ xmap <Leader>r <Plug>(ReplaceOperator) nmap <Leader>* <Plug>(RegexEscape) xmap <Leader>* <Plug>(RegexEscape) +" I don't have anything for which I'm using the numbers just yet, so let's set +" them to apply an explicit 'foldlevel' for now, which is occasionally useful, +" though I suspect I'm more likely to keep using zM, zm, and zr. +" +for s:key in range(0,9) + execute 'nnoremap <Leader>'.s:key.' :<C-U>set foldlevel='.s:key.'<CR>' + execute 'xmap <Leader>'.s:key.' <Esc><Leader>'.s:key.'gv' +endfor + " And last, but definitely not least, I'm required by Vim fanatic law to " include a mapping that reloads my whole configuration. This uses the " command wrapper defined much earlier in the file, so that filetypes also get |