A bunch of quality of life improvements for navigation

This commit is contained in:
Wojciech Kozlowski 2019-07-21 22:08:29 +02:00
parent 89a3464610
commit 726cd53ae5
5 changed files with 65 additions and 21 deletions

2
.gitignore vendored
View File

@ -16,6 +16,8 @@ flycheck_*.elc
places
projectile-bookmarks.eld
recentf
session.*
tramp
# Globs
*\~

View File

@ -19,7 +19,8 @@
(defvar emodule/emacs-packages
'(deadgrep
'(ace-jump-mode
deadgrep
discover-my-major
duplicate-thing
expand-region
@ -32,7 +33,6 @@
rainbow-mode
recentf-ext
smartparens
swiper
treemacs-icons-dired
undo-tree
use-package
@ -321,6 +321,13 @@
(global-set-key (kbd "M-Q") 'unfill-paragraph)
;; --------------------------------------------------------------------------
;; `ace-jump-mode'
;; --------------------------------------------------------------------------
(use-package ace-jump-mode
:bind (("C-c SPC" . ace-jump-mode)))
;; --------------------------------------------------------------------------
;; `deadgrep'
;; --------------------------------------------------------------------------
@ -331,7 +338,14 @@
(lambda () (read-directory-name "Base directory: "
nil default-directory t)))
:bind
(("C-x C-g" . deadgrep)))
(("C-x C-g" . deadgrep))
(:map deadgrep-mode-map
("C-o" . deadgrep-open-result-other-window))
:config
(defun deadgrep-open-result-other-window ()
"Open the result in other window without changing to it."
(interactive)
(save-selected-window (deadgrep-visit-result-other-window))))
;; Use rgrep if ripgrep not present.
(unless (executable-find "rg")
@ -510,11 +524,14 @@
(use-package smartparens
:config
(require 'smartparens-config)
(sp-with-modes '(c-mode c++-mode)
(sp-local-pair "<" ">"))
(smartparens-global-mode t)
(show-smartparens-global-mode t)
(require 'smartparens-config)
;; Key-bindings -----------------------------------------------------------
(define-key smartparens-mode-map (kbd "C-M-f") 'sp-forward-sexp)
@ -572,16 +589,6 @@
;; Do not highlight space between parentheses.
sp-highlight-pair-overlay nil))
;; --------------------------------------------------------------------------
;; Configure `swiper'.
;; --------------------------------------------------------------------------
(use-package swiper
:bind
(("M-s M-s" . swiper))
:config
(setq ivy-count-format "%d/%d "))
;; --------------------------------------------------------------------------
;; `tramp'
;; --------------------------------------------------------------------------

View File

@ -19,8 +19,10 @@
(defvar emodule/helm-packages
'(helm
helm-projectile)
'(ace-jump-helm-line
helm
helm-projectile
swiper-helm)
)
@ -29,6 +31,20 @@
(defun emodule/helm-init ()
"Initialise the `helm' module."
;; --------------------------------------------------------------------------
;; `ace-jump-helm-line'
;; --------------------------------------------------------------------------
(use-package ace-jump-helm-line
:after helm
:bind
(:map helm-map
("C-'" . ace-jump-helm-line)))
;; --------------------------------------------------------------------------
;; `helm'
;; --------------------------------------------------------------------------
(use-package helm
:init
(require 'helm-config)
@ -109,7 +125,7 @@
(global-set-key (kbd "C-c h M-o") 'helm-occur))
;; ------------------------------------------------------------------------
;; Configure projectile.
;; `helm-projectile'
;; ------------------------------------------------------------------------
(use-package helm-projectile
@ -118,6 +134,18 @@
(setq-default projectile-completion-system 'helm)
(helm-projectile-on))
;; --------------------------------------------------------------------------
;; `swiper-helm'
;; --------------------------------------------------------------------------
(use-package swiper-helm
:after helm
:bind
(("C-s" . swiper-helm)
("M-s M-s" . isearch-forward))
:config
(setq swiper-helm-display-function 'helm-default-display-buffer))
)
(provide 'emodule/helm)

View File

@ -176,8 +176,8 @@
(after-init . global-company-mode)
:bind
(:map company-active-map
("C-n" . company-select-next)
("C-p" . company-select-previous))
("C-n" . company-select-next)
("C-p" . company-select-previous))
:config
(setq company-idle-delay 0
company-minimum-prefix-length 3

View File

@ -20,7 +20,7 @@
(defvar emodule/terminal-packages
'()
'(tramp-term)
)
@ -180,6 +180,13 @@
(setq eshell-visual-commands (nconc eshell-visual-commands '("htop"
"tmux"))))
;; --------------------------------------------------------------------------
;; `tramp-term'
;; --------------------------------------------------------------------------
(use-package tramp-term
:defer t)
)
(provide 'emodule/terminal)