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

autocomplete feature: question

Expand Messages
  • Neil Zanella
    With regards to the following tip on autocomplete... http://www.vim.org/tips/tip.php?tip_id=610 is there a way that I can enable an autocomplete only for say
    Message 1 of 3 , Nov 30, 2003
      With regards to the following tip on autocomplete...

      http://www.vim.org/tips/tip.php?tip_id=610

      is there a way that I can enable an autocomplete only for say files
      ending in .c, .h, and .cpp?

      Thanks,

      Neil
    • Gary Johnson
      ... I m not sure what that tip has to do with file name completion. For file name completion in insert mode, see ... Then to remove certain file name patterns
      Message 2 of 3 , Nov 30, 2003
        On 2003-12-01, Neil Zanella <nzanella@...> wrote:
        > With regards to the following tip on autocomplete...
        >
        > http://www.vim.org/tips/tip.php?tip_id=610
        >
        > is there a way that I can enable an autocomplete only for say files
        > ending in .c, .h, and .cpp?

        I'm not sure what that tip has to do with file name completion. For
        file name completion in insert mode, see

        :help i_CTRL-X_CTRL-F

        Then to remove certain file name patterns from consideration, see

        :help wildignore

        HTH,
        Gary

        --
        Gary Johnson | Agilent Technologies
        garyjohn@... | Wireless Division
        | Spokane, Washington, USA
      • Benji Fisher
        ... Instead of adding ... to your vimrc file, add ... to ~/.vim/ftplugin/c.vim . ... You may also be interested in Dr. C s C Stubs available at
        Message 3 of 3 , Dec 1, 2003
          On Mon, Dec 01, 2003 at 02:41:03AM -0330, Neil Zanella wrote:
          >
          > With regards to the following tip on autocomplete...
          >
          > http://www.vim.org/tips/tip.php?tip_id=610
          >
          > is there a way that I can enable an autocomplete only for say files
          > ending in .c, .h, and .cpp?
          >
          > Thanks,
          >
          > Neil

          Instead of adding

          :iab #i #include

          to your vimrc file, add

          :iab <buffer> #i #include

          to ~/.vim/ftplugin/c.vim .

          :help :abbreviate-local
          :help filetype-plugins (in general)
          :help ftplugin-overrule (in particular)

          You may also be interested in Dr. C's "C Stubs" available at
          http://users.erols.com/astronaut/vim/index.html#VimFuncs

          HTH --Benji Fisher
        Your message has been successfully submitted and would be delivered to recipients shortly.