This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defun j (&optional show-top-candidates) | |
"Use autojump to navigate to a directory in dired-mode. | |
Optional argument SHOW-TOP-CANDIDATES, if non-nil, specifies whether to | |
list the top candidates (as given by `autojump --complete user-input`) in an ido menu, | |
otherwise directly jump to top candidate. | |
Tested with autojump v22.5.3." | |
(interactive "P") | |
(let* ((autojump-candidates-regex "^.*__.__\\(.*\\)") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defun yaml-company-backend (command &optional arg &rest ignored) | |
"A very simple backend for completion of anchors in YAML mode." | |
(interactive (list 'interactive)) | |
(cl-case command | |
(interactive (company-begin-backend 'drdv-yaml-company-backend)) | |
;; Dispatch to handle two cases: | |
;; - words that starts with "*" (anchor suggestions) | |
;; - empty space (job suggestions) | |
(prefix (and (eq major-mode 'yaml-mode) | |
(cond ((looking-back "\\*.*") (match-string 0)) |