spf13 / spf13-vim

The ultimate vim distribution
http://vim.spf13.com
Apache License 2.0
15.55k stars 3.64k forks source link

Weird BufWinEnter and VimEnter Errors in Ubuntu 14.04 #766

Open marjinal1st opened 9 years ago

marjinal1st commented 9 years ago

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?

sentientmachine commented 8 years ago

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.

vinayakbhat82 commented 8 years ago

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.

alanldawkins commented 6 years ago

This works without losing configuration. https://ubuntuforums.org/showthread.php?t=1639591

jimafisk commented 6 years ago

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
juniorUsca commented 2 years ago

Dont use silent, sholud be silent!