mirror of
				https://github.com/mhinz/vim-galore.git
				synced 2025-11-04 11:55:35 +08:00 
			
		
		
		
	Tips: saner <c-l>
This commit is contained in:
		@@ -19,6 +19,7 @@ All notable changes to this project will be documented in this file.
 | 
			
		||||
- Tips: [Saner command-line history](README.md#saner-command-line-history)
 | 
			
		||||
- Tips: [Reload a file on saving](README.md#reload-a-file-on-saving)
 | 
			
		||||
- Tips: [Smarter cursorline](README.md#smarter-cursorline)
 | 
			
		||||
- Tips: [Saner CTRL-L](README.md#saner-ctrl-l)
 | 
			
		||||
- Usage: [Editing remote files](README.md#editing-remote-files)
 | 
			
		||||
- Usage: [Restore cursor position when opening file](README.md#restore-cursor-position-when-opening-file)
 | 
			
		||||
- Usage: [MatchIt](README.md#matchit)
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										13
									
								
								README.md
									
									
									
									
									
								
							
							
						
						
									
										13
									
								
								README.md
									
									
									
									
									
								
							@@ -49,6 +49,7 @@ added every day. Things about to be added can be found here:
 | 
			
		||||
 | 
			
		||||
- [Saner behavior of n and N](#saner-behavior-of-n-and-n)
 | 
			
		||||
- [Saner command-line history](#saner-command-line-history)
 | 
			
		||||
- [Saner CTRL-L](#saner-ctrl-l)
 | 
			
		||||
- [Quickly move current line](#quickly-move-current-line)
 | 
			
		||||
- [Quickly add empty lines](#quickly-add-empty-lines)
 | 
			
		||||
- [Quickly edit your macros](#quickly-edit-your-macros)
 | 
			
		||||
@@ -1091,6 +1092,18 @@ cnoremap <c-p>  <up>
 | 
			
		||||
 | 
			
		||||
I depend on this behaviour several times a day.
 | 
			
		||||
 | 
			
		||||
#### Saner CTRL-L
 | 
			
		||||
 | 
			
		||||
By default `<c-l>` clears and redraws the screen (like `:redraw!`). The following
 | 
			
		||||
mapping does the same, plus de-highlighting the matches found via `/`, `?` etc.,
 | 
			
		||||
plus fixing syntax highlighting (sometimes Vim loses highlighting due to complex
 | 
			
		||||
highlighting rules), plus force updating the syntax highlighting in diff mode:
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
```viml
 | 
			
		||||
nnoremap <leader>l :nohlsearch<cr>:diffupdate<cr>:syntax sync fromstart<cr><c-l>
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
#### Quickly move current line
 | 
			
		||||
 | 
			
		||||
Sometimes I need a quick way to move the current line above or below:
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user