spf13-vim icon indicating copy to clipboard operation
spf13-vim copied to clipboard

Weird BufWinEnter and VimEnter Errors in Ubuntu 14.04

Open marjinal1st opened this issue 9 years ago • 5 comments

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?

marjinal1st avatar May 05 '15 07:05 marjinal1st

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.

sentientmachine avatar Aug 16 '16 18:08 sentientmachine

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.

vinayakbhat82 avatar Sep 14 '16 09:09 vinayakbhat82

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

alanldawkins avatar Jan 23 '18 03:01 alanldawkins

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

jimafisk avatar Aug 27 '18 19:08 jimafisk

Dont use silent, sholud be silent!

juniorUsca avatar Nov 11 '21 05:11 juniorUsca