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

Re: set syntax for all windows opened using "open tab" in gvim

Expand Messages
  • John Little
    ... BTW, Gary, the :setfiletype command has the only set if not already set logic in it; so wouldn t au BufWinEnter * setf verilog be simpler? Regards, John
    Message 1 of 7 , Sep 10, 2009
      >     au BufWinEnter * if &ft == "" | set ft=verilog | endif

      BTW, Gary, the :setfiletype command has the "only set if not already
      set" logic in it; so wouldn't

      au BufWinEnter * setf verilog

      be simpler?

      Regards, John
      --~--~---------~--~----~------------~-------~--~----~
      You received this message from the "vim_dev" maillist.
      For more information, visit http://www.vim.org/maillist.php
      -~----------~----~----~----~------~----~------~--~---
    • Gary Johnson
      ... Yes, I intended that you should put that command in your .vimrc file. I m sorry I didn t make that clear. Regards, Gary
      Message 2 of 7 , Sep 10, 2009
        On 2009-09-09, rajesh wrote:

        > On Sep 9, 7:06 pm, Gary Johnson <garyj...@...> wrote:
        > > On 2009-09-08, rajesh wrote:
        > > > Hi vim_dev, I am using gvim to open multiple files. Every time I open
        > > > a new file using "open Tab" option under file Menu, It is required to
        > > > use ":set syntax=verilog". I wanted this to be made permanent so that
        > > > whenever I open a new windows that syntax should be applied by
        > > > default. Thanks in Adavance -- Siva
        > >
        > > Here's one approach.  This will set the filetype to "verilog" if no
        > > other filetype has been determined by the time the BufWinEnter event
        > > occurs.
        > >
        > >     au BufWinEnter * if &ft == "" | set ft=verilog | endif
        > >
        > > This does more that just set the syntax, which I think is better.
        > > Modify to suit.

        > Hi Gary, Great for the reply.
        > But I still see the problem in other aspect.
        > The command u gave me is entered in gvim window in command window.
        > But this is applicable only for all the tabbed files in the current
        > gvim console where i typed that command
        > But If I open new gvim console and new tabbed file, same problem
        > exists.
        > Can't I set something in .vimrc file so that it can be applicable for
        > all gvim window?

        Yes, I intended that you should put that command in your .vimrc file.
        I'm sorry I didn't make that clear.

        Regards,
        Gary



        --~--~---------~--~----~------------~-------~--~----~
        You received this message from the "vim_dev" maillist.
        For more information, visit http://www.vim.org/maillist.php
        -~----------~----~----~----~------~----~------~--~---
      • Gary Johnson
        ... Good point. I didn t think about that distinction when I wrote that. Thanks. Regards, Gary --~--~---------~--~----~------------~-------~--~----~ You
        Message 3 of 7 , Sep 10, 2009
          On 2009-09-10, John Little wrote:
          > >     au BufWinEnter * if &ft == "" | set ft=verilog | endif
          >
          > BTW, Gary, the :setfiletype command has the "only set if not already
          > set" logic in it; so wouldn't
          >
          > au BufWinEnter * setf verilog
          >
          > be simpler?

          Good point. I didn't think about that distinction when I wrote
          that. Thanks.

          Regards,
          Gary



          --~--~---------~--~----~------------~-------~--~----~
          You received this message from the "vim_dev" maillist.
          For more information, visit http://www.vim.org/maillist.php
          -~----------~----~----~----~------~----~------~--~---
        • rajesh
          Thanks Gary and John, It works fine ... --~--~---------~--~----~------------~-------~--~----~ You received this message from the vim_dev maillist. For more
          Message 4 of 7 , Sep 10, 2009
            Thanks Gary and John, It works fine

            On Sep 10, 7:23 pm, Gary Johnson <garyj...@...> wrote:
            > On 2009-09-10, John Little wrote:
            >
            > > >     au BufWinEnter * if &ft == "" | set ft=verilog | endif
            >
            > > BTW, Gary, the :setfiletype command has the "only set if not already
            > > set" logic in it; so wouldn't
            >
            > >     au BufWinEnter * setf verilog
            >
            > > be simpler?
            >
            > Good point.  I didn't think about that distinction when I wrote
            > that.  Thanks.
            >
            > Regards,
            > Gary
            --~--~---------~--~----~------------~-------~--~----~
            You received this message from the "vim_dev" maillist.
            For more information, visit http://www.vim.org/maillist.php
            -~----------~----~----~----~------~----~------~--~---
          Your message has been successfully submitted and would be delivered to recipients shortly.