• 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/89

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;

89 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

=

resize windows
command key for mac
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
list snippets
while in insert mode
edit custom snippets

while in normal mode

Capture output of the "verbose map" command

:redir @a
:verbose map
:redir END

Select a line of text
shift-v
select a block of text
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


:Gdiff

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

turn diff off
diffoff ! all the windows not just the current one.
Move to previous unclosed (

[(

Move to previous unclosed {

[{
]( = Move to next unclosed (

](

Move to next unclosed {
]{
redo, opposite of undo
\r
Search backwards after searching forwards
N
select the highlighted completion
^n
Match the (, { etc that the cursor is on
%
visually select and yank
v y
visually select some text and then act on it

v <move> :

Search the contents of help
\fh # :FufHelp
List the available buffers on the top of the screen
\fb # :FufBuffer
Quickly find a line in a file
\fl # FufLine
make text a set of columns
:!column -t # -s x to make x the delimeter
sort text
:!sort -k1 # k1 is key on first line
move to the start of line

0 # zero, better than ^

show contents of registers
:reg
Search for a file

\ff # :FufFile

switch to previous tab
# mac command key plus [
\
switch to next tab

# mac command key plus ]
\

Move to previous paragraph / next paragraph
( )
fold code into the +

set fdm=syntax

move down one fold of code

zj

move up one fold
zk
close a fold
zc
open a fold
zo
toggle current code fold

za

toggle all folded code under cursor

zA

open all folds by one
zr # reduce folding the number folds
open all folds completely

zR # reduce folding completely

close all folds by one

zm # more folding

close all folds in then entire buffer

zM # more folding

open chrome debugger tool

command option c (think c for console)

Switch to last buffer quickly

CTRL-^


:help CTRL-^

See a history of the current file in fugitive

:Glog -- %



The percent is for the current file. -- gives the extra git info.