;; Persist command history (savehist-mode 1) ;; Enable C-r in evil (use-package undo-tree :ensure t) ;;;; TAGS configuration. ;; Goto tag with M-. (global-set-key "\M-." 'etags-select-find-tag) ;; Automatically load TAGS file (if exists) when opening emacs. (let ((my-tags-file (locate-dominating-file default-directory "TAGS"))) (when my-tags-file (message "Loading tags file: %s" my-tags-file) (visit-tags-table my-tags-file))) ;; Resize windows (global-set-key (kbd "S-C-h") 'shrink-window-horizontally) (global-set-key (kbd "S-C-l") 'enlarge-window-horizontally) (global-set-key (kbd "S-C-j") 'shrink-window) (global-set-key (kbd "S-C-k") 'enlarge-window) ;;;; Company configuration. (use-package company :ensure t :defer t :init (global-company-mode) :config (progn (add-to-list 'completion-styles 'initials t) (bind-key "M-" #'company-complete company-mode-map) (setq company-tooltip-align-annotations t tab-always-indent 'complete) (setq company-dabbrev-downcase nil)) :diminish company-mode) ;;;; Evil mode configuration. (use-package evil :ensure t :init ;; tweak evil's configuration before loading it (setq evil-search-module 'evil-search evil-ex-complete-emacs-commands nil evil-vsplit-window-right t evil-split-window-below t evil-shift-round nil evil-want-C-u-scroll t) :config ;; tweak evil after loading it (evil-mode) (setq evil-want-C-u-scroll t) (eval-after-load "evil-maps" ;; Unset Evil's "M-." keymap so that TAGS definitions can be followed. (define-key evil-normal-state-map "\M-." nil))) (use-package undo-tree :ensure t) ;;;; Heml mode configuration. (use-package helm :diminish :init (helm-mode t) :bind ("M-x" . helm-M-x) ("C-x C-f" . helm-find-files) ("C-x b" . helm-mini) ;; See buffers & recent files; more useful. ("C-x r b" . helm-filtered-bookmarks) ("C-x C-r" . helm-recentf) ;; Search for recently edited files ("C-c i" . helm-imenu) ("C-c h" . helm-command-prefix) ("C-h a" . helm-apropos) :config (setq helm-autoresize-max-height 0 helm-autoresize-min-height 20 helm-split-window-in-side-p t helm-move-to-line-cycle-in-source t helm-ff-search-library-in-sexp t helm-scroll-amount 8 helm-ff-file-name-history-use-recentf t helm-echo-input-in-header-line t) (when (executable-find "firefox") (setq helm-google-suggest-use-curl-p t))) (provide 'jenga-init)