Fix bugs with evil config
This commit is contained in:
		
							parent
							
								
									f595a7f8e8
								
							
						
					
					
						commit
						2baadca418
					
				
					 1 changed files with 8 additions and 5 deletions
				
			
		
							
								
								
									
										13
									
								
								init.el
									
										
									
									
									
								
							
							
						
						
									
										13
									
								
								init.el
									
										
									
									
									
								
							| 
						 | 
				
			
			@ -80,8 +80,11 @@
 | 
			
		|||
(use-package rainbow-mode)
 | 
			
		||||
 | 
			
		||||
;; Evil (Vim Emulation)
 | 
			
		||||
(use-package evil)
 | 
			
		||||
(setq evil-move-beyond-eol t)
 | 
			
		||||
(setq evil-want-fine-undo t) ;; multi step undo in insert mode
 | 
			
		||||
(add-hook 'prog-mode-hook (lambda () (evil-mode +1)))
 | 
			
		||||
(add-hook 'change-major-mode-hook (lambda () (evil-mode -1)))
 | 
			
		||||
(use-package evil
 | 
			
		||||
  :init
 | 
			
		||||
  (setq evil-mode-beyond-eol t)
 | 
			
		||||
  (setq evil-mode-fine-undo t)
 | 
			
		||||
  (setq evil-default-state 'emacs)
 | 
			
		||||
  :config
 | 
			
		||||
  (evil-set-initial-state 'prog-mode 'normal)
 | 
			
		||||
  (evil-mode +1))
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue