This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"+y |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
text selection | |
If you want to do the same thing to a collection of lines, like cut, copy, sort, or format, you first need to select the text. Get out of insert mode, hit one of the options below, and then move up or down a few lines. You should see the selected text highlighted. | |
V - selects entire lines | |
v - selects range of text | |
ctrl-v - selects columns | |
gv - reselect block |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
shift v to select block | |
Press > to indent (shift text one 'shiftwidth' to the right), or press < to shift left. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Crtl+ww cycle though all windows | |
Crtl+wh takes you left a window | |
Crtl+wj takes you down a window | |
Crtl+wk takes you up a window | |
Crtl+wl takes you right a window |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
To cut-and-paste or copy-and-paste: | |
Position the cursor at the beginning of the text you want to cut/copy. | |
Press v to begin character-based visual selection, or V to select whole lines, or Ctrl-v or Ctrl-q to select a block. | |
Move the cursor to the end of the text to be cut/copied. While selecting text, you can perform searches and other advanced movement. | |
Press d (delete) to cut, or y (yank) to copy. | |
Move the cursor to the desired paste location. | |
Press p to paste after the cursor, or P to paste before. | |
above for buffer inside vim |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
https://github.com/powerline/powerline |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
:t. will duplicate the line, | |
:t 7 will copy it after line 7, | |
:,+t0 will copy current and next line at the beginning of the file (,+ is a synonym for the range .,.+1), | |
:1,t$ will copy lines from beginning till cursor position to the end (1, is a synonym for the range 1,.). | |
If you need to move instead of copying, use :m instead of :t. | |
This can be really powerful if you combine it with :g or :v: | |
:v/foo/m$ will move all lines not matching the pattern “foo” to the end of the file. | |
:+,$g/^\s*class\s\+\i\+/t. will copy all subsequent lines of the form class xxx right after the cursor. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
http://www.vim.org/scripts/script.php?script_id=311 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
https://github.com/othree/xml.vim |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The simplest and fastest way is to use: : % y + and then go over to Google Docs (or wherever) and paste. | |
Another way is g g " + y G but you will likely admitt that the above is faster and easier. |