2015-06-06 06:40:33 -04:00
|
|
|
;;; my-commands.el
|
|
|
|
|
2016-05-29 00:41:52 -04:00
|
|
|
(eval-when-compile (require 'core-defuns))
|
|
|
|
|
2016-05-20 19:08:02 -04:00
|
|
|
;;; Rewritten commands
|
2016-05-20 22:37:30 -04:00
|
|
|
(ex! "g[lobal]" 'doom:evil-ex-global)
|
2016-05-20 19:08:02 -04:00
|
|
|
|
|
|
|
;;; Custom commands
|
2015-12-11 16:51:04 -05:00
|
|
|
;; Emacs utilities
|
2016-05-20 22:37:30 -04:00
|
|
|
(ex! "echo" 'doom:echo)
|
2016-06-04 22:47:20 -04:00
|
|
|
(ex! "minor" 'describe-minor-mode) ; list minor modes
|
2016-05-24 22:15:44 -04:00
|
|
|
(ex! "bc[omp]" 'doom:byte-compile)
|
|
|
|
(ex! "re[load]" 'doom-reload)
|
|
|
|
(ex! "re[load]au" 'doom-reload-autoloads)
|
2016-06-08 21:08:19 -04:00
|
|
|
(ex! "clog" 'clm/toggle-command-log-buffer)
|
2016-05-24 22:15:44 -04:00
|
|
|
|
2016-04-04 12:07:32 -04:00
|
|
|
;; Quick mapping keys to commands, allows :nmap \m !make
|
2016-05-20 22:37:30 -04:00
|
|
|
(ex! "imap" 'doom:imap)
|
|
|
|
(ex! "mmap" 'doom:mmap)
|
|
|
|
(ex! "nmap" 'doom:nmap)
|
|
|
|
(ex! "omap" 'doom:omap)
|
|
|
|
(ex! "vmap" 'doom:vmap)
|
2016-05-24 22:15:44 -04:00
|
|
|
|
2015-12-11 16:51:04 -05:00
|
|
|
;; Editing
|
2016-05-20 22:37:30 -04:00
|
|
|
(ex! "@" 'doom/evil-macro-on-all-lines)
|
|
|
|
(ex! "al[ign]" 'doom:align)
|
|
|
|
(ex! "htmle[nt]" 'doom/html-entities) ; encode/decode html entities
|
2016-05-20 19:08:02 -04:00
|
|
|
(ex! "ie[dit]" 'evil-multiedit-ex-match)
|
2016-05-20 22:37:30 -04:00
|
|
|
(ex! "na[rrow]" 'doom:narrow)
|
2016-06-04 22:47:20 -04:00
|
|
|
(ex! "mru" 'doom:ivy-recentf) ; show recent files
|
2016-05-20 19:08:02 -04:00
|
|
|
(ex! "ref[actor]" 'emr-show-refactor-menu)
|
2016-05-20 22:37:30 -04:00
|
|
|
(ex! "reo[rient]" 'doom/window-reorient) ; scroll all windows to left
|
|
|
|
(ex! "retab" 'doom:whitespace-retab)
|
|
|
|
(ex! "settr[im]" 'doom:toggle-delete-trailing-whitespace)
|
|
|
|
(ex! "snip[pets]" 'doom:yas-snippets) ; open snippet
|
|
|
|
(ex! "tsnip[pets]" 'doom:yas-file-templates) ; open file template
|
|
|
|
(ex! "wal[ign]" 'doom:whitespace-align) ; align by spaces
|
2016-05-24 22:15:44 -04:00
|
|
|
(ex! "date" 'doom:insert-date)
|
|
|
|
|
2015-12-11 16:51:04 -05:00
|
|
|
;; External resources
|
2016-06-05 00:54:23 -04:00
|
|
|
(ex! "dash" 'doom:docs-lookup) ; look up documentation
|
2016-05-24 22:15:44 -04:00
|
|
|
(ex! "db" 'doom:db)
|
|
|
|
(ex! "dbu[se]" 'doom:db-select)
|
2016-05-20 19:08:02 -04:00
|
|
|
(ex! "http" 'httpd-start) ; start http server
|
2016-06-08 21:08:43 -04:00
|
|
|
(ex! "rx" 'doom:regex) ; open re-builder
|
2016-05-20 22:37:30 -04:00
|
|
|
(ex! "repl" 'doom:repl) ; invoke or send to repl
|
2016-06-06 20:03:11 -04:00
|
|
|
(ex! "sh[ell]" 'doom/eshell)
|
2016-05-20 22:37:30 -04:00
|
|
|
(ex! "t[mux]" 'doom:tmux) ; send to tmux
|
|
|
|
(ex! "tcd" 'doom:tmux-cd) ; cd to default-directory in tmux
|
2016-05-21 23:12:50 -04:00
|
|
|
(ex! "x" 'doom:scratch-or-org)
|
2016-05-24 22:15:44 -04:00
|
|
|
|
2015-12-11 16:51:04 -05:00
|
|
|
;; GIT
|
2016-05-20 22:37:30 -04:00
|
|
|
(ex! "ga[dd]" 'doom/vcs-stage-hunk)
|
|
|
|
(ex! "gre[vert]" 'doom/vcs-revert-hunk)
|
2016-05-24 22:57:42 -04:00
|
|
|
(ex! "gbr[owse]" 'doom:git-browse) ; show file in github/gitlab
|
|
|
|
(ex! "gbi[ssues]" 'doom/git-issues) ; show github issues
|
|
|
|
|
2015-12-11 16:51:04 -05:00
|
|
|
;; Dealing with buffers
|
2016-05-20 22:37:30 -04:00
|
|
|
(ex! "k[ill]" 'doom/kill-real-buffer) ; Kill current buffer
|
|
|
|
(ex! "k[ill]all" 'doom:kill-all-buffers) ; Kill buffers (bang = in project)
|
|
|
|
(ex! "k[ill]b" 'doom:kill-buried-buffers) ; Kill buried buffers
|
|
|
|
(ex! "k[ill]m" 'doom:kill-matching-buffers) ; kill buffers by regexp
|
|
|
|
(ex! "k[ill]o" 'doom:kill-other-buffers) ; kill other buffers
|
|
|
|
(ex! "k[ill]u" 'doom/kill-unreal-buffers) ; kill unreal buffers
|
|
|
|
(ex! "l[ast]" 'doom/popup-last-buffer) ; pop up last popup
|
|
|
|
(ex! "m[sg]" 'doom/popup-messages) ; open *messages* in popup
|
2016-05-24 22:15:44 -04:00
|
|
|
|
2015-12-11 16:51:04 -05:00
|
|
|
;; Project navigation
|
2016-06-04 22:47:20 -04:00
|
|
|
(ex! "a" 'projectile-find-other-file)
|
|
|
|
(ex! "ag" 'doom:ivy-ag-search)
|
|
|
|
(ex! "ag[cw]d" 'doom:ivy-ag-search-cwd)
|
2016-05-20 22:37:30 -04:00
|
|
|
(ex! "cd" 'doom:cd)
|
2016-06-04 22:47:20 -04:00
|
|
|
(ex! "sw[iper]" 'doom:ivy-swiper) ; in-file search
|
2016-05-24 22:15:44 -04:00
|
|
|
|
2015-12-11 16:51:04 -05:00
|
|
|
;; Project tools
|
2016-05-20 22:37:30 -04:00
|
|
|
(ex! "build" 'doom:build)
|
2016-05-24 22:15:44 -04:00
|
|
|
(ex! "debug" 'doom:debug)
|
|
|
|
(ex! "er[rors]" 'doom/flycheck-errors)
|
2016-05-20 22:37:30 -04:00
|
|
|
(ex! "ma[ke]" 'doom:build)
|
2016-05-24 22:15:44 -04:00
|
|
|
|
2015-12-11 16:51:04 -05:00
|
|
|
;; File operations
|
2016-05-20 22:37:30 -04:00
|
|
|
(ex! "mv" 'doom:file-move)
|
|
|
|
(ex! "rm" 'doom:file-delete)
|
2016-05-24 22:15:44 -04:00
|
|
|
|
2015-12-11 16:51:04 -05:00
|
|
|
;; Presentation/demo
|
2016-05-28 21:51:21 -04:00
|
|
|
(ex! "big" 'doom:big-mode)
|
2016-05-20 22:37:30 -04:00
|
|
|
(ex! "full[scr]" 'doom:toggle-fullscreen)
|
2016-05-24 22:15:44 -04:00
|
|
|
|
2016-01-02 15:08:49 -05:00
|
|
|
;; Sessions/tabs
|
2016-06-17 23:48:20 -04:00
|
|
|
(ex! "sl[oad]" 'doom:workgroup-load)
|
|
|
|
(ex! "ss[ave]" 'doom:workgroup-save)
|
2016-05-20 22:37:30 -04:00
|
|
|
(ex! "tabc[lose]" 'doom:kill-tab)
|
|
|
|
(ex! "tabc[lose]o" 'doom:kill-other-tabs)
|
|
|
|
(ex! "tabl[ast]" 'doom:switch-to-tab-last)
|
|
|
|
(ex! "tabn[ew]" 'doom:tab-create)
|
|
|
|
(ex! "tabn[ext]" 'doom:switch-to-tab-right)
|
|
|
|
(ex! "tabp[rev]" 'doom:switch-to-tab-left)
|
|
|
|
(ex! "tabr[ename]" 'doom:tab-rename)
|
|
|
|
(ex! "tabs" 'doom/tab-display)
|
2016-05-24 22:15:44 -04:00
|
|
|
|
2016-03-01 01:59:36 -05:00
|
|
|
;; Org-mode
|
2016-06-08 03:50:20 -04:00
|
|
|
(add-hook! org-mode
|
|
|
|
;;(ex! "org" 'doom:org-helm-search) ; search org notes
|
|
|
|
(ex! "att[ach]" 'doom:org-attach) ; attach file to org file
|
|
|
|
(ex! "link" 'doom:org-link)
|
|
|
|
(ex-local! "vlc" 'doom-org-insert-vlc))
|
2016-03-31 03:17:15 -04:00
|
|
|
|
2015-06-06 06:40:33 -04:00
|
|
|
(provide 'my-commands)
|
|
|
|
;;; my-commands.el ends here
|