Skip to content

Instantly share code, notes, and snippets.

@jdubwelch
Last active April 3, 2019 19:29
Show Gist options
  • Select an option

  • Save jdubwelch/b81dea96d5236f745abe16dc6858505e to your computer and use it in GitHub Desktop.

Select an option

Save jdubwelch/b81dea96d5236f745abe16dc6858505e to your computer and use it in GitHub Desktop.
My notes about Vim.

Vim

https://github.com/VSCodeVim/Vim

# Yank any lines containing "a999-" in them.
:g/a999-/yank A

# Delete all lines
:1,$d

# Delete lines 3-7
:3,7d

# Change (c = action) 
cw = change word
ci" = change inside "
ci} = change inside {}

# Select an entire function definition to move (from function line)
Vj%

# Change Occurrences of a variable/word
/search
cgn
n
.

# Move Cursor within screen
H # Go to top of screen (High)
M # Go to middle of screen
L # Go to bottom of screen (Low)
ctrl-e # go down two lines but leave cursor on existing line
ctrl-d # move screen and cursor down half a screen
ctrl-f # full screen down
ctrl-b # back full screen

VS Code and Vim

gb a new shortcut we added which is equivalent to cmd-d

Easy Motion

<leader><leader> s <char> Search Character

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment