Skip to content

Commit

Permalink
Create a generic jump in buffer command
Browse files Browse the repository at this point in the history
  • Loading branch information
tuhdo authored and syl20bnr committed Jun 15, 2015
1 parent 7fa749a commit 4d21993
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
1 change: 0 additions & 1 deletion contrib/org/packages.el
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,6 @@ Will work on both org-mode and any mode that accepts plain html."
"mhI" 'org-insert-heading

"mI" 'org-clock-in
"mj" 'helm-org-in-buffer-headings
(if dotspacemacs-major-mode-leader-key
(concat "m" dotspacemacs-major-mode-leader-key)
"m,") 'org-ctrl-c-ctrl-c
Expand Down
8 changes: 8 additions & 0 deletions spacemacs/funcs.el
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,14 @@
(defvar spacemacs/prefix-command-string "group:"
"Prefix string for prefix commands.")

(defun spacemacs/jump-in-buffer ()
(interactive)
(cond
((eq major-mode 'org-mode)
(call-interactively 'helm-org-in-buffer-headings))
(t
(call-interactively 'helm-semantic-or-imenu))))

(defun spacemacs/declare-prefix (prefix name)
"Declare a prefix PREFIX. PREFIX is a string describing
a key sequence. NAME is a symbol name used as the prefix command."
Expand Down
2 changes: 1 addition & 1 deletion spacemacs/packages.el
Original file line number Diff line number Diff line change
Expand Up @@ -1431,7 +1431,7 @@ Removes the automatic guessing of the initial value based on thing at point. "
"sg" 'helm-do-grep
"sG" 'spacemacs/helm-do-grep-region-or-symbol
"sL" 'spacemacs/last-search-buffer
"sl" 'helm-semantic-or-imenu)
"sl" 'spacemacs/jump-in-buffer)

;; define the key binding at the very end in order to allow the user
;; to overwrite any key binding
Expand Down

0 comments on commit 4d21993

Please sign in to comment.