KnoP-01 / krl-for-vim

Vim plugins (syntax, indent and more) for Kuka Robot Language
MIT License
9 stars 0 forks source link

Folds are open on editing a new .src file #9

Open KnoP-01 opened 5 years ago

KnoP-01 commented 5 years ago

Even though g:krlFoldLevel is explicitly set folds are all open on opening a .src file.

Without using call plug#begin('~/.vim/plugged') all is fine...

KnoP-01 commented 5 years ago

I can come around this bug with

call plug#end() syntax off " undo what plug#begin() did to syntax filetype plugin indent off " undo what plugin#begin() did to filetype syntax on " before filetype plugin on filetype plugin indent on " after syntax on

The main reason for this bug is that there are

syn region krlFold

commands not in the syntax file but in the ftplugin. That is probably bad practice. I have to move some functions (KrlIsVkrc() in particular) to autoload and move the syn commands to the syntax file.