Find the answer to your Linux question:
Results 1 to 5 of 5
I'm using ubuntu and i'm editing in Vim. I wonder if there is a command which permently delete a word or a line.... ( d,x,.. are just similar to cut) ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    May 2011
    Posts
    4

    Copy and paste issue in Vim


    I'm using ubuntu and i'm editing in Vim.
    I wonder if there is a command which permently delete a word or a line.... ( d,x,.. are just similar to cut)
    Because sometimes i want to cut something and leave them in the buffer for later use and continue editing, but how can i delete words, line..etc... without losing my previous cut in the buffer ?

  2. #2
    Linux Engineer rcgreen's Avatar
    Join Date
    May 2006
    Location
    the hills
    Posts
    1,134

  3. #3
    Just Joined!
    Join Date
    May 2011
    Posts
    4
    thanks 4 your reply
    unfortunately there's no shortcut

  4. #4
    Linux Engineer hazel's Avatar
    Join Date
    May 2004
    Location
    Harrow, UK
    Posts
    1,217
    If you have text you wish to save for future use without the risk of it being overwritten, you can specify a buffer to put it into and then paste it back out of that buffer.

    For example, if you have the string "Here is some text", you can delete and save the word "text" by moving your cursor onto the first letter of that word and typing
    Code:
    "adw
    a is just a random character; you could use any letter.

    Then you can do other deletions using the default delete buffer. They won't overwrite your saved text. Finally, to get that text back, type:
    Code:
    "ap
    This doesn't quite answer your question but it is a possible workaround for your problem.
    "I'm just a little old lady; don't try to dazzle me with jargon!"
    www.hrussman.entadsl.com

  5. #5
    Just Joined!
    Join Date
    May 2011
    Posts
    4

    Smile

    Wow that's great =)) That's mean i can store many things for future use since there are so many register a-z =)))) thanks ^^

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •