Loading ...
Sorry, an error occurred while loading the content.

80851Re: OT: Vi in a browser...

Expand Messages
  • A.J.Mechelynck
    Jun 1, 2007
      Gene Kwiecinski wrote:
      >> Personally, I don't agree with you. When editing short text
      >> items on web pages, I feel that the overhead of copying/pasting
      >> back and forth from vim is too much. I am currently using the
      >
      > Speaking of which, is there any quicker way to visually select the
      > entire file, analogous to ^A in other systems? I have to essentially do
      >
      > 1GVG<ctl-del>
      >
      > to stick everything into the scratchpad/clipboard/whatever to dump it
      > back into the item from whence it originally came, and that's just a
      > pain. Well, not so much a pain as an annoying itch I can't quite reach.
      >
      > I was thinking something along the lines of
      >
      > %V
      >
      > but that obviously won't work. :)
      >
      >

      It may depend on what you want to do with the selection: see the commands
      ":yank", ":put", "delete", all of which accept a range and a register:

      To copy the whole file to the clipboard:

      :%y+

      To cut (delete) the whole file to the clipboard (not very useful for the whole
      file, but it may be interesting for a different range):

      :%d+

      To paste the clipboard after the last line:

      :$put+

      To paste the clipboard before the first line:

      :0put+

      To paste the clipboard linewise after the current line:

      :put+

      Without the + at the end, all these act on the default ("unnamed") register.


      Best regards,
      Tony.
      --
      Bravely bold Sir Robin, rode forth from Camelot,
      He was not afraid to die, Oh Brave Sir Robin,
      He was not at all afraid to be killed in nasty ways
      Brave, brave, brave, brave Sir Robin.
      "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD
    • Show all 18 messages in this topic