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
;; * IDO/IVY completion menu | |
;; This is originally from https://www.emacswiki.org/emacs/HippieExpand#toc10 | |
;; | |
;; There are a few improvements: | |
;; - It is undo friendly with the addition of save-excursion | |
;; - It will use ivy for the expansion menu if ivy is available, falls back to ido | |
;; - Automatically expands if there is only one possible expansion | |
(defun my-hippie-expand-completions (&optional hippie-expand-function) | |
"Return list of completions generated by `hippie-expand'." |
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
(require 'deferred) | |
(defun rename-tmux-window() | |
(deferred:$ | |
(deferred:process "tmux" "display-message" "-p" "'#I'") | |
(deferred:nextc it | |
(lambda (x) | |
(setq x (replace-regexp-in-string "\'" "" | |
(replace-regexp-in-string "\n\\'" "" x))) | |
(setq w | |
(replace-regexp-in-string "\*" "" |