From d235c25acd453812c5525834ce0afe9bbd4973af Mon Sep 17 00:00:00 2001 From: Bozhidar Batsov Date: Sun, 10 Mar 2013 19:44:10 +0200 Subject: [PATCH] Some long overdue keybinding doc improvements --- README.md | 105 ++++++++++++++++++++++++++++++------------------------ 1 file changed, 59 insertions(+), 46 deletions(-) diff --git a/README.md b/README.md index 1c8af7b..edbaea2 100644 --- a/README.md +++ b/README.md @@ -182,59 +182,72 @@ extensions to keybindings. #### Global -* `C-M-h` - `backward-kill-word` (as in Bash/Zsh) -* `C-x \` - `align-regexp` -* `C-+` - `text-scale-increase` -* `C--` - `text-scale-decrease` -* `C-x O` - return you to the previous window (the inverse of `other-window` (`C-x o`)) -* `C-x ^` - `join-line` -* `C-x p` - `proced` (manage processes form Emacs, works only in Linux) -* `C-x m` - start eshell -* `C-x M-m` - start your default shell -* `C-x C-m` - sames as `M-x` -* `C-h A` - `apropos` (search in all Emacs symbols) -* `M-\` - `hippie-expand` (a replacement for the default `dabbrev-expand`) -* `C-x C-b` - `ibuffer` (a replacement for the default `buffer-list`) -* `F12` - toggle the Emacs menu bar -* `C-x g` - open Magit's status buffer -* `C-=` - `expand-region` (incremental text selection) +Keybinding | Description +-------------------|------------------------------------------------------------ +C-M-h | Kill the previous word(`backward-kill-word`). (as in Bash/Zsh) +C-x \ | `align-regexp` +C-+ | Increase font size(`text-scale-increase`). +C-- | Decrease font size(`text-scale-decrease`). +C-x O | Go back to previous window (the inverse of `other-window` (`C-x o`)). +C-x ^ | Join two lines into one(`join-line`). +C-x p | Start `proced` (manage processes form Emacs, works only in Linux). +C-x m | Start `eshell`. +C-x M-m | Start your default shell. +C-x C-m | Alias for `M-x`. +C-h A | Run `apropos` (search in all Emacs symbols). +M-\ | Run `hippie-expand` (a replacement for the default `dabbrev-expand`). +C-x C-b | Open `ibuffer` (a replacement for the default `buffer-list`). +F12 | Toggle the Emacs menu bar. +C-x g | Open Magit's status buffer. +C-= | Run `expand-region` (incremental text selection). #### Prelude Mode -* `C-c o` - open the currently visited file with external program -* `C-c g` - search in Google for the thing under point (or an interactive query) -* `shift+return` - insert an empty line and indent it properly (as in most IDEs) -* `control+shift+up` - move the current line up -* `control+shift+down` - move the current line down -* `C-c n` - fix indentation in buffer and strip whitespace -* `C-c f` - open recently visitted file -* `C-M-\` - indent region (if selected) or the entire buffer -* `C-c u` - open URL in your default browser -* `C-c e` - eval a bit of Emacs Lisp code and replace it with its result -* `C-c s` - swap two active windows -* `C-c d` - duplicate the current line (or region) -* `C-c r` - rename the currently visited file and buffer -* `C-c t` - open a terminal emulator (`ansi-term`) -* `C-c k` - kill all open buffers except the one you're currently in -* `C-c h` - open Helm (a useful means of navigating your buffers and project files) +Keybinding | Description +-------------------|------------------------------------------------------------ +C-c o | Open the currently visited file with an external program. +C-c g | Search in Google for the thing under point (or an interactive query). +S-RET | Insert an empty line and indent it properly (as in most IDEs). +C-S-up | Move the current line up. +C-S-down | Move the current line down. +C-c n | Fix indentation in buffer and strip whitespace. +C-c f | Open recently visitted file. +C-M-\ | Indent region (if selected) or the entire buffer. +C-c u | Open URL in your default browser. +C-c e | Eval a bit of Emacs Lisp code and replace it with its result. +C-c s | Swap two active windows. +C-c d | Duplicate the current line (or region). +C-c r | Rename the currently visited file and buffer. +C-c t | Open a terminal emulator (`ansi-term`). +C-c k | Kill all open buffers except the one you're currently in. +C-c h | Open Helm (a useful means of navigating your buffers and project files). #### Projectile -Here's a list of the interactive Emacs Lisp functions, provided by projectile: +Here's a list of functionality provided by [Projectile](https://github.com/bbatsov/prelude): -* `projectile-find-file` C-c p f -* `projectile-grep` C-c p g -* `projectile-switch-to-buffer` C-c p b -* `projectile-multi-occur` C-c p o -* `projectile-replace` C-c p r -* `projectile-invalidate-cache` C-c p i -* `projectile-regenerate-tags` C-c p t -* `projectile-kill-buffers` C-c p k -* `projectile-dired` C-c p d -* `projectile-recentf` C-c p e -* `projectile-ack` C-c p a -* `projectile-compile-project` C-c p l -* `projectile-test-project` C-c p p +Keybinding | Description +-------------------|------------------------------------------------------------ +C-c p f | Display a list of all files in the project. With a prefix argument it will clear the cache first. +C-c p T | Display a list of all test files(specs, features, etc) in the project. +C-c p g | Run grep on the files in the project. +C-c p b | Display a list of all project buffers currently open. +C-c p o | Runs `multi-occur` on all project buffers currently open. +C-c p r | Runs interactive query-replace on all files in the projects. +C-c p i | Invalidates the project cache (if existing). +C-c p R | Regenerates the projects `TAGS` file. +C-c p k | Kills all project buffers. +C-c p d | Opens the root of the project in `dired`. +C-c p e | Shows a list of recently visited project files. +C-c p a | Runs `ack` on the project. Requires the presence of `ack-and-a-half`. +C-c p l | Runs a standard compilation command for your type of project. +C-c p p | Runs a standard test command for your type of project. +C-c p z | Adds the currently visited to the cache. +C-c p s | Display a list of known projects you can switch to. + +If you ever forget any of Projectile's keybindings just do a: + +C-c p C-h ### Automatic package installation