<style type="text/css">
body {
margin: 1em;
width: 80%;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
}
kbd {
display: inline-block;
margin: 0 .1em;
padding: .1em .6em;
font-family: Arial,"Helvetica Neue",Helvetica,sans-serif;
font-size: 11px;
line-height: 1.4;
color: #242729;
text-shadow: 0 1px 0 #FFF;
background-color: #e1e3e5;
border: 1px solid #adb3b9;
border-radius: 3px;
box-shadow: 0 1px 0 rgba(12,13,14,0.2),0 0 0 2px #FFF inset;
white-space: nowrap;
}
table { border-collapse: collapse; width: 100% }
th, td { padding: 10px; border-bottom: solid 1px grey; }
td:first-child { width: 30% }
</style>
Keystroke |
Command |
Plugin |
q: |
Command window |
- |
Ctrl-s) |
Parenthesis pair |
Surround |
gc |
Comment |
Commentrary |
gq |
Fit text to column |
- |
ga |
Easy align |
Easy align |
\h-s |
Stage hunk |
Gitgutter |
\m |
Add # => to EOL |
vim-ruby-xmpfilter |
\r |
Run xmpfilter on % |
vim-ruby-xmpfilter |
z= |
Fix spell error |
- |
gv |
Reselect |
- |
@: |
Re-run last command |
- |
Ctrl-a |
Increase number |
- |
Ctrl-x |
Decrease number |
- |
- Command window : edit last line to enter new commands then
↵.
- Parenthesis pair : close parenthesis for no surround spaces, open
parenthesis for surround spaces. Any parenthesis type works.
- Reselect : reselects last selection.
- Hunks : \-h followed by
- s : staging
- p : preview
- u : undo
- Easy align: invoke with selection, or give motion/text object. At prompt
*
means all matches (optional) followed by separator to align. There are
many options to change, ie margins.
Snippet |
Function |
def |
function |
defi |
initialize with automatic instance variables |
cla |
class |
module |
module |
req |
require |
reqr |
require relative |
do |
do block |
reqra |
require 'rspec/autorun' |
RS |
RSpec.descibe do ... end |
iiexp |
it { is_expected.to ... } |
Mnemonic |
Text object |
r |
ruby block |
t |
html tags |
Jump points work with the [ or ] followed by mnemonic.
[ jumps backwards, ] jumps forwards.
Mnemonic |
Target |
c |
git hunk |
s |
spell error |
Command |
List |
Files [PATH] |
Files |
GFiles [OPTS] |
Git files |
GFiles? |
Git files |
Buffers |
Open buffers |
Colors |
Color schemes |
Ag [PATTERN] |
search result |
Lines [QUERY] |
Lines in loaded buffers |
BLines [QUERY] |
Lines in the current buffer |
Tags [QUERY] |
Tags in the project |
BTags [QUERY] |
Tags in the current buffer |
Marks |
Marks |
Windows |
Windows |
Locate PATTERN |
locate command output |
History |
v:oldfiles and open buffers |
History: |
Command history |
History/ |
Search history |
Snippets |
Snippets |
Commits |
Git commits |
BCommits |
Git commits for the current buffer |
Commands |
Commands |
Maps |
Normal mode mappings |
Helptags |
Help tags |
Filetypes |
File types |
Ag
doesn't seem to work in $HOME
but works fine in sub folders. When needed
use :grep
and then the quick fix window (:copen
) instead.