Wikia

Vim Tips Wiki

Changes: Smarter pasting

Edit

Back to page

(Adjust previous/next navigation + minor manual clean)
(Change <tt> to <code>, perhaps also minor tweak.)
 
Line 11: Line 11:
 
|category2=
 
|category2=
 
}}
 
}}
Using <tt>:put "</tt> pastes text from the default register below the current line. That is useful if some characters within a line have been copied, and you would like the copied text pasted as a separate line.
+
Using <code>:put "</code> pastes text from the default register below the current line. That is useful if some characters within a line have been copied, and you would like the copied text pasted as a separate line.
   
 
Use the following mappings in your [[vimrc]] to make that easier. The first pastes after the current line, while the second pastes before the current line.
 
Use the following mappings in your [[vimrc]] to make that easier. The first pastes after the current line, while the second pastes before the current line.

Latest revision as of 05:37, July 13, 2012

Tip 586 Printable Monobook Previous Next

created 2003 · complexity basic · author Usman Latif · version 5.7


Using :put " pastes text from the default register below the current line. That is useful if some characters within a line have been copied, and you would like the copied text pasted as a separate line.

Use the following mappings in your vimrc to make that easier. The first pastes after the current line, while the second pastes before the current line.

nnoremap ,p :put "<CR>
nnoremap ,P :put! "<CR>

CommentsEdit

Around Wikia's network

Random Wiki