On 19/01/10 21:14, piscesboy wrote:
I like to save the state of my files before I leave vim using the
:mkview command, and reload it using the :loadview command,
so I tried to add them to the .vimrc file to get vim to do this
automatically:
au BufWinLeave * mkview
au BufWinEnter * silent loadview
But everytime it runs, I get a strange error:
Error detected while processing BufWinLeave Auto commands for "*":
E739: Cannot create directory: /Users/myusername/.vim/view
E190: Cannot open "/Users/myusername/.vim/view/~=+.vimrc=" for writing
It can't create the necessary director for some reason. I am running
on an administrator
account, so I have all the permissions necessary.
Do you have a $HOME/.vim/ directory? If $HOME/.vim/view/ doesn't exist,
:mkview will create it, but I don't know if it's clever enough to create
parent directories recursively if _they_ don't exist.
BTW, isn't it enough to restore the cursor position? There is an
autocommand for that at lines 72-80 of $VIMRUNTIME/vimrc_example.vim
(Last change 2008 Dec 17, as shown on line 4). (Syntax highlighting etc.
ought to be taken care of the same way as for newly opened files)
Best regards,
Tony.
--
GALAHAD hurries to the door and pushes through it. As he leaves the
room
we CUT TO the reverse to show that he is now in a room full of bathing
and romping GIRLIES, all innocent, wide-eyed and beautiful. They smile
enchantingly at him as he tries to keep walking without being
diverted by
the lovely sights assaulting his eyeballs.
"Monty Python and the Holy Grail" PYTHON (MONTY)
PICTURES LTD
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
To unsubscribe from this group, send email to vim_use+unsubscribegooglegroups.com or
reply to this email with the words "REMOVE ME" as the subject.