Thursday, January 3, 2013

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

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

No comments: