From 2a15f9207a33a67cb78fa9b677d8d98f44d02dac Mon Sep 17 00:00:00 2001 From: Chizi123 <joelgrun@gmail.com> Date: Thu, 22 Nov 2018 08:52:50 +0000 Subject: [PATCH] minor changes --- custom/setup-convenience.el | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 50 insertions(+), 0 deletions(-) diff --git a/custom/setup-convenience.el b/custom/setup-convenience.el new file mode 100644 index 0000000..59fa0c8 --- /dev/null +++ b/custom/setup-convenience.el @@ -0,0 +1,50 @@ +(provide 'setup-convenience) + +;; use ibuffer instead of default +(global-set-key (kbd "C-x C-b") 'ibuffer) + +;; GROUP: Convenience -> Revert + +;; update any change made on file to the current buffer +(global-auto-revert-mode) + +;; GROUP: Convenience -> Hippe Expand +;; hippie-expand is a better version of dabbrev-expand. +;; While dabbrev-expand searches for words you already types, in current;; buffers and other buffers, hippie-expand includes more sources, +;; such as filenames, klll ring... +(global-set-key (kbd "M-/") 'hippie-expand) ;; replace dabbrev-expand +(setq + hippie-expand-try-functions-list + '(try-expand-dabbrev ;; Try to expand word "dynamically", searching the current buffer. + try-expand-dabbrev-all-buffers ;; Try to expand word "dynamically", searching all other buffers. + try-expand-dabbrev-from-kill ;; Try to expand word "dynamically", searching the kill ring. + try-complete-file-name-partially ;; Try to complete text as a file name, as many characters as unique. + try-complete-file-name ;; Try to complete text as a file name. + try-expand-all-abbrevs ;; Try to expand word before point according to all abbrev tables. + try-expand-list ;; Try to complete the current line to an entire line in the buffer. + try-expand-line ;; Try to complete the current line to an entire line in the buffer. + try-complete-lisp-symbol-partially ;; Try to complete as an Emacs Lisp symbol, as many characters as unique. + try-complete-lisp-symbol) ;; Try to complete word as an Emacs Lisp symbol. + ) + +;; GROUP: Convenience -> HL Line +(global-hl-line-mode) + +;; GROUP: Convenience -> Ibuffer +(setq ibuffer-use-other-window t) ;; always display ibuffer in another window + +;; GROUP: Convenience -> Linum +(add-hook 'prog-mode-hook 'linum-mode) ;; enable linum only in programming modes + +;; GROUP: Convenience -> Whitespace + +;; whenever you create useless whitespace, the whitespace is highlighted +(add-hook 'prog-mode-hook (lambda () (interactive) (setq show-trailing-whitespace 1))) + +;; activate whitespace-mode to view all whitespace characters +(global-set-key (kbd "C-c w") 'whitespace-mode) + +;; GROUP: Convenience -> Windmove + +;; easier window navigation +(windmove-default-keybindings) -- Gitblit v1.9.3