You are not logged in.
For the heck of it, I can't get a simple ~/.vimrc read into vim or I have forgotten everything :-(
I do this trivial example:
- the whole ~/.vimrc is
set nobackup
- touch test
- vim test, change it, :wq
It has created a file called test~, which should not be.
What could be the problem. This is a recently upgraded Arch box.
Offline
From http://www.faqs.org/faqs/editor-faq/vim/
5.2 Why is a backup file written even if I set nobackup?
In order to keep Vim from writing a backup, you must also do
``:set nowritebackup''.
Offline
Thanks! Still there is something wrong.
If I do
vim
:set nowritebackup
:e test.tex
edit and save, then no test.tex~ is created.
But having this ~/.vimrc
set nobackup
set nowritebackup
then start vim straight
vim test.tex
creates a backup.
Offline
Offline
~/.vimrc doesn't get sourced. (Or Vim is trying to source it from another path.)
That was my first guess. But if there is a syntax error, vim complains about it at start up.
Run "vim -V" and see if it says anything about sourcing vimrc.
lese "/etc/vimrc"
Zeile 47: lese "/usr/share/vim/syntax/syntax.vim"
Suche nach "syntax/synload.vim" in "/home/user/.vim,/usr/share/vim,/usr/share/vim,/usr/share/vim/after,/home/user/.vim/after"
Suche nach "/home/user/.vim/syntax/synload.vim"
(100 odd lines)
Interesting. No mention about /home/user/.vimrc
Also try "vim -u ~/.vimrc" and see if it works.
Yes. That behaves exactly according to ~/.vimrc
Offline
I had the same problem (version 7.2.65-1 according to `pacman -Qqi vi`), and indeed ~/.vimrc doesn't get sourced (as the previous posters already mentioned). However, ~/.virc does get sourced, so renaming my ~/.vimrc to ~/.virc fixed the problem. Note that /etc/virc exists, but not /etc/vimrc. I wonder why the package switched from vim to vi...
Offline
My abs tree shows that the vi package is compiled with --with-vim-name=vi flag turned on. One has to read the code to really tell but it is possible that in such case it would source .virc instead of .vimrc. Besides being Unix compatible, I don't see reason to favour vi over the vim package.
Offline
The Arch Vim packages are somewhat misguided in their config file usage.
IIRC there is some overhaul underway, however. Until then we will have to distinguish between, Vi, Vim, and GVim specific .rc files.
Edit:
About the differences, look here: http://www.archlinux.org/news/336
Last edited by bernarcher (2009-04-26 13:55:50)
To know or not to know ...
... the questions remain forever.
Offline