spf13-vim
spf13-vim copied to clipboard
Weird BufWinEnter and VimEnter Errors in Ubuntu 14.04
I'm using Ubuntu 14.04 with zsh 5.0.2. Installed with script, no problems during installation.
When I enter Vim or open any window/buffer, I get these errors:
Error detected while processing BufWinEnter Auto commands for "*":
E129: Function name required
Error detected while processing VimEnter Auto commands for "*":
E129: Function name required
Press ENTER or type command to continue
Any ideas?
I got these errors because I had these lines in my ~/.vimrc
au BufWinLeave * mkview
au BufWinEnter * silent loadview
Commenting out those lines stopped the error from occurring.
I remember getting those errors when I ran out of disc space. The above mentioned lines in ~/.vimrc are for saving the folds created in vim and removing them would not save the folds.
This works without losing configuration. https://ubuntuforums.org/showthread.php?t=1639591
Thanks @alandawkins, changing the configuration for folds in ~/.vimrc
worked.
Previously:
"FOLDS:
"------
" Automatically save folds
augroup AutoSaveFolds
autocmd!
autocmd BufWinLeave * mkview
autocmd BufWinEnter * silent loadview
augroup END
Now:
"FOLDS:
"------
" Automatically save folds
augroup AutoSaveFolds
autocmd!
au BufWinLeave ?* mkview 1
au BufWinEnter ?* silent loadview 1
augroup END
Dont use silent
, sholud be silent!