Begin cleaning up maps.vim
Added some useful unimpaired mappings and moved localleader to , to prepare for separation of local and global leader mappings.
This commit is contained in:
parent
66f33b8f74
commit
99df4a278c
1 changed files with 41 additions and 6 deletions
|
|
@ -12,14 +12,49 @@
|
||||||
" backspace to switch to alternate (last) buffer
|
" backspace to switch to alternate (last) buffer
|
||||||
nnoremap <BS> <C-^>
|
nnoremap <BS> <C-^>
|
||||||
|
|
||||||
|
" repeat the last substitute command with all its flags preserved
|
||||||
|
noremap &
|
||||||
|
\ :&&<CR>
|
||||||
|
ounmap &
|
||||||
|
sunmap &
|
||||||
|
|
||||||
|
" bracket pairings to go to the next/previous of:
|
||||||
|
" (works with count prefixes)
|
||||||
|
"
|
||||||
|
" Argument list
|
||||||
|
nnoremap [a
|
||||||
|
\ :previous<CR>
|
||||||
|
nnoremap ]a
|
||||||
|
\ :next<CR>
|
||||||
|
" Buffers
|
||||||
|
nnoremap [b
|
||||||
|
\ :bprevious<CR>
|
||||||
|
nnoremap ]b
|
||||||
|
\ :bnext<CR>
|
||||||
|
" Quickfix list
|
||||||
|
nnoremap [c
|
||||||
|
\ :cprevious<CR>
|
||||||
|
nnoremap ]c
|
||||||
|
\ :cnext<CR>
|
||||||
|
" Location list
|
||||||
|
nnoremap [l
|
||||||
|
\ :lprevious<CR>
|
||||||
|
nnoremap ]l
|
||||||
|
\ :lnext<CR>
|
||||||
|
|
||||||
" set our leader key to space since with hjkl, space is largely useless
|
" set our leader key to space since with hjkl, space is largely useless
|
||||||
let mapleader = "\<Space>"
|
let mapleader = "\<Space>"
|
||||||
" maps the leader for buffer local mappings (e.g. vim-waikiki for files under
|
" maps the leader for buffer local mappings
|
||||||
" the root dir to the same key -- might lead to incompatibilities, will have
|
" since we are (atm) using sneak to go fwd/bwd in fFtT searches, comma does
|
||||||
" to test)
|
" not do too many useful things and can be taken up as localleader
|
||||||
let maplocalleader = "\<Space>"
|
let maplocalleader = ","
|
||||||
" set jk to escape, in case capslock is not mapped to escape on the system
|
|
||||||
inoremap jk <ESC>
|
" If we mapped localleader to comma, we can still get to its original function
|
||||||
|
" by douple-tapping it.
|
||||||
|
if maplocalleader ==# ','
|
||||||
|
noremap ,, ,
|
||||||
|
sunmap ,,
|
||||||
|
endif
|
||||||
|
|
||||||
" remove search highlights by pressing space+/ - the key for searching the
|
" remove search highlights by pressing space+/ - the key for searching the
|
||||||
" first place
|
" first place
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue