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

Re: Most Valuable Tricks

Expand Messages
  • A. J. Mechelynck
    ... To me, the most valuable tricks are those which allow finding more useful ways of using Vim: - completion with menu set nocompatible ... set wildmenu -
    Message 1 of 27 , Oct 1, 2005
      Frederico Franzosi wrote:
      > 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).
      >
      > Hope I get some good answer here.
      > Thanks anyway
      > Frederico Franzosi
      >
      >
      >
      >
      To me, the most valuable tricks are those which allow finding more
      useful ways of using Vim:

      - completion with menu
      set nocompatible
      ...
      set wildmenu

      - completion on the :help command
      :help blahblah<Tab>
      (where blahblah is a pattern)

      - the :helpgrep command
      :helpgrep blahblah
      (where blahblah is a pattern)
      for instance
      :helpgrep \<blahblah\>
      (where blahblah is a word)
      followed by "quickfix" commands such as :cnext

      - the Search function at vim-online.
      http://vim.sourceforge.net/
      -> Search


      Best regards,
      Tony.
    • A. J. Mechelynck
      ... [...] Religious Integrist! ;-) Flaming will get us nowhere. Myself, I don t particularly care for any scripting languages other than Vim script and shell
      Message 2 of 27 , Oct 1, 2005
        Neil Watson wrote:
        > On Thu, Sep 29, 2005 at 09:36:28AM -0500, Tim Chase wrote:
        >> For those in the crowd (such as myself) that don't particularly care
        >> for Perl,
        >
        > Blasphemer!
        [...]

        Religious Integrist! ;-)

        Flaming will get us nowhere.

        Myself, I "don't particularly care" for any scripting languages other
        than Vim script and shell script, yet I include all possible languages
        in the Vim executables that I compile and publish, for the benefit of
        anyone who may want them.


        Best regards,
        Tony.
      • 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 3 of 27 , Oct 1, 2005
          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 4 of 27 , Oct 3, 2005
            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 5 of 27 , Oct 7, 2005
              > -----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 6 of 27 , Oct 9, 2005
                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.