Better key bindings for bookmarks
Use default helm action in helm-bookmark buffer
This commit is contained in:
parent
3217db6951
commit
263b842758
19
README.md
19
README.md
|
@ -281,16 +281,23 @@ Key Binding | Description
|
|||
#### Bookmarks
|
||||
|
||||
Bookmarks can be set anywhere in a file. Bookmarks are persistent. They are very
|
||||
useful to jump to/open a known project.
|
||||
useful to jump to/open a known project. `Spacemacs` used `helm-bookmarks` to
|
||||
manage them.
|
||||
|
||||
Bookmarks commands (start with `k`):
|
||||
Open an `helm` window with the current bookmarks by pressing:
|
||||
|
||||
<SPC> h b
|
||||
|
||||
Then in the `helm-bookmarks` buffer:
|
||||
|
||||
Key Binding | Description
|
||||
--------------|----------------------------------------------------------------
|
||||
`<SPC> k d` | delete a bookmark
|
||||
`<SPC> k g` | go to a bookmark using `helm`
|
||||
`<SPC> k r` | rename a bookmark
|
||||
`<SPC> k s` | save a bookmark
|
||||
`CTRL+d` | delete the selected bookmark
|
||||
`CTRL+e` | edit the selected bookmark
|
||||
`CTRL+f` | toggle filename location
|
||||
`CTRL+o` | open the selected bookmark in another window
|
||||
|
||||
To save a new bookmark, just type the name of the bookmark and press `RET`.
|
||||
|
||||
### Window manipulation
|
||||
|
||||
|
|
|
@ -120,12 +120,6 @@
|
|||
(evil-leader/set-key
|
||||
"jh" (lambda () (interactive) (push-mark (point)) (evil-beginning-of-line))
|
||||
"jl" (lambda () (interactive) (push-mark (point)) (evil-end-of-line)))
|
||||
;; bookmarks ------------------------------------------------------------------
|
||||
(evil-leader/set-key
|
||||
"kd" 'bookmark-delete
|
||||
"kg" 'bookmark-jump
|
||||
"kr" 'bookmark-rename
|
||||
"ks" 'bookmark-set)
|
||||
;; Compilation ----------------------------------------------------------------
|
||||
(evil-leader/set-key "cc" 'compile)
|
||||
;; narrow & widen -------------------------------------------------------------
|
||||
|
|
|
@ -429,8 +429,7 @@ which require an initialization must be listed explicitly in the list."
|
|||
:config
|
||||
(setq
|
||||
bookmark-default-file "~/.emacs.d/bookmarks" ; keep my ~/ clean
|
||||
bookmark-save-flag 1) ; autosave each change
|
||||
))
|
||||
bookmark-save-flag 1))) ; autosave each change
|
||||
|
||||
(defun spacemacs/init-buffer-move ()
|
||||
(use-package buffer-move
|
||||
|
@ -957,8 +956,16 @@ which require an initialization must be listed explicitly in the list."
|
|||
(evil-leader/set-key
|
||||
":" 'helm-M-x
|
||||
"bs" 'helm-mini
|
||||
"kil" 'helm-how-kill-ring
|
||||
"hg" 'helm-bookmarks))
|
||||
"hb" 'helm-bookmarks
|
||||
"kil" 'helm-how-kill-ring)
|
||||
;; alter helm-bookmark key bindings to be simpler
|
||||
(defun simpler-helm-bookmark-keybindings ()
|
||||
(define-key helm-bookmark-map (kbd "C-d") 'helm-bookmark-run-delete)
|
||||
(define-key helm-bookmark-map (kbd "C-e") 'helm-bookmark-run-edit)
|
||||
(define-key helm-bookmark-map (kbd "C-f") 'helm-bookmark-toggle-filename)
|
||||
(define-key helm-bookmark-map (kbd "C-o") 'helm-bookmark-run-jump-other-window)
|
||||
(define-key helm-bookmark-map (kbd "C-/") 'helm-bookmark-help))
|
||||
(add-hook 'helm-mode-hook 'simpler-helm-bookmark-keybindings))
|
||||
:config
|
||||
(progn
|
||||
;; helm keybindings tweaks
|
||||
|
|
Loading…
Reference in a new issue