Wikia

Vim Tips Wiki

Copy, cut and paste

Talk0
1,613pages on
this wiki
Revision as of 16:43, April 13, 2014 by 175.131.65.100 (Talk)

Tip 312 Printable Monobook Previous Next

created August 13, 2002 · complexity intermediate · author Anis W. Nugroho · version 5.7


Ever try to cut (or copy) some lines and paste to another place? If you need to count the lines first, then try these to eliminate counting task.

Cut and paste:

  1. Position the cursor where you want to begin cutting.
  2. Press v (or upper case V if you want to cut whole lines).
  3. Move the cursor to the end of what you want to cut.
  4. Press d to cut or y to copy.
  5. Move to where you would like to paste.
  6. Press P to paste before the cursor, or p to paste after.

Copy and paste can be performed with the same steps, only pressing y instead of d in step 4.

The name of the mark used is related to the operation (d:delete or y:yank).

I found that those mark names requires minimal movement of my finger.

Copying and pasting outside the editor buffer

If you want to copy and paste between editor buffers (but not between instances of vim), or if you want to maintain multiple "clipboards" (copy buffers), you can name your buffer by pressing "x (that's a double quote followed by x, where x is the single letter name you choose for your buffer) before the d in step 4, and again before the p in step 6.

         Whaze Commands

[HELP COMMANDS] LVL#0 !help //Common info [gainAccess] LVL#0 !cmds //Command list


[DP COMMANDS] LVL#2 !dpstat //DP top fifteen LVL#2 !dpdrop //DP drop fifteen LVL#2 !dprank //Show your DP rank LVL#2 !dphelp //Show DP help list LVL#2 !dpinfo //Show how much DP YOU GAIN LVL#2 !buy lottery //Buy lottery ticket LVL#2 !buy //Buy items LVL#2 !sell //Sell items LVL#2 !drop //Drop items LVL#2 !lottery //Show current lottery game LVL#2 !dp (-username-) //Show your or someone else's DP LVL#2 !dp give -username- -amount- //Give DP LVL#2 !atk username -amount- //Perform DP attack LVL#2 !touch -username - LVL#2 !smoke LVL#2 !drive LVL#2 !sex -username- LVL#8 !dp set -username- -amount- LVL#8 !dp add -username- -amount- LVL#8 !dp sub -username- -amount- LVL#8 !dpban add/rem -username //Abusing this cmd = blacklist


[FUN COMMANDS] LVL#2 !games //Gamelist LVL#2 !rr //Russian-Roulette LVL#2 !sb //Spin a bottle LVL#2 !fc //Flip a coin LVL#2 !passjoint //pass a joint LVL#2 !passblunt //pass a blunt LVL#2 !dice //Roll dice LVL#2 !8ball -question- //Questioner LVL#2 !rf //Random fact LVL#2 !bury -item- //Bury item LVL#2 !dig //Dig up item LVL#2 !flip -username- (and -username) LVL#2 !kill -username- LVL#2 !heal -username- LVL#2 !ps -username- LVL#2 !rape -username- LVL#2 !teabag -username- LVL#2 !punch -username- LVL#2 !nuke -username- LVL#2 !vacuum -username- LVL#2 !shiton -username- LVL#2 !fuck -username- LVL#2 !give -username- -item- LVL#2 !make -username- -item- LVL#2 !wod //Word of the day LVL#2 !rq | !rq pb //RQ LVL#2 !hugs -username- LVL#2 !kiss -username- LVL#2 !grab


[SRC COMMANDS] LVL#2 !whois -username- //Someone's possible account(s) LVL#2 !mini -username- //Get someone's mini profile! LVL#2 !cso -username- //Check if someone is online LVL#2 !find -username- //Find user LVL#2 !rooms //Rooms without modded rooms LVL#2 !mrooms //Rooms with modded rooms LVL#2 !bgtime -username- //BG time LVL#2 !bg -username- //Background Picture LVL#2 !fpix -username- //Profile Picture LVL#2 !rec -username- //Recording LVL#2 !gis -search- //Google Image Search LVL#2 !ytb -search- //Youtube LVL#2 !udict -search- //Urban dictionary


[LVL COMMANDS] LVL#2 !lvl -username- //Check your own or someone else's level LVL#2 !reqlvl //Request level upgrade LVL#2 !wl -username- //Whitelist for use LVL#8 !chrank -username- -rank to set- //Set username level


[MOD COMMANDS] LVL#M !purge //Get rid of useless anons! (If bot = mod) LVL#M !banvote -username- //Request banvote (If bot = mod) LVL#M !ban -username- //Ban user (If bot = mod) LVL#M !tempban -username- -minutes- //Tempban user (If bot = mod) LVL#M !unban //Unban user (If bot = mod) LVL#M !banlist //Get room banned userlist LVL#M !clear // Clear chat (If bot = mod) LVL#M !del -username- //Clear the user's chat (If bot = mod) LVL#M !rest | !lock //Lock Whaze LVL#M !wake | !unlock //Unlock Whaze LVL#O !leave -room- //LVL#8 also. LVL#O !demod -username- //Demod username in your chatroom (If bot = owner) LVL#O !mod -username- //Mod username in your chatroom (If bot = owner) LVL#5 !join -room-


[MAIL COMMANDS] LVL#2 !sn -username- //Send a note to someone through the chat! LVL#2 !rn //Read your note LVL#5 !pm -username- -message- //Send someone a message LVL#2 !drag -username- //Invite someone to the room you're in LVL#6 !send -roomname- -msg- //send msg to a chatroom. LVL#7 !anc -msg- //Broadcast


[SET COMMANDS] LVL#2 !df -username- as -definition- //Define someone || !df -definition- //See def. LVL#2 !df rem -definition- //Remove the current definition LVL#2 name me -newname- LVL#7 !rename -username- -newname- //Rename username


[MECH COMMANDS] LVL#2 love between -name- and -name- LVL#2 !say -word/phrase- //Will make Whaze say something LVL#3 !flag -username- //Flag someone LVL#7 !banroom add/rem -roomname- //blacklist room LVL#7 !mute add/rem -username- //Mute user (If bot = mod) LVL#9 !sban add/rem -username- //Spamban user (If bot = mod)


[BOT MANAGING] LVL#9 !ld LVL#9 !ld release LVL#9 !!! -room- -msg- LVL#9 !ut LVL#9 !sl


_________________________________________

[Phrases|words] v.3.6 _________________________________________

LVL#2 *gives Whaze a cookie* LVL#2 cookie? LVL#2 dance LVL#2 fap LVL#2 ><> LVL#2 8|8 LVL#2 hello Whaze LVL#2 bye Whaze LVL#2 Whaze LVL#2 brb LVL#2 bck LVL#2 the cake is a lie LVL#2 Whaze behave LVL#2 fuck you Whaze LVL#2 ily Whaze LVL#2 ty Whaze LVL#2 Whaze show me the goods


_______________________________________

LEVEL | DEFINITION LEVEL [LVL] _______________________________________

LVL#0 // NONE LVL#1 // BLACKLISTED LVL#2 // USER LVL#3 // MEMBER LVL#4 // TRUSTED USER LVL#5 // MODERATOR LVL#6 // MASTER LVL#7 // SUPER-MASTER LVL#8 // BOT OPERATOR LVL#9 // GOD


LVL#M // CHAT MODERATOR LVL#O // CHAT OWNER

Different instances

How copy and paste between two instances of Vim on different Linux consoles?

After copying text, open a new buffer for a new file:

:e ~/dummy

paste the text to the new buffer
write the new buffer (:w)
switch to the previous buffer (:bp) to release *.swp
now switch to the other console
put the cursor at the desired place
read the dummy file (:r ~/dummy)

Increasing the buffer size

Sometimes you can only copy up to 50 lines. To solve this, increase the buffer limit between multiple files.

 :help 'viminfo'
 ...
 <       Maximum number of lines saved for each register.
 ...
 :set viminfo?
 :set viminfo='100,<100,s10,h

See also: Quick yank and paste}}

Comments

Around Wikia's network

Random Wiki