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

Re: vim: set ft but don't execute syntax file

Expand Messages
  • Christian Brabandt
    Hi ping! ... regards, Christian -- Friert im Jänner Stein und Bein, könnte es der Winter sein. -- You received this message from the vim_use maillist. Do
    Message 1 of 4 , Jan 2, 2013
    • 0 Attachment
      Hi ping!

      On Mi, 02 Jan 2013, ping wrote:

      > experts:
      > I have a huge text file, which, when set ft, navigation in the file
      > becomes extremely slow.
      >
      > but, due to some reasons I still want the ft to be set, but without
      > executing the corresponding syntax file ( so it will not be slowed
      > down).
      > is it possible and how?
      >
      > I tried comment out
      > "syntax on"
      > "syntax enable",
      > "filetype plugin indent on"
      >
      > and when I set ft (either by :set ft=xxx) or using modeline,
      > navigation is still same slow.
      >
      > disable ft "set ft=" will make it return normal (faster navigation)

      :h eventignore

      regards,
      Christian
      --
      Friert im Jänner Stein und Bein, könnte es der Winter sein.

      --
      You received this message from the "vim_use" 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
    • Tony Mechelynck
      ... Have the following (in that order) in your vimrc. indent is optional, you may leave it out if you don t want filetype-related indenting. filetype plugin
      Message 2 of 4 , Jan 3, 2013
      • 0 Attachment
        On 02/01/13 22:25, ping wrote:
        > experts:
        > I have a huge text file, which, when set ft, navigation in the file
        > becomes extremely slow.
        >
        > but, due to some reasons I still want the ft to be set, but without
        > executing the corresponding syntax file ( so it will not be slowed down).
        > is it possible and how?
        >
        > I tried comment out
        > "syntax on"
        > "syntax enable",
        > "filetype plugin indent on"
        >
        > and when I set ft (either by :set ft=xxx) or using modeline,
        > navigation is still same slow.
        >
        > disable ft "set ft=" will make it return normal (faster navigation)
        >
        >
        > regards
        > ping
        >

        Have the following (in that order) in your vimrc. "indent" is optional,
        you may leave it out if you don't want filetype-related indenting.

        filetype plugin indent on
        syntax off

        see :help :syn-off

        Of course, you won't get any syntax highlighting. To allow syntax
        highlighting to be switched on manually but not automagically, see
        :help :syn-manual


        Best regards,
        Tony.
        --
        Magnet, n.: Something acted upon by magnetism

        Magnetism, n.: Something acting upon a magnet.

        The two definition immediately foregoing are condensed from the works
        of one thousand eminent scientists, who have illuminated the subject
        with a great white light, to the inexpressible advancement of human
        knowledge.
        -- Ambrose Bierce, "The Devil's Dictionary"

        --
        You received this message from the "vim_use" 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
      • ping
        ... this is really nice and matching exactly what I wanted! thanks. so my problem is solved by: 1) global syntax manual in vimrc 2) set ft (modeline ,
        Message 3 of 4 , Jan 6, 2013
        • 0 Attachment
          On 1/3/2013 10:04 PM, Tony Mechelynck wrote:
          > On 02/01/13 22:25, ping wrote:
          >> experts:
          >> I have a huge text file, which, when set ft, navigation in the file
          >> becomes extremely slow.
          >>
          >> but, due to some reasons I still want the ft to be set, but without
          >> executing the corresponding syntax file ( so it will not be slowed
          >> down).
          >> is it possible and how?
          >>
          >> I tried comment out
          >> "syntax on"
          >> "syntax enable",
          >> "filetype plugin indent on"
          >>
          >> and when I set ft (either by :set ft=xxx) or using modeline,
          >> navigation is still same slow.
          >>
          >> disable ft "set ft=" will make it return normal (faster navigation)
          >>
          >>
          >> regards
          >> ping
          >>
          >
          > Have the following (in that order) in your vimrc. "indent" is
          > optional, you may leave it out if you don't want filetype-related
          > indenting.
          >
          > filetype plugin indent on
          > syntax off
          >
          > see :help :syn-off
          >
          > Of course, you won't get any syntax highlighting. To allow syntax
          > highlighting to be switched on manually but not automagically, see
          > :help :syn-manual
          >
          >
          > Best regards,
          > Tony.

          this is really nice and matching exactly what I wanted!
          thanks.

          so my problem is solved by:
          1) global "syntax manual" in vimrc
          2) set ft (modeline , ftdetect script , or set ft), so other plugins
          (like Voom) will know still know the ft info
          3) since not "syntax on" or "syntax enable", the performance-consuming
          vim syntax HL won't start
          4) if still need syntax hl for individual files, enable it manually (to
          current buff only):
          set syntax=ON


          --
          You received this message from the "vim_use" 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.