add new packages, qol
This commit is contained in:
parent
370fcfef08
commit
55f423189c
14
functions.el
14
functions.el
|
@ -12,6 +12,20 @@
|
||||||
(mapc 'kill-buffer (buffer-list)))
|
(mapc 'kill-buffer (buffer-list)))
|
||||||
(global-set-key (kbd "C-c k k") 'kill-all-buffers)
|
(global-set-key (kbd "C-c k k") 'kill-all-buffers)
|
||||||
|
|
||||||
|
(defun split-and-follow-horizontally ()
|
||||||
|
(interactive)
|
||||||
|
(split-window-below)
|
||||||
|
(balance-windows)
|
||||||
|
(other-window 1))
|
||||||
|
(global-set-key (kbd "C-x 2") 'split-and-follow-horizontally)
|
||||||
|
|
||||||
|
(defun split-and-follow-vertically ()
|
||||||
|
(interactive)
|
||||||
|
(split-window-right)
|
||||||
|
(balance-windows)
|
||||||
|
(other-window 1))
|
||||||
|
(global-set-key (kbd "C-x 3") 'split-and-follow-vertically)
|
||||||
|
|
||||||
;; compilation
|
;; compilation
|
||||||
(setq compile-command "make ")
|
(setq compile-command "make ")
|
||||||
(global-set-key "\C-x\C-m" 'compile)
|
(global-set-key "\C-x\C-m" 'compile)
|
||||||
|
|
20
init.el
20
init.el
|
@ -16,7 +16,7 @@
|
||||||
(set-language-environment "UTF-8")
|
(set-language-environment "UTF-8")
|
||||||
|
|
||||||
;; Appearance
|
;; Appearance
|
||||||
(set-frame-font "Terminus 12")
|
(set-frame-font "DejaVu Sans Mono 10")
|
||||||
(set-face-italic 'font-lock-comment-face nil) ; disable italics
|
(set-face-italic 'font-lock-comment-face nil) ; disable italics
|
||||||
; theme set in packages.el
|
; theme set in packages.el
|
||||||
(global-linum-mode)
|
(global-linum-mode)
|
||||||
|
@ -30,8 +30,9 @@
|
||||||
(setq display-time-24hr-format t)
|
(setq display-time-24hr-format t)
|
||||||
(display-time-mode t)
|
(display-time-mode t)
|
||||||
|
|
||||||
;; Instead of leaving backup files everywhere, have them in this dir
|
;; disable creation of backup files
|
||||||
(setq backup-directory-alist `(("." . "~/.emacs.d/backups")))
|
(setq make-backup-files nil)
|
||||||
|
(setq auto-save-default nil)
|
||||||
|
|
||||||
;; Y or N instead of Yes or No
|
;; Y or N instead of Yes or No
|
||||||
(defalias 'yes-or-no-p 'y-or-n-p)
|
(defalias 'yes-or-no-p 'y-or-n-p)
|
||||||
|
@ -47,10 +48,10 @@
|
||||||
|
|
||||||
;; Electric pair mode
|
;; Electric pair mode
|
||||||
(setq electric-pair-pairs '((?\( . ?\))
|
(setq electric-pair-pairs '((?\( . ?\))
|
||||||
(?\[ . ?\])
|
(?\[ . ?\])
|
||||||
(?\{ . ?\})
|
(?\{ . ?\})
|
||||||
(?\" . ?\")
|
(?\" . ?\")
|
||||||
))
|
))
|
||||||
(electric-pair-mode t)
|
(electric-pair-mode t)
|
||||||
|
|
||||||
;; windmove
|
;; windmove
|
||||||
|
@ -75,6 +76,9 @@
|
||||||
(set-face-attribute face nil :weight 'normal))
|
(set-face-attribute face nil :weight 'normal))
|
||||||
(face-list))
|
(face-list))
|
||||||
|
|
||||||
|
;; Eshell
|
||||||
|
(defalias 'open 'find-file-other-window)
|
||||||
|
(defalias 'clean 'eshell/clear-scrollback)
|
||||||
|
|
||||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
|
|
||||||
|
@ -84,7 +88,7 @@
|
||||||
;; Your init file should contain only one such instance.
|
;; Your init file should contain only one such instance.
|
||||||
;; If there is more than one, they won't work right.
|
;; If there is more than one, they won't work right.
|
||||||
'(package-selected-packages
|
'(package-selected-packages
|
||||||
'(magit expand-region go-mode tao-themes tao-theme almost-mono-themes use-package)))
|
'(avy swiper auto-package-update magit expand-region go-mode tao-themes tao-theme almost-mono-themes use-package)))
|
||||||
(custom-set-faces
|
(custom-set-faces
|
||||||
;; custom-set-faces was added by Custom.
|
;; custom-set-faces was added by Custom.
|
||||||
;; If you edit it by hand, you could mess it up, so be careful.
|
;; If you edit it by hand, you could mess it up, so be careful.
|
||||||
|
|
20
packages.el
20
packages.el
|
@ -17,6 +17,19 @@
|
||||||
(package-refresh-contents)
|
(package-refresh-contents)
|
||||||
(package-install 'use-package))
|
(package-install 'use-package))
|
||||||
|
|
||||||
|
;; auto-package-update automatically updates and removes old packages
|
||||||
|
(use-package auto-package-update
|
||||||
|
:ensure t
|
||||||
|
:config
|
||||||
|
(setq auto-package-update-delete-old-versions t)
|
||||||
|
(setq auto-package-update-hide-results t)
|
||||||
|
(auto-package-update-maybe))
|
||||||
|
|
||||||
|
;; better incremental search with minibuffer
|
||||||
|
(use-package swiper
|
||||||
|
:ensure t
|
||||||
|
:bind ("C-s" . 'swiper))
|
||||||
|
|
||||||
(use-package almost-mono-themes
|
(use-package almost-mono-themes
|
||||||
:ensure t
|
:ensure t
|
||||||
:init
|
:init
|
||||||
|
@ -53,10 +66,17 @@
|
||||||
(global-set-key (kbd "C-=") 'er/expand-region)
|
(global-set-key (kbd "C-=") 'er/expand-region)
|
||||||
(pending-delete-mode t)) ; if you start typing while a word is selected, overwrite it
|
(pending-delete-mode t)) ; if you start typing while a word is selected, overwrite it
|
||||||
|
|
||||||
|
;; jump to definitions and files with M-.
|
||||||
(use-package dumb-jump
|
(use-package dumb-jump
|
||||||
:ensure t
|
:ensure t
|
||||||
:config
|
:config
|
||||||
(add-hook 'xref-backend-functions #'dumb-jump-xref-activate))
|
(add-hook 'xref-backend-functions #'dumb-jump-xref-activate))
|
||||||
|
|
||||||
|
;; avy - jump around files more easily
|
||||||
|
(use-package avy
|
||||||
|
:ensure t
|
||||||
|
:bind ("M-s" . avy-goto-char))
|
||||||
|
|
||||||
|
;; self explanatory
|
||||||
(use-package magit
|
(use-package magit
|
||||||
:ensure t)
|
:ensure t)
|
||||||
|
|
Loading…
Reference in New Issue