I has suffered while customizing my vim editor.
Specifically, I add function which store cursor location.
Below is my .vimrc file.
au BufReadPost *
\ if line("'\"") > 0 && line("'\"") <= line("$") |
\ exe "norm g`\"" |
\ endif
And Error content is below :
au: command not found
-bash: /home/ubuntu/.vimrc: line 24: syntax error near unexpected token `('
-bash: /home/ubuntu/.vimrc: line 24: `\ if line("'\"") > 0 && line("'\"") <= line("$") |'
Could you give me the solution ? Take care of your health during COVID-19. Thanks !
I found solution that change file authority.
chmod +777 ~/.viminfo
.vimsrc file compiled still suffering error.
But function that restore cursor position is working.
Reference : https://askubuntu.com/questions/202075/how-do-i-get-vim-to-remember-the-line-i-was-on-when-i-reopen-a-file