Browse files

cool stuff

  • Loading branch information...
1 parent cc0d060 commit 420d700b0c85438e8448da9736042007f93d48ec @mislav committed Jun 21, 2012
Showing with 97 additions and 18 deletions.
  1. +97 −18 README.md
View
115 README.md
@@ -27,23 +27,102 @@ files inside the ".vim" directory.
## Features:
+### `vimrc`
+
* 2 spaces, no tabs
* incremental, case-insensitive search
-* 'Leader' character mapped to "," (comma)
-* `,f` opens file search via :CommandT plugin
-* `,,` switches between two last buffers
-* `<C-j/k/h/l>` switches between windows (no need to prepend `<C-w>`)
-* cursor keys for movement disabled!
-
-## Plugins:
-
-* ack
-* command-t
-* commentary
-* endwise
-* fugitive
-* markdown
-* rails
-* haml
-* scss
-* coffee-script
+* `<CR>` - remove highlighting after search
+* `<C-j/k/h/l>` - switch between splits (no need to prepend `<C-w>`)
+* cursor keys for movement are disabled!
+* `Q` - format lines
+* `,,` alternates between two most recent buffers
+* `,f` - jump to file:
+ * `,F` - search in directory of current buffer
+ * `,gl` - in `lib/`
+ * `,gm` - in `app/models`
+ * `,gv` - in `app/views`
+ * `,gc` - in `app/controllers`
+* `,cf` - search for merge conflicts in buffer
+* `:KillWhitespace` - strip trailing whitespace
+
+### Ack
+
+* `:Ack -w foo_bar --no-js --no-css`
+* `:Ack!` - search, but don't jump to first match
+* `:AckFromSearch`
+* `:AckAdd` - append to existing quickfix list
+
+### Surround
+
+* `cs"'` - change string from double to single quotes
+* `ds(` - delete surrounding parentheses
+* `ysiW]` - surround current WORD with square brackets
+* `ysst` - surround current line in a HTML tag
+* `ysip<c-t>` - nest current paragraph in a HTML tag
+
+Visual mode: `S`. Insert mode: `<c-s>`.
+
+Surround + rails.vim:
+
+* `-``<% -%>`
+* `=``<%= %>`
+* `#``<%# %>`
+* `e` - nest block and append `end` keyword
+* `E` - like `e`, but prompt for text to prepend before block
+
+### Commentary
+
+* `\\{motion}` - comment/uncomment lines that {motion} moves over
+* `\\\` - comment/uncomment [count] lines
+* `{Visual}\\` - comment/uncomment the highlighted lines
+* `\\u` - uncomment the current and adjacent commented lines
+
+### ruby.vim
+
+Motions:
+
+* `]m` / `[m` - next / previous method
+* `]M` / `[M` - end of method definition
+* `]]` / `[[` - next / previous class/module
+* `][` / `[]` - end of class/module
+
+Text objects:
+
+* `am` - a method
+* `im` - inner method
+* `aM` - a class
+* `iM` - inner class
+
+### matchit.vim
+
+`%` alternates between matching HTML tags, class/control flow statements and
+matching `end` in Ruby, and more. Also works in visual mode.
+
+### Tabular
+
+In visual mode:
+
+* `:Tabularize assignment`
+* `:Tabularize argument_list`
+* `:Tabularize /=>`
+
+### Fugitive
+
+* `:Gstatus`, `:Gcommit`
+* `:[range]Gbrowse! -` - copy GitHub URL to code that's currently selected
+* `:[range]Gblame`
+
+### Pathogen
+
+Quickly open vim runtime files:
+
+* `:Vedit`
+* `:Vsplit`
+* `:Vvsplit`
+* `:Vtabedit`
+* `:Vpedit`
+* `:Vread`
+
+Example:
+
+ :Vsp s/pd<Tab>

0 comments on commit 420d700

Please sign in to comment.