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