2017-02-23 00:06:12 -05:00
|
|
|
(defalias 'ex! 'evil-ex-define-cmd)
|
2017-02-20 00:18:54 -05:00
|
|
|
|
|
|
|
;;; Custom commands
|
|
|
|
;; Emacs utilities
|
2017-02-23 00:06:12 -05:00
|
|
|
(ex! "bc[omp]" '+hlissner:byte-compile)
|
|
|
|
(ex! "clog" 'global-command-log-mode)
|
|
|
|
(ex! "minor" 'describe-minor-mode) ; list minor modes
|
|
|
|
(ex! "re[load]" 'doom/reload)
|
|
|
|
(ex! "re[load]au" 'doom/reload-autoloads)
|
2017-02-20 00:18:54 -05:00
|
|
|
|
|
|
|
;; Editing
|
2017-02-23 00:06:12 -05:00
|
|
|
(ex! "@" '+evil:macro-on-all-lines) ; TODO Test me
|
2017-04-22 21:45:14 -04:00
|
|
|
(ex! "enhtml" '+web:encode-html-entities)
|
|
|
|
(ex! "dehtml" '+web:decode-html-entities)
|
2017-02-23 00:06:12 -05:00
|
|
|
(ex! "ie[dit]" 'evil-multiedit-ex-match)
|
2017-04-22 21:47:17 -04:00
|
|
|
(ex! "na[rrow]" '+evil:narrow-buffer)
|
|
|
|
(ex! "retab" '+evil:retab)
|
2017-02-20 00:18:54 -05:00
|
|
|
|
|
|
|
;; External resources
|
2017-02-23 00:06:12 -05:00
|
|
|
;; TODO (ex! "db" 'doom:db)
|
|
|
|
;; TODO (ex! "dbu[se]" 'doom:db-select)
|
|
|
|
;; TODO (ex! "go[ogle]" 'doom:google-search)
|
|
|
|
(ex! "http" 'httpd-start) ; start http server
|
2017-05-12 14:18:00 +02:00
|
|
|
(ex! "repl" '+eval:repl) ; invoke or send to repl
|
2017-02-23 00:06:12 -05:00
|
|
|
;; TODO (ex! "rx" 'doom:regex) ; open re-builder
|
|
|
|
(ex! "sh[ell]" '+eshell:run)
|
|
|
|
(ex! "t[mux]" '+tmux:run) ; send to tmux
|
|
|
|
(ex! "tcd" '+tmux:cd-here) ; cd to default-directory in tmux
|
2017-04-15 14:55:20 -04:00
|
|
|
(ex! "x" '+doom:scratch-buffer)
|
2017-02-20 00:18:54 -05:00
|
|
|
|
|
|
|
;; GIT
|
2017-05-07 15:10:46 +02:00
|
|
|
(ex! "gist" '+gist:send) ; send current buffer/region to gist
|
|
|
|
(ex! "gistl" '+gist:list) ; list gists by user
|
2017-02-23 00:06:12 -05:00
|
|
|
(ex! "gbrowse" '+vcs/git-browse) ; show file in github/gitlab
|
|
|
|
(ex! "gissues" '+vcs/git-browse-issues) ; show github issues
|
|
|
|
(ex! "git" 'magit-status) ; open magit status window
|
|
|
|
(ex! "gstage" 'magit-stage)
|
|
|
|
(ex! "gunstage" 'magit-unstage)
|
2017-02-20 00:18:54 -05:00
|
|
|
;; TODO :gblame
|
|
|
|
;; TODO :grevert
|
|
|
|
;; TODO :gblame
|
|
|
|
|
|
|
|
;; Dealing with buffers
|
2017-03-04 14:35:56 -05:00
|
|
|
(ex! "clean[up]" 'doom/cleanup-buffers)
|
|
|
|
(ex! "k[ill]" 'doom/kill-this-buffer)
|
|
|
|
(ex! "k[ill]all" '+hlissner:kill-all-buffers)
|
|
|
|
(ex! "k[ill]m" '+hlissner:kill-matching-buffers)
|
|
|
|
(ex! "k[ill]o" 'doom/kill-other-buffers)
|
|
|
|
(ex! "l[ast]" 'doom/popup-restore)
|
|
|
|
(ex! "m[sg]" 'view-echo-area-messages)
|
|
|
|
(ex! "pop[up]" 'doom/popup) ; open current buffer in popup
|
2017-02-20 00:18:54 -05:00
|
|
|
|
|
|
|
;; Project navigation
|
2017-02-23 00:06:12 -05:00
|
|
|
(ex! "a" 'projectile-find-other-file)
|
2017-05-12 11:50:05 +02:00
|
|
|
(ex! "ag" '+ivy:ag)
|
|
|
|
(ex! "agc[wd]" '+ivy:ag-cwd)
|
|
|
|
(ex! "rg" '+ivy:rg)
|
|
|
|
(ex! "rgc[wd]" '+ivy:rg-cwd)
|
2017-02-23 00:06:12 -05:00
|
|
|
(ex! "cd" '+hlissner:cd)
|
|
|
|
(ex! "sw[iper]" '+ivy:swiper) ; in-file search
|
2017-02-20 00:18:54 -05:00
|
|
|
|
|
|
|
;; Project tools
|
2017-02-23 00:06:12 -05:00
|
|
|
(ex! "build" '+eval/build)
|
|
|
|
(ex! "debug" '+debug/run)
|
|
|
|
(ex! "er[rors]" 'flycheck-list-errors)
|
2017-05-10 06:13:14 +02:00
|
|
|
(ex! "todo" '+ivy:todo)
|
2017-02-20 00:18:54 -05:00
|
|
|
|
|
|
|
;; File operations
|
2017-05-12 12:06:56 +02:00
|
|
|
(ex! "mv" '+evil:move-this-file)
|
|
|
|
(ex! "rm" '+evil:delete-this-file)
|
2017-02-20 00:18:54 -05:00
|
|
|
|
|
|
|
;; Sessions/tabs
|
2017-02-23 00:06:12 -05:00
|
|
|
(ex! "sclear" '+workspace/kill-session)
|
2017-03-04 14:35:56 -05:00
|
|
|
(ex! "sl[oad]" '+workspace:load-session)
|
|
|
|
(ex! "ss[ave]" '+workspace:save-session)
|
2017-02-23 00:06:12 -05:00
|
|
|
(ex! "tabc[lose]" '+workspace:delete)
|
|
|
|
(ex! "tabclear" 'doom/kill-all-buffers)
|
2017-03-07 16:23:56 -05:00
|
|
|
(ex! "tabl[ast]" '+workspace/switch-to-last)
|
2017-02-23 00:06:12 -05:00
|
|
|
(ex! "tabload" '+workspace:load)
|
|
|
|
(ex! "tabn[ew]" '+workspace:new)
|
|
|
|
(ex! "tabn[ext]" '+workspace:switch-next)
|
|
|
|
(ex! "tabp[rev]" '+workspace:switch-previous)
|
|
|
|
(ex! "tabr[ename]" '+workspace:rename)
|
|
|
|
(ex! "tabs" '+workspace/display)
|
|
|
|
(ex! "tabsave" '+workspace:save)
|
2017-02-20 00:18:54 -05:00
|
|
|
|
|
|
|
;; Org-mode
|
2017-02-23 00:06:12 -05:00
|
|
|
(ex! "org" '+org:capture)
|