diff --git a/config.org b/config.org index e051479..7fbae73 100644 --- a/config.org +++ b/config.org @@ -753,6 +753,29 @@ https://github.com/ikirill/irony-eldoc ) #+END_SRC +* Windows + +** Splitting + +After you split a window, your focus remains in the previous one. +Credit goes to https://github.com/daedreth/UncleDavesEmacs + +#+BEGIN_SRC emacs-lisp +(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) +#+END_SRC + * Avy https://github.com/abo-abo/avy diff --git a/init.el b/init.el index aaaaeda..16b4ed1 100644 --- a/init.el +++ b/init.el @@ -22,3 +22,18 @@ (org-babel-load-file (expand-file-name "~/.emacs.d/config.org"))) (provide 'init) +(custom-set-variables + ;; custom-set-variables was added by Custom. + ;; If you edit it by hand, you could mess it up, so be careful. + ;; Your init file should contain only one such instance. + ;; If there is more than one, they won't work right. + '(helm-gtags-auto-update t) + '(package-selected-packages + (quote + (linum-relative avy flycheck-irony irony-eldoc company-irony company-c-headers flycheck magit py-autopep8 multiple-cursors helm-gtags helm-swoop zygospore yasnippet volatile-highlights use-package undo-tree smartparens smart-mode-line monokai-theme iedit helm expand-region dashboard comment-dwim-2)))) +(custom-set-faces + ;; custom-set-faces was added by Custom. + ;; If you edit it by hand, you could mess it up, so be careful. + ;; Your init file should contain only one such instance. + ;; If there is more than one, they won't work right. + )