doomemacs/private/my-commands.el

114 lines
4.2 KiB
EmacsLisp
Raw Normal View History

2015-06-06 18:40:33 +08:00
;;; my-commands.el
2016-05-29 12:41:52 +08:00
(eval-when-compile (require 'core-defuns))
2016-05-21 07:08:02 +08:00
;;; Rewritten commands
2016-05-21 10:37:30 +08:00
(ex! "g[lobal]" 'doom:evil-ex-global)
2016-05-21 07:08:02 +08:00
;;; Custom commands
NARF v0.7.0 vcs: + +git-gutter to conf-modes; -git-gutter from evil-insert-state-exit + switch github-browse-file for browse-at-remote + fix <leader>ob; add <leader>d[./sr] vc bindings + vc-annotate bindings and initial state Workgroups2 integration: + don't mess with buffers (speeds up emacs a lot!) + unicode numbers in display + single display function + remember workgroup uid instead (and smarter :tabrename) + clean up after wg update Org-mode + give highlight precedence to links in org-mode + enable encryption + config clean up + use different font for org + exclude attachments in recentf + redo latex and inline-image config + add narf/org-open-notes + update file templates for org CRM Mode-line + polish mode-line + decouple from spaceline-segments.el + refactor narf|spaceline-env-update + add macro-recording and buffer-size indicators to mode-line + python: '2>&1' in env-command + flycheck fringe indicator: change to arrow Aesthetics + update narf-dark-theme + add narf-minibuffer-active face + change writing indicator in writing-mode Misc + fix whitespace in display-startup-echo-area-message + reset fonts for more unicode characters + custom imenu entries + helm-imenu fontification + enable yascroll-bar in REPLs + reorganize my-commands.el + force quit iedit on ESC in normal mode + update snippets submodule + remove ido init (helm handles it all) [EXPERIMENTAL] + back to Terminus(TTF) font + popwin: update config for git-gutter and vc-diff windows + highlight :g[lobal] and :al[ign] matches + decouple narf/get-buffers+narf/get-all-buffers from wg-mess-with-buffer-list + fix narf/helm-buffers-dwim (add interactive form)
2015-12-12 05:51:04 +08:00
;; Emacs utilities
2016-05-21 10:37:30 +08:00
(ex! "echo" 'doom:echo)
2016-06-05 10:47:20 +08:00
(ex! "minor" 'describe-minor-mode) ; list minor modes
2016-05-25 10:15:44 +08:00
(ex! "bc[omp]" 'doom:byte-compile)
(ex! "re[load]" 'doom-reload)
(ex! "re[load]au" 'doom-reload-autoloads)
2016-06-09 09:08:19 +08:00
(ex! "clog" 'clm/toggle-command-log-buffer)
2016-05-25 10:15:44 +08:00
2016-04-05 00:07:32 +08:00
;; Quick mapping keys to commands, allows :nmap \m !make
2016-05-21 10:37:30 +08:00
(ex! "imap" 'doom:imap)
(ex! "mmap" 'doom:mmap)
(ex! "nmap" 'doom:nmap)
(ex! "omap" 'doom:omap)
(ex! "vmap" 'doom:vmap)
2016-05-25 10:15:44 +08:00
NARF v0.7.0 vcs: + +git-gutter to conf-modes; -git-gutter from evil-insert-state-exit + switch github-browse-file for browse-at-remote + fix <leader>ob; add <leader>d[./sr] vc bindings + vc-annotate bindings and initial state Workgroups2 integration: + don't mess with buffers (speeds up emacs a lot!) + unicode numbers in display + single display function + remember workgroup uid instead (and smarter :tabrename) + clean up after wg update Org-mode + give highlight precedence to links in org-mode + enable encryption + config clean up + use different font for org + exclude attachments in recentf + redo latex and inline-image config + add narf/org-open-notes + update file templates for org CRM Mode-line + polish mode-line + decouple from spaceline-segments.el + refactor narf|spaceline-env-update + add macro-recording and buffer-size indicators to mode-line + python: '2>&1' in env-command + flycheck fringe indicator: change to arrow Aesthetics + update narf-dark-theme + add narf-minibuffer-active face + change writing indicator in writing-mode Misc + fix whitespace in display-startup-echo-area-message + reset fonts for more unicode characters + custom imenu entries + helm-imenu fontification + enable yascroll-bar in REPLs + reorganize my-commands.el + force quit iedit on ESC in normal mode + update snippets submodule + remove ido init (helm handles it all) [EXPERIMENTAL] + back to Terminus(TTF) font + popwin: update config for git-gutter and vc-diff windows + highlight :g[lobal] and :al[ign] matches + decouple narf/get-buffers+narf/get-all-buffers from wg-mess-with-buffer-list + fix narf/helm-buffers-dwim (add interactive form)
2015-12-12 05:51:04 +08:00
;; Editing
2016-05-21 10:37:30 +08: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-21 07:08:02 +08:00
(ex! "ie[dit]" 'evil-multiedit-ex-match)
2016-05-21 10:37:30 +08:00
(ex! "na[rrow]" 'doom:narrow)
2016-06-05 10:47:20 +08:00
(ex! "mru" 'doom:ivy-recentf) ; show recent files
2016-05-21 07:08:02 +08:00
(ex! "ref[actor]" 'emr-show-refactor-menu)
2016-05-21 10:37:30 +08: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-25 10:15:44 +08:00
(ex! "date" 'doom:insert-date)
NARF v0.7.0 vcs: + +git-gutter to conf-modes; -git-gutter from evil-insert-state-exit + switch github-browse-file for browse-at-remote + fix <leader>ob; add <leader>d[./sr] vc bindings + vc-annotate bindings and initial state Workgroups2 integration: + don't mess with buffers (speeds up emacs a lot!) + unicode numbers in display + single display function + remember workgroup uid instead (and smarter :tabrename) + clean up after wg update Org-mode + give highlight precedence to links in org-mode + enable encryption + config clean up + use different font for org + exclude attachments in recentf + redo latex and inline-image config + add narf/org-open-notes + update file templates for org CRM Mode-line + polish mode-line + decouple from spaceline-segments.el + refactor narf|spaceline-env-update + add macro-recording and buffer-size indicators to mode-line + python: '2>&1' in env-command + flycheck fringe indicator: change to arrow Aesthetics + update narf-dark-theme + add narf-minibuffer-active face + change writing indicator in writing-mode Misc + fix whitespace in display-startup-echo-area-message + reset fonts for more unicode characters + custom imenu entries + helm-imenu fontification + enable yascroll-bar in REPLs + reorganize my-commands.el + force quit iedit on ESC in normal mode + update snippets submodule + remove ido init (helm handles it all) [EXPERIMENTAL] + back to Terminus(TTF) font + popwin: update config for git-gutter and vc-diff windows + highlight :g[lobal] and :al[ign] matches + decouple narf/get-buffers+narf/get-all-buffers from wg-mess-with-buffer-list + fix narf/helm-buffers-dwim (add interactive form)
2015-12-12 05:51:04 +08:00
;; External resources
2016-06-05 12:54:23 +08:00
(ex! "dash" 'doom:docs-lookup) ; look up documentation
2016-05-25 10:15:44 +08:00
(ex! "db" 'doom:db)
(ex! "dbu[se]" 'doom:db-select)
(ex! "go[ogle]" 'doom:google-search)
2016-05-21 07:08:02 +08:00
(ex! "http" 'httpd-start) ; start http server
2016-06-09 09:08:43 +08:00
(ex! "rx" 'doom:regex) ; open re-builder
2016-05-21 10:37:30 +08:00
(ex! "repl" 'doom:repl) ; invoke or send to repl
2016-06-07 08:03:11 +08:00
(ex! "sh[ell]" 'doom/eshell)
2016-05-21 10:37:30 +08:00
(ex! "t[mux]" 'doom:tmux) ; send to tmux
(ex! "tcd" 'doom:tmux-cd) ; cd to default-directory in tmux
(ex! "x" 'doom:scratch-buffer)
2016-05-25 10:15:44 +08:00
NARF v0.7.0 vcs: + +git-gutter to conf-modes; -git-gutter from evil-insert-state-exit + switch github-browse-file for browse-at-remote + fix <leader>ob; add <leader>d[./sr] vc bindings + vc-annotate bindings and initial state Workgroups2 integration: + don't mess with buffers (speeds up emacs a lot!) + unicode numbers in display + single display function + remember workgroup uid instead (and smarter :tabrename) + clean up after wg update Org-mode + give highlight precedence to links in org-mode + enable encryption + config clean up + use different font for org + exclude attachments in recentf + redo latex and inline-image config + add narf/org-open-notes + update file templates for org CRM Mode-line + polish mode-line + decouple from spaceline-segments.el + refactor narf|spaceline-env-update + add macro-recording and buffer-size indicators to mode-line + python: '2>&1' in env-command + flycheck fringe indicator: change to arrow Aesthetics + update narf-dark-theme + add narf-minibuffer-active face + change writing indicator in writing-mode Misc + fix whitespace in display-startup-echo-area-message + reset fonts for more unicode characters + custom imenu entries + helm-imenu fontification + enable yascroll-bar in REPLs + reorganize my-commands.el + force quit iedit on ESC in normal mode + update snippets submodule + remove ido init (helm handles it all) [EXPERIMENTAL] + back to Terminus(TTF) font + popwin: update config for git-gutter and vc-diff windows + highlight :g[lobal] and :al[ign] matches + decouple narf/get-buffers+narf/get-all-buffers from wg-mess-with-buffer-list + fix narf/helm-buffers-dwim (add interactive form)
2015-12-12 05:51:04 +08:00
;; GIT
2016-05-21 10:37:30 +08:00
(ex! "ga[dd]" 'doom/vcs-stage-hunk)
(ex! "gre[vert]" 'doom/vcs-revert-hunk)
2016-05-25 10:57:42 +08:00
(ex! "gbr[owse]" 'doom:git-browse) ; show file in github/gitlab
(ex! "gbi[ssues]" 'doom/git-issues) ; show github issues
2016-09-12 22:34:29 +08:00
(ex! "git" 'doom/git-magit)
2016-05-25 10:57:42 +08:00
NARF v0.7.0 vcs: + +git-gutter to conf-modes; -git-gutter from evil-insert-state-exit + switch github-browse-file for browse-at-remote + fix <leader>ob; add <leader>d[./sr] vc bindings + vc-annotate bindings and initial state Workgroups2 integration: + don't mess with buffers (speeds up emacs a lot!) + unicode numbers in display + single display function + remember workgroup uid instead (and smarter :tabrename) + clean up after wg update Org-mode + give highlight precedence to links in org-mode + enable encryption + config clean up + use different font for org + exclude attachments in recentf + redo latex and inline-image config + add narf/org-open-notes + update file templates for org CRM Mode-line + polish mode-line + decouple from spaceline-segments.el + refactor narf|spaceline-env-update + add macro-recording and buffer-size indicators to mode-line + python: '2>&1' in env-command + flycheck fringe indicator: change to arrow Aesthetics + update narf-dark-theme + add narf-minibuffer-active face + change writing indicator in writing-mode Misc + fix whitespace in display-startup-echo-area-message + reset fonts for more unicode characters + custom imenu entries + helm-imenu fontification + enable yascroll-bar in REPLs + reorganize my-commands.el + force quit iedit on ESC in normal mode + update snippets submodule + remove ido init (helm handles it all) [EXPERIMENTAL] + back to Terminus(TTF) font + popwin: update config for git-gutter and vc-diff windows + highlight :g[lobal] and :al[ign] matches + decouple narf/get-buffers+narf/get-all-buffers from wg-mess-with-buffer-list + fix narf/helm-buffers-dwim (add interactive form)
2015-12-12 05:51:04 +08:00
;; Dealing with buffers
2016-05-21 10:37:30 +08: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-25 10:15:44 +08:00
NARF v0.7.0 vcs: + +git-gutter to conf-modes; -git-gutter from evil-insert-state-exit + switch github-browse-file for browse-at-remote + fix <leader>ob; add <leader>d[./sr] vc bindings + vc-annotate bindings and initial state Workgroups2 integration: + don't mess with buffers (speeds up emacs a lot!) + unicode numbers in display + single display function + remember workgroup uid instead (and smarter :tabrename) + clean up after wg update Org-mode + give highlight precedence to links in org-mode + enable encryption + config clean up + use different font for org + exclude attachments in recentf + redo latex and inline-image config + add narf/org-open-notes + update file templates for org CRM Mode-line + polish mode-line + decouple from spaceline-segments.el + refactor narf|spaceline-env-update + add macro-recording and buffer-size indicators to mode-line + python: '2>&1' in env-command + flycheck fringe indicator: change to arrow Aesthetics + update narf-dark-theme + add narf-minibuffer-active face + change writing indicator in writing-mode Misc + fix whitespace in display-startup-echo-area-message + reset fonts for more unicode characters + custom imenu entries + helm-imenu fontification + enable yascroll-bar in REPLs + reorganize my-commands.el + force quit iedit on ESC in normal mode + update snippets submodule + remove ido init (helm handles it all) [EXPERIMENTAL] + back to Terminus(TTF) font + popwin: update config for git-gutter and vc-diff windows + highlight :g[lobal] and :al[ign] matches + decouple narf/get-buffers+narf/get-all-buffers from wg-mess-with-buffer-list + fix narf/helm-buffers-dwim (add interactive form)
2015-12-12 05:51:04 +08:00
;; Project navigation
2016-06-05 10:47:20 +08:00
(ex! "a" 'projectile-find-other-file)
(ex! "ag" 'doom:ivy-ag-search)
(ex! "ag[cw]d" 'doom:ivy-ag-search-cwd)
2016-05-21 10:37:30 +08:00
(ex! "cd" 'doom:cd)
2016-06-05 10:47:20 +08:00
(ex! "sw[iper]" 'doom:ivy-swiper) ; in-file search
2016-05-25 10:15:44 +08:00
NARF v0.7.0 vcs: + +git-gutter to conf-modes; -git-gutter from evil-insert-state-exit + switch github-browse-file for browse-at-remote + fix <leader>ob; add <leader>d[./sr] vc bindings + vc-annotate bindings and initial state Workgroups2 integration: + don't mess with buffers (speeds up emacs a lot!) + unicode numbers in display + single display function + remember workgroup uid instead (and smarter :tabrename) + clean up after wg update Org-mode + give highlight precedence to links in org-mode + enable encryption + config clean up + use different font for org + exclude attachments in recentf + redo latex and inline-image config + add narf/org-open-notes + update file templates for org CRM Mode-line + polish mode-line + decouple from spaceline-segments.el + refactor narf|spaceline-env-update + add macro-recording and buffer-size indicators to mode-line + python: '2>&1' in env-command + flycheck fringe indicator: change to arrow Aesthetics + update narf-dark-theme + add narf-minibuffer-active face + change writing indicator in writing-mode Misc + fix whitespace in display-startup-echo-area-message + reset fonts for more unicode characters + custom imenu entries + helm-imenu fontification + enable yascroll-bar in REPLs + reorganize my-commands.el + force quit iedit on ESC in normal mode + update snippets submodule + remove ido init (helm handles it all) [EXPERIMENTAL] + back to Terminus(TTF) font + popwin: update config for git-gutter and vc-diff windows + highlight :g[lobal] and :al[ign] matches + decouple narf/get-buffers+narf/get-all-buffers from wg-mess-with-buffer-list + fix narf/helm-buffers-dwim (add interactive form)
2015-12-12 05:51:04 +08:00
;; Project tools
2016-05-21 10:37:30 +08:00
(ex! "build" 'doom:build)
2016-05-25 10:15:44 +08:00
(ex! "debug" 'doom:debug)
(ex! "er[rors]" 'doom/flycheck-errors)
2016-09-09 14:56:28 +08:00
(ex! "todo" 'doom/ivy-tasks)
2016-05-21 10:37:30 +08:00
(ex! "ma[ke]" 'doom:build)
2016-05-25 10:15:44 +08:00
NARF v0.7.0 vcs: + +git-gutter to conf-modes; -git-gutter from evil-insert-state-exit + switch github-browse-file for browse-at-remote + fix <leader>ob; add <leader>d[./sr] vc bindings + vc-annotate bindings and initial state Workgroups2 integration: + don't mess with buffers (speeds up emacs a lot!) + unicode numbers in display + single display function + remember workgroup uid instead (and smarter :tabrename) + clean up after wg update Org-mode + give highlight precedence to links in org-mode + enable encryption + config clean up + use different font for org + exclude attachments in recentf + redo latex and inline-image config + add narf/org-open-notes + update file templates for org CRM Mode-line + polish mode-line + decouple from spaceline-segments.el + refactor narf|spaceline-env-update + add macro-recording and buffer-size indicators to mode-line + python: '2>&1' in env-command + flycheck fringe indicator: change to arrow Aesthetics + update narf-dark-theme + add narf-minibuffer-active face + change writing indicator in writing-mode Misc + fix whitespace in display-startup-echo-area-message + reset fonts for more unicode characters + custom imenu entries + helm-imenu fontification + enable yascroll-bar in REPLs + reorganize my-commands.el + force quit iedit on ESC in normal mode + update snippets submodule + remove ido init (helm handles it all) [EXPERIMENTAL] + back to Terminus(TTF) font + popwin: update config for git-gutter and vc-diff windows + highlight :g[lobal] and :al[ign] matches + decouple narf/get-buffers+narf/get-all-buffers from wg-mess-with-buffer-list + fix narf/helm-buffers-dwim (add interactive form)
2015-12-12 05:51:04 +08:00
;; File operations
2016-05-21 10:37:30 +08:00
(ex! "mv" 'doom:file-move)
(ex! "rm" 'doom:file-delete)
2016-05-25 10:15:44 +08:00
;; Presentation/demo/write-mode
(ex! "big" 'doom:big)
(ex! "full[scr]" 'doom/toggle-fullscreen)
2016-05-25 10:15:44 +08:00
2016-01-03 04:08:49 +08:00
;; Sessions/tabs
(ex! "sl[oad]" 'doom:workgroup-load)
(ex! "ss[ave]" 'doom:workgroup-save)
2016-05-21 10:37:30 +08: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-25 10:15:44 +08:00
;; Org-mode
(ex! "org" 'doom:org-capture)
(add-hook! org-mode
;;(ex! "org" 'doom:org-helm-search) ; search org notes
(ex-local! "att[ach]" 'doom:org-attach) ; attach file to org file
(ex-local! "link" 'doom:org-link)
(ex-local! "vlc" 'doom-org-insert-vlc))
2015-06-06 18:40:33 +08:00
(provide 'my-commands)
;;; my-commands.el ends here