Improve hooks, allow C-h in vterm
This commit is contained in:
parent
a87b228bac
commit
f58fa0174b
30
init.el
30
init.el
|
@ -198,7 +198,8 @@
|
|||
(dtrt-indent-global-mode))
|
||||
|
||||
(use-package aggressive-indent
|
||||
:hook prog-mode)
|
||||
:hook (prog-mode
|
||||
org-mode))
|
||||
|
||||
(use-package rainbow-delimiters
|
||||
:hook prog-mode)
|
||||
|
@ -352,7 +353,11 @@
|
|||
vc-ignore-dir-regexp
|
||||
tramp-file-name-regexp)))
|
||||
|
||||
(use-package vterm)
|
||||
(use-package vterm
|
||||
:hook (vterm-mode . my-inhibit-hl-line-mode)
|
||||
:config
|
||||
(evil-define-key 'insert vterm-mode-map (kbd "C-h") #'vterm--self-insert)
|
||||
(evil-define-key 'insert vterm-mode-map (kbd "C-S-h") #'help-command))
|
||||
|
||||
(use-package elfeed
|
||||
:commands (elfeed elfeed-update)
|
||||
|
@ -424,7 +429,6 @@
|
|||
|
||||
(setq pixel-scroll-precision-large-scroll-height 40)
|
||||
(pixel-scroll-precision-mode)
|
||||
(global-hl-line-mode)
|
||||
(add-to-list 'default-frame-alist '(font . "JetbrainsMono Nerd Font-10.5"))
|
||||
|
||||
(setcar mouse-wheel-scroll-amount 3)
|
||||
|
@ -442,21 +446,25 @@
|
|||
tab-width 4
|
||||
fill-column 80)
|
||||
|
||||
(defun relative-linenum ()
|
||||
(global-hl-line-mode)
|
||||
(defun my-inhibit-hl-line-mode ()
|
||||
(setq-local global-hl-line-mode nil))
|
||||
|
||||
(defun my-relative-linenum ()
|
||||
(setq display-line-numbers 'relative))
|
||||
(dolist (hook '(prog-mode-hook
|
||||
text-mode-hook
|
||||
conf-mode-hook
|
||||
org-mode-hook))
|
||||
(add-hook hook #'relative-linenum))
|
||||
(add-hook hook #'my-relative-linenum))
|
||||
|
||||
(defun use-spaces-for-indent ()
|
||||
(defun my-use-spaces-for-indent ()
|
||||
(setq indent-tabs-mode nil))
|
||||
|
||||
(add-hook 'emacs-lisp-mode-hook #'use-spaces-for-indent)
|
||||
(add-hook 'lisp-mode-hook #'use-spaces-for-indent)
|
||||
(add-hook 'scheme-mode-hook #'use-spaces-for-indent)
|
||||
(add-hook 'clojure-mode-hook #'use-spaces-for-indent)
|
||||
(dolist (hook '(emacs-lisp-mode-hook
|
||||
lisp-mode-hook
|
||||
scheme-mode-hook
|
||||
clojure-mode-hook))
|
||||
(add-hook hook #'my-use-spaces-for-indent))
|
||||
|
||||
(defun scroll-down-3 ()
|
||||
"Scrolls down by 3"
|
||||
|
|
Loading…
Reference in a new issue