Answers for "Make views vim"

0

Make views vim

augroup myView 
    autocmd!
    autocmd BufWinLeave *.* mkview
    autocmd BufWinEnter *.* silent! loadview
  augroup END
  " the '!' mark helped me get rid of the error on startup
  
" and if you want to be more explicit make custom function
" assuming your error code is E484 eg:
" Error detected while processing BufWinEnter Autocommands for "*":
" E484: Can't open file /home/jan/.local/share/nvim/view/~=+index=
  
 function! LoadView() abort
    try
        loadview
    catch /E484/
        return
    endtry
 endfunction

autocmd BufWinEnter * call LoadView()
Posted by: Guest on January-22-2021

Code answers related to "Shell/Bash"

Browse Popular Code Answers by Language