Emacs: cperl-mode, and kill-current-buffer
This commit is contained in:
parent
9951eaf188
commit
971dae3da8
1 changed files with 8 additions and 3 deletions
11
emacs/.emacs
11
emacs/.emacs
|
@ -44,8 +44,10 @@
|
||||||
'(blink-cursor-mode nil)
|
'(blink-cursor-mode nil)
|
||||||
'(cperl-close-paren-offset -2)
|
'(cperl-close-paren-offset -2)
|
||||||
'(cperl-electric-parens nil)
|
'(cperl-electric-parens nil)
|
||||||
|
'(cperl-electric-parens-mark nil)
|
||||||
'(cperl-indent-level 2)
|
'(cperl-indent-level 2)
|
||||||
'(cperl-indent-parens-as-block t)
|
'(cperl-indent-parens-as-block t)
|
||||||
|
'(cperl-under-as-char t)
|
||||||
'(custom-enabled-themes (quote (heroku)))
|
'(custom-enabled-themes (quote (heroku)))
|
||||||
'(custom-safe-themes
|
'(custom-safe-themes
|
||||||
(quote
|
(quote
|
||||||
|
@ -151,6 +153,10 @@
|
||||||
(interactive)
|
(interactive)
|
||||||
(evil--jump-forward 1))
|
(evil--jump-forward 1))
|
||||||
|
|
||||||
|
(defun my/kill-current-buffer ()
|
||||||
|
(interactive)
|
||||||
|
(kill-buffer (current-buffer)))
|
||||||
|
|
||||||
(use-package evil
|
(use-package evil
|
||||||
:ensure t
|
:ensure t
|
||||||
:demand t
|
:demand t
|
||||||
|
@ -158,7 +164,7 @@
|
||||||
(evil-mode 1)
|
(evil-mode 1)
|
||||||
(setq evil-ex-substitute-global t)
|
(setq evil-ex-substitute-global t)
|
||||||
(define-key evil-normal-state-map "/" 'swiper)
|
(define-key evil-normal-state-map "/" 'swiper)
|
||||||
(evil-ex-define-cmd "q" 'kill-buffer)
|
(evil-ex-define-cmd "q" 'my/kill-current-buffer)
|
||||||
(define-key evil-normal-state-map "gb" 'my/evil-go-back)
|
(define-key evil-normal-state-map "gb" 'my/evil-go-back)
|
||||||
(define-key evil-normal-state-map "gn" 'my/evil-go-forward)
|
(define-key evil-normal-state-map "gn" 'my/evil-go-forward)
|
||||||
(define-key evil-motion-state-map [down-mouse-1] 'silence)
|
(define-key evil-motion-state-map [down-mouse-1] 'silence)
|
||||||
|
@ -386,8 +392,7 @@
|
||||||
(defun treat-underscore ()
|
(defun treat-underscore ()
|
||||||
(modify-syntax-entry ?_ "w"))
|
(modify-syntax-entry ?_ "w"))
|
||||||
|
|
||||||
(add-hook 'cperl-mode-hook 'treat-underscore)
|
(add-hook 'prog-mode-hook 'treat-underscore)
|
||||||
(add-hook 'c-mode-hook 'treat-underscore)
|
|
||||||
|
|
||||||
;; Split windows horizontally preferred
|
;; Split windows horizontally preferred
|
||||||
(setq split-height-threshold 6)
|
(setq split-height-threshold 6)
|
||||||
|
|
Loading…
Reference in a new issue