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
Sunday, January 6, 2013
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment