Hey, trying to write the vimrc example to my vimrc, get message saying cant

238 views
Skip to first unread message

Ben Farquhar

unread,
Mar 16, 2011, 10:21:25 PM3/16/11
to vim_use
Hi,

Im doing vimtutor. In particular, this:

1. Start editing the "vimrc" file. This depends on your system:
:e ~/.vimrc for Unix
:e $VIM/_vimrc for MS-Windows

2. Now read the example "vimrc" file contents:
:r $VIMRUNTIME/vimrc_example.vim

3. Write the file with:
:w

The next time you start Vim it will use syntax highlighting.
You can add all your preferred settings to this "vimrc" file.
For more information type :help vimrc-intro


And the first time i did :e~/.vimrc it was allowing me to edit. then i
got off the page as i didntk know what to type. Now i cant even open
the file to edit as when i type the command :e ~/.vimrc it says: E37:
No write since last change (add ! to override). And so i just open the
example :r $VIMRUNTIME/vimrc_example.vim and use "v" to select it and
use :w vimrc to write it to my vimrc file and it says the same thing.

help? thanks

ConcreteVitamin

unread,
Mar 17, 2011, 12:03:10 AM3/17/11
to vim...@googlegroups.com
Hi Ben,

I recommend reading the vimtutor through before doing anything you can't master as of now.

Regards,
Covi


--
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

Charles E Campbell Jr

unread,
Mar 17, 2011, 10:36:04 AM3/17/11
to vim...@googlegroups.com

I'm going to make a few guesses, but this is what I think has happened:

* you edited ~/.vimrc
* you changed ~/.vimrc, but did not exit vim
* you told vim to edit ~/.vimrc again -- thus the changes you made to
~/.vimrc would be lost.

Vim is telling you that you have a Vim window open with the ~/.vimrc
file; by using :e again, you're telling vim to (re-)read ~/.vimrc,
wiping out what's currently in that window. Are you sure that that's
what you want? Vim has told you that to proceed to wipe out your
changes, use :e! ~/.vimrc (that "add ! to override" message). Now for
a guess: you've opened a second instance of Vim and you're trying to
edit the same file again. I suggest looking for the first instance of
Vim that you've got running and to save (or not save) that window.
Plus, I suggest using vimtutor.

Regards,
Chip Campbell

Reply all
Reply to author
Forward
0 new messages