Fix j -> gj mapping.
This commit is contained in:
		
							parent
							
								
									ec274db8b2
								
							
						
					
					
						commit
						229ad7e00d
					
				
					 1 changed files with 2 additions and 2 deletions
				
			
		| 
						 | 
				
			
			@ -32,8 +32,8 @@ M.misc = function()
 | 
			
		|||
      -- http://www.reddit.com/r/vim/comments/2k4cbr/problem_with_gj_and_gk/
 | 
			
		||||
      -- empty mode is same as using :map
 | 
			
		||||
      -- also don't use g[j|k] when in operator pending mode, so it doesn't alter d, y or c behaviour
 | 
			
		||||
      map_wrapper("", "j", 'v:count || mode(1)[0:1] == "no" ? "j" : "gj"', { expr = true })
 | 
			
		||||
      map_wrapper("", "k", 'v:count || mode(1)[0:1] == "no" ? "k" : "gk"', { expr = true })
 | 
			
		||||
      map_wrapper({"n", "x", "o"}, "j", 'v:count || mode(1)[0:1] == "no" ? "j" : "gj"', { expr = true })
 | 
			
		||||
      map_wrapper({"n", "x", "o"}, "k", 'v:count || mode(1)[0:1] == "no" ? "k" : "gk"', { expr = true })
 | 
			
		||||
      map_wrapper("", "<Down>", 'v:count || mode(1)[0:1] == "no" ? "j" : "gj"', { expr = true })
 | 
			
		||||
      map_wrapper("", "<Up>", 'v:count || mode(1)[0:1] == "no" ? "k" : "gk"', { expr = true })
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue