silent mappings, formatting
This commit is contained in:
parent
8910732d04
commit
3832824b39
|
@ -1,18 +1,18 @@
|
||||||
" key #mappings{{{
|
" key #mappings{{{
|
||||||
|
|
||||||
nnoremap <space>rc :so $MYVIMRC<CR>
|
nnoremap <silent> <space>rc :so $MYVIMRC<CR>
|
||||||
|
|
||||||
" Focus on current fold, close the rest
|
" Focus on current fold, close the rest
|
||||||
nnoremap <space>zz zMzvzt
|
nnoremap <silent> <space>zz zMzvzt
|
||||||
|
|
||||||
" replace current word with last yanked/deleted text
|
" replace current word with last yanked/deleted text
|
||||||
nnoremap <space>rr "_diwP
|
nnoremap <silent> <space>rr "_diwP
|
||||||
" replace current word with last yanked text
|
" replace current word with last yanked text
|
||||||
nnoremap <space>ry diw"0P
|
nnoremap <silent> <space>ry diw"0P
|
||||||
|
|
||||||
inoremap jk <esc>
|
inoremap jk <esc>
|
||||||
|
|
||||||
nnoremap A :call CheckLineEnding()<CR>
|
nnoremap <silent> A :call CheckLineEnding()<CR>
|
||||||
|
|
||||||
nnoremap <space>co :!clear;
|
nnoremap <space>co :!clear;
|
||||||
|
|
||||||
|
@ -59,8 +59,6 @@ nnoremap <space>qh :chistory<CR>
|
||||||
nnoremap <space>qp :colder<CR>
|
nnoremap <space>qp :colder<CR>
|
||||||
nnoremap <space>qn :cnewer<CR>
|
nnoremap <space>qn :cnewer<CR>
|
||||||
|
|
||||||
nnoremap <space>nh :noh<CR>
|
|
||||||
|
|
||||||
" quick grep of visual selection
|
" quick grep of visual selection
|
||||||
vnoremap <space>gr y:grep! -R <C-r>" .
|
vnoremap <space>gr y:grep! -R <C-r>" .
|
||||||
|
|
||||||
|
@ -68,7 +66,7 @@ vnoremap <space>gr y:grep! -R <C-r>" .
|
||||||
nnoremap <space>td :grep! -R '// *TODO' .<CR>:botright cwindow<CR>:echo len(getqflist()) 'TODOs'<CR>
|
nnoremap <space>td :grep! -R '// *TODO' .<CR>:botright cwindow<CR>:echo len(getqflist()) 'TODOs'<CR>
|
||||||
|
|
||||||
" brace/quotes completion
|
" brace/quotes completion
|
||||||
inoremap {{ {}<left>
|
inoremap {{ {}<left>
|
||||||
inoremap {<CR> {<CR>}<esc>O
|
inoremap {<CR> {<CR>}<esc>O
|
||||||
inoremap {; {<CR>};<esc>O
|
inoremap {; {<CR>};<esc>O
|
||||||
inoremap }} {{}}<Left><Left>
|
inoremap }} {{}}<Left><Left>
|
||||||
|
@ -76,7 +74,7 @@ inoremap }} {{}}<Left><Left>
|
||||||
inoremap (( ()<Left>
|
inoremap (( ()<Left>
|
||||||
inoremap (; ();<Left><Left>
|
inoremap (; ();<Left><Left>
|
||||||
|
|
||||||
inoremap [[ []<Left>
|
inoremap [[ []<Left>
|
||||||
inoremap [<CR> [<CR>]<esc>O
|
inoremap [<CR> [<CR>]<esc>O
|
||||||
|
|
||||||
inoremap "" ""<Left>
|
inoremap "" ""<Left>
|
||||||
|
@ -84,10 +82,10 @@ inoremap "; "";<Left><Left>
|
||||||
inoremap '' ''<Left>
|
inoremap '' ''<Left>
|
||||||
inoremap '; '';<Left><Left>
|
inoremap '; '';<Left><Left>
|
||||||
|
|
||||||
inoremap ;; ;<esc>
|
inoremap ;; ;<esc>
|
||||||
|
|
||||||
nnoremap <space>nn :set invrelativenumber<CR>
|
nnoremap <silent> <space>nn :set invrelativenumber<CR>
|
||||||
nnoremap <space>hl :nohlsearch<CR>
|
nnoremap <silent><expr> <space>nh (&hls && v:hlsearch ? ':nohls' : ':set hls')."\n"
|
||||||
|
|
||||||
" devdocs mapping
|
" devdocs mapping
|
||||||
nnoremap <space>dd :DD<CR>
|
nnoremap <space>dd :DD<CR>
|
||||||
|
|
Loading…
Reference in New Issue