Home

December 14th, 2006

Vim Tip: Pasting with "P"

  • Dec. 14th, 2006 at 2:57 PM
EvilPHish evil fish shlomi fish

Today I suddenly wondered that if "p" (in lowercase) was paste in Vim, what did "P" (in uppercase) do. I guessed that what it did was that it pasted before the line of the cursor, rather than after it. (In a similar fashion to the distinction between "o" and "O"). And that's what it indeed does (:help P).

This is useful because it behaves more like the MS-Windows paste, and also allows one to paste to the first line of the file. I'm now thinking it might be a good idea to go over all the uppercase letter commands in Vim and see what they do because I don't know them all.

Tags:

Latest Month

August 2008
S M T W T F S
     12
3456789
10111213141516
17181920212223
24252627282930
31      

Tags