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

Re: Most Valuable Tricks

Expand Messages
  • A. J. Mechelynck
    Matthew Winn wrote: [...] ... So hurrah for the new (v7) command :vimgrep, which does away with the need for an external grep command to handle file searching
    Message 1 of 27 , Oct 1, 2005
    • 0 Attachment
      Matthew Winn wrote:
      [...]
      > The main difficulty I have with regular expressions is all the different
      > styles of grep out there. I don't just mean the fact that I have to
      > choose between egrep, fgrep and grep, but also that different versions
      > of Unix have different greps, each with a different set of characters
      > requiring backslashes.


      So hurrah for the new (v7) command :vimgrep, which does away with the
      need for an external grep command to handle file searching in Vim.

      Best regards,
      Tony.
    • Frederico Franzosi
      I d like to thank you all for the valuable answers... You guys are the best!!! Happy vimming
      Message 2 of 27 , Oct 3, 2005
      • 0 Attachment
        I'd like to thank you all for the valuable answers...
        You guys are the best!!!

        Happy vimming

        On 10/1/05, A. J. Mechelynck <antoine.mechelynck@...> wrote:
        > Matthew Winn wrote:
        > [...]
        > > The main difficulty I have with regular expressions is all the different
        > > styles of grep out there. I don't just mean the fact that I have to
        > > choose between egrep, fgrep and grep, but also that different versions
        > > of Unix have different greps, each with a different set of characters
        > > requiring backslashes.
        >
        >
        > So hurrah for the new (v7) command :vimgrep, which does away with the
        > need for an external grep command to handle file searching in Vim.
        >
        > Best regards,
        > Tony.
        >
        >
      • David Fishburn
        ... One of the features I use the most is use Visual Block mode to comment and uncomment code. one two three ... Place your cursor on the o of one. CTRL-v
        Message 3 of 27 , Oct 7, 2005
        • 0 Attachment
          > -----Original Message-----
          > From: Frederico Franzosi [mailto:ffranzosi@...]
          > Sent: Thursday, September 29, 2005 8:19 AM
          > To: vim@...
          > Subject: Most Valuable Tricks
          >
          > Hi, I've been a reader of the list for about 2 months and
          > I've been collecting lots of knowledge about vim. I think I'm
          > still a begginer facing people in the list. Anyway, my
          > editing abilities grown up so much with Vim that I decided to
          > give a (introductory) course of it in a Free Software event (
          > http://www.inf.ufes.br/eri2005/?q=node/4 ) in my town. So,
          > I've been collecting lots of material at Vim.org Tips/Scrips,
          > vim online-help (wich I think it's the best help system ever
          > created), other sites in the internet and here. Even though,
          > I've decided to ask you for some motivational tricks you can
          > do with Vim, like when the editor really saved life (or at
          > least hours of work).

          One of the features I use the most is use Visual Block mode to comment and
          uncomment code.

          one
          two
          three

          To comment the above lines:
          ------------------
          Place your cursor on the "o" of one.
          CTRL-v
          Down arrow (j) until the "t" in three is visually selected.
          I// (capital I, followed by your comment character).
          <Esc>

          To uncomment the above lines:
          ------------------
          Place your cursor on the first "/" of the first line.
          CTRL-v
          Down arrow (j) until the "/" in three is visually selected.
          Right arrow (l) until both "//"s are visually selected.
          x


          Voila.

          I use this constantly.

          Dave
        • calmar
          ... Just as a side note, there is also EnhancedCommentify.vim , what allows e.g marking the area and do something like a c or x for commenting. Cheers marco
          Message 4 of 27 , Oct 9, 2005
          • 0 Attachment
            On Fri, Oct 07, 2005 at 10:22:04AM -0400, David Fishburn wrote:
            >
            > One of the features I use the most is use Visual Block mode to comment and
            > uncomment code.
            >
            > one
            > two
            > three
            >
            > To comment the above lines:
            > ------------------
            > Place your cursor on the "o" of one.
            > CTRL-v
            > Down arrow (j) until the "t" in three is visually selected.
            > I// (capital I, followed by your comment character).
            > <Esc>
            >
            > To uncomment the above lines:
            > ------------------
            > Place your cursor on the first "/" of the first line.
            > CTRL-v
            > Down arrow (j) until the "/" in three is visually selected.
            > Right arrow (l) until both "//"s are visually selected.
            > x
            >

            Just as a side note, there is also 'EnhancedCommentify.vim',
            what allows e.g marking the area and do something like a \c or \x for
            commenting.

            Cheers
            marco

            --
            calmar
            (o_ It rocks: LINUX + Command-Line-Interface
            //\
            V_/_ http://www.calmar.ws
          Your message has been successfully submitted and would be delivered to recipients shortly.