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

Re: grouping commands

Expand Messages
  • björn
    ... Another option is to create the file (and folders as needed) ~/.vim/ftplugin/perl.vim and add all settings etc. in there (read all about it in :h
    Message 1 of 3 , Jan 19, 2011
    • 0 Attachment
      On 17 January 2011 18:33, Israel Chauca F. wrote:
      > On Jan 17, 2011, at 11:28 AM, Robert Hicks wrote:
      >
      >> I have a bunch of things I set when the FileType is Perl. Instead of
      >> writing:
      >>
      >> autocmd FileType perl set foo
      >> autocmd FileType perl set bar
      >> autocmd FileType perl set baz
      >>
      >> Can I just lump them all as "perl" and just do:
      >>
      >> set foo
      >> set bar
      >> set baz
      >>
      >
      > Not sure what you have in mind, but you can set multiple options in the same line:
      >
      > au FileType perl set foo bar baz
      >
      > You can even put multiple commands in the same line, see  :h :bar

      Another option is to create the file (and folders as needed)

      ~/.vim/ftplugin/perl.vim

      and add all settings etc. in there (read all about it in ":h ftplugin").

      I use this e.g. to set different color schemes for different file types.

      Björn

      --
      You received this message from the "vim_mac" maillist.
      Do not top-post! Type your reply below the text you are replying to.
      For more information, visit http://www.vim.org/maillist.php
    Your message has been successfully submitted and would be delivered to recipients shortly.