• Shuffle
    Toggle On
    Toggle Off
  • Alphabetize
    Toggle On
    Toggle Off
  • Front First
    Toggle On
    Toggle Off
  • Both Sides
    Toggle On
    Toggle Off
  • Read
    Toggle On
    Toggle Off
Reading...
Front

Card Range To Study

through

image

Play button

image

Play button

image

Progress

1/53

Click to flip

Use LEFT and RIGHT arrow keys to navigate between flashcards;

Use UP and DOWN arrow keys to flip the card;

H to show hint;

A reads text to speech;

53 Cards in this Set

  • Front
  • Back
replace ^M with newlines
:% s/^M/\r/g
replace the current search result with 'bar'
:%s//bar/g
search for word under cursor
* or #
open scratch buffer
\b
make windows equal size
<c-w>=
resize windows
<D-arrows>
command key for mac
<D-...> in the gvimrc file
undo
\u
redo
\r
next buffer
\h
open the command line window
q:
execute a command in the command line window
<cr>
list snippets
<c-\> while in insert mode
edit custom snippets
<c-\> while in normal mode
Capture output of the "verbose map" command
:redir @a
:verbose map
:redir END
Select a line of text
<s-v> shift-v
select a block of text
<c-v> control -v
select the last visual selection
gv
start fugitive git windows
:Gstatus
\g
add or reset a file in git
\g # launch fugitive
- # dash
add or reset a file in git interactively, so that you can see the patch before it is added
\g #launch fugitive
p # the letter p
if you make a mistake and need to add something to the last commit what do you do?
\g # launch fugitive
cA # commits and uses the same commit message as last time
ca # commits and changes the commit message
Commit in Git
\g # launch fugitive
C # capital c to commit the message
Do a diff against the currently committed version of the file
\gd
Jump backwards to the previous start of a change in vimdiff
[c
Jump forwards to the next start of a change in vimdiff
]c
get the contents of the other diff section in vimdiff
do # the o stands for obtain from the other side
put the contents of the other diff section in vimdiff
dp
see the log of previous revisions of the document
\gl # the use [q or ]q to cycle through quick list
merge a set of git commits into one
It's called sqaushing and is invoked using
:Git rebase -i HEAD~2
which will merge the last 2 commits into one
copy register into command line or search
You can type Ctrl-R to insert a register when in insert mode, or when typing in the command or search line. When you press Ctrl-R you will see " (quote) to prompt you to finish the command by entering a register. For example, press Ctrl-R then a to insert the contents of the a register, or Ctrl-R then " to insert the contents of the unnamed register.
open quickfix list
:copen
quickfix previous and next
[q previous
]q next
grep for something in a file
:Ack
change quote to double quote
cs'" # means change surroundings
remove brackets from [ foo bar ]
ds] # delete surroundings "]"
add brackets to this line
yss]
yank everything between the curly braces
{
my stuff
}
yi{ # that's yank in between and the characters, but not including the lines containing {
select everything between the curly braces
{
my stuff
}
vi{ # that's yank in between and the characters, but not including the lines containing {
select a paragraph
vip # visual mode in between paragraph
go to the highlighted section of help
^]
go back in help
^t # think top
change the word until the next _
ct_ # change to underscore
format the paragraph
gwap
delete all the lines that do not contain the word "warning"
:v/warning/d
replace current line with the output of the date command
!!date
move backwards one word + specials chars
B
mover forwards one word + special chars
W
record a macro and store it in register m
qm <... do whatever ..> q
run a macro in the m register
@m
run the macro m on all the lines that match a pattern
:g/<pattern>/normal @m
show the runtime path
:set runtimepath?
transpose two characters
xp # as in x out and print