Skip to content

Instantly share code, notes, and snippets.

@hectorperez
Last active August 29, 2015 14:02
Show Gist options
  • Save hectorperez/1030f2acf37a6b2229a9 to your computer and use it in GitHub Desktop.
Save hectorperez/1030f2acf37a6b2229a9 to your computer and use it in GitHub Desktop.
Vim: Notes
:e. (e-space-dot) gives a browsable current directory - then you can /-search for name fragments
# http://stackoverflow.com/questions/573039/any-shortcut-to-open-file-in-vim
Others:
:split
:vsplit
Ctrl+w+w / Ctrl+Shift+w
:res +10 # http://vim.wikia.com/wiki/Resize_splits_more_quickly
:w !pbcopy # copy to clipboard
:set paste # fix indentation when pasting
:g/profile/d # delete all lines containing "profile"
Ctrl-O (go to an older position in jump lis) / undo gf
:b# (go to last viewed file)
:b search buffer
@: The last command entered with ':' can be repeated with @: and further repeats can be done with @@ # http://vim.wikia.com/wiki/Repeat_last_colon_command
https://github.com/scrooloose/nerdcommenter
,cc comment lines (, -> leader)
,cu uncomment
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment