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
|
||||
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
|
||||
let mapleader = "\<Space>"
|
||||
" maps the leader for buffer local mappings (e.g. vim-waikiki for files under
|
||||
" the root dir to the same key -- might lead to incompatibilities, will have
|
||||
" to test)
|
||||
let maplocalleader = "\<Space>"
|
||||
" set jk to escape, in case capslock is not mapped to escape on the system
|
||||
inoremap jk <ESC>
|
||||
" maps the leader for buffer local mappings
|
||||
" since we are (atm) using sneak to go fwd/bwd in fFtT searches, comma does
|
||||
" not do too many useful things and can be taken up as localleader
|
||||
let maplocalleader = ","
|
||||
|
||||
" 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
|
||||
" first place
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue