> I upgraded to Vim 7.3 and notice an issue when when folding is
> enabled. There is considerable lag when typing, such that when I am
> typing quickly, I can finish a whole sentence before it even appears
> on the screen!
>
> I typically only use folding for PHP files, and so I'm only noticing
> this issue when editing large PHP files, i.e. 1800 lines. Smaller PHP
> files (300 lines) there doesn't appear to be much noticeable lag.
>
> This is what folding settings I have in my vimrc:
>
> autocmd Filetype * :set nofoldenable
> autocmd Filetype php :set foldenable
> set foldmethod=indent
> set foldlevelstart=1
> set foldopen-=search
> set foldopen-=undo
> let php_folding = 2
>
Note, the :let php_folding=2 automatically sets foldmethod to 'syntax'
in the php.vim syntax file, so your :set foldmethod=indent is being
overwritten. This leads me to wonder whether your two versions of Vim
have the same version of the syntax file.
> I still have Vim 7.2 installed, and so swapping between both versions
> I can see the difference in speed and it is quite dramatic when
> editing large PHP files.
>
As mentioned, maybe the php.vim syntax file is the culprit. I
certainly have not noticed any major slowdowns while editing C or perl
code (I also noticed them in version 7.2). But, my php.vim that came
with my Vim 7.3.18 installation says it was last updated in 2006.
> Is anyone else able to replicate this issue, or know what changes to
> my settings could fix the problem.
>
Try this, to disable folding while in insert mode, until you leave
insert mode:
http://vim.wikia.com/wiki/Keep_folds_closed_while_inserting_text
No guarantees, but it might help.
--
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:
Post a Comment