Change magit bindings to evil mode
This commit is contained in:
		
							parent
							
								
									0b23369f03
								
							
						
					
					
						commit
						70f2e78394
					
				
					 1 changed files with 22 additions and 16 deletions
				
			
		
							
								
								
									
										38
									
								
								init.el
									
										
									
									
									
								
							
							
						
						
									
										38
									
								
								init.el
									
										
									
									
									
								
							| 
						 | 
					@ -72,6 +72,28 @@
 | 
				
			||||||
(straight-use-package 'use-package)
 | 
					(straight-use-package 'use-package)
 | 
				
			||||||
(setq straight-use-package-by-default t)
 | 
					(setq straight-use-package-by-default t)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					;; Evil (Vim Emulation)
 | 
				
			||||||
 | 
					(use-package evil
 | 
				
			||||||
 | 
					  :init
 | 
				
			||||||
 | 
					  (setq evil-want-C-u-scroll t
 | 
				
			||||||
 | 
					        evil-mode-beyond-eol t
 | 
				
			||||||
 | 
					        evil-mode-fine-undo t
 | 
				
			||||||
 | 
					        evil-default-state 'emacs
 | 
				
			||||||
 | 
					        evil-undo-system 'undo-redo
 | 
				
			||||||
 | 
									evil-want-keybinding nil)
 | 
				
			||||||
 | 
					  :config
 | 
				
			||||||
 | 
						(add-hook 'evil-local-mode-hook (lambda ()
 | 
				
			||||||
 | 
					                                    (setq-local interprogram-cut-function nil)
 | 
				
			||||||
 | 
					                                    (setq-local interprogram-paste-function nil)))
 | 
				
			||||||
 | 
					  (evil-set-initial-state 'prog-mode 'normal)
 | 
				
			||||||
 | 
					  (evil-set-initial-state 'text-mode 'normal)
 | 
				
			||||||
 | 
					  (evil-mode +1))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					(use-package evil-collection
 | 
				
			||||||
 | 
						:config
 | 
				
			||||||
 | 
						(evil-collection-init 'magit))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
;; Avy (jump to char)
 | 
					;; Avy (jump to char)
 | 
				
			||||||
(use-package avy
 | 
					(use-package avy
 | 
				
			||||||
  :bind (("C-;" . avy-goto-char)
 | 
					  :bind (("C-;" . avy-goto-char)
 | 
				
			||||||
| 
						 | 
					@ -127,22 +149,6 @@
 | 
				
			||||||
(use-package nix-mode
 | 
					(use-package nix-mode
 | 
				
			||||||
  :mode "\\.nix\\'")
 | 
					  :mode "\\.nix\\'")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
;; Evil (Vim Emulation)
 | 
					 | 
				
			||||||
(use-package evil
 | 
					 | 
				
			||||||
  :init
 | 
					 | 
				
			||||||
  (setq evil-want-C-u-scroll t
 | 
					 | 
				
			||||||
        evil-mode-beyond-eol t
 | 
					 | 
				
			||||||
        evil-mode-fine-undo t
 | 
					 | 
				
			||||||
        evil-default-state 'emacs
 | 
					 | 
				
			||||||
        evil-undo-system 'undo-redo)
 | 
					 | 
				
			||||||
  :config
 | 
					 | 
				
			||||||
	(add-hook 'evil-local-mode-hook (lambda ()
 | 
					 | 
				
			||||||
                                    (setq-local interprogram-cut-function nil)
 | 
					 | 
				
			||||||
                                    (setq-local interprogram-paste-function nil)))
 | 
					 | 
				
			||||||
  (evil-set-initial-state 'prog-mode 'normal)
 | 
					 | 
				
			||||||
  (evil-set-initial-state 'text-mode 'normal)
 | 
					 | 
				
			||||||
  (evil-mode +1))
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
;; Treesitter based navigation
 | 
					;; Treesitter based navigation
 | 
				
			||||||
(use-package evil-textobj-tree-sitter
 | 
					(use-package evil-textobj-tree-sitter
 | 
				
			||||||
  :config
 | 
					  :config
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue