You are not logged in.
Pages: 1
Okay, so I just finished installing Arch last night. I'm really still in the process of getting everything setup the way I like it, but some things are still really nagging me. The biggest one at the moment is where on earth is the apparent default .vimrc and .gvimrc files? I don't know why anyone would think I would want to use their vimrc but I obviously don't. Anybody know where they stashed them?
Thanks!
[http://steveno.wordpress.com/]My Blog[/url]
Offline
$ locate vimrc
/usr/share/vim/vimrc_example.vim
$"I know nothing except the fact of my ignorance."
- Socrates
Offline
I tried that method. Well actually I used slocate. Only I didn't find anything because I was searching for ".vimrc" I assumed the file would be hidden. Hmm. Thats two surprises.
If I create a local .vimrc will it override the system wide setting?
[http://steveno.wordpress.com/]My Blog[/url]
Offline
yeeupp, just toss it in ~/.
Offline
You are aware of:
$ pacman -Qo /etc/vimrc
/etc/vimrc is owned by vim 7.0.178-1I assume?
Offline
You are aware of:
$ pacman -Qo /etc/vimrc /etc/vimrc is owned by vim 7.0.178-1I assume?
No I didn't know that. Thank you I guess, but how does that help me?
Next question. Apparently my vimrc doesn't have priority over the one in /etc/vimrc. It something is stipulated in both the one in /etc is used instead. If I remove the file it seems to come back on its own. Is there anyway to get rid of it for good? Or at least convince vim to stop using it?
[http://steveno.wordpress.com/]My Blog[/url]
Offline
The system wide vimrc is the vimrc_example that comes with vim. If you have a user based ~/.vimrc, the system-wide vimrc is not read. If you are not happy with the defaults, create your own file with YOUR defaults. This is actually the way all good linux applications function - read /etc/something only if ~/.something doesn't exist.
Perhaps we're going about this the wrong way:
What is it in /etc/vimrc that you do not like? There's very little in there. Here's an online version:
ftp://ftp.vim.org/pub/vim/runtime/vimrc_example.vim
You are using 'vim', right, and not 'gvim'? There's a difference.
Offline
It wasn't quite clear from your earlier response, but you did make the ~/.vimrc file in your home directory, and it is hidden, correct? That is how it should be...if vim is able to read it, then the /etc/vimrc file should never get read, so I think that's the issue you're seeing here.
As far as deleting the /etc/vimrc file and having it come back...that should only happen when the vim package gets updated and a new version thus gets installed. Just fix the issue with your local vimrc file and you shouldn't have to worry about it anymore.
Offline
I have a vimrc and a gvimrc file in /etc. Along with those, I have a vimrc in my /home that is hidden. After further reviewing both of the rc files it appears my problems stem from gvimrc file, not the vimrc. A full color scheme isn't set there, but certain parts of one are and it kept overiding my vimrc while in the GUI. I've never used a gvimrc file before, I guess I'll have to create one.
Sorry about being a pain in the neck. Thanks for the help though.
[http://steveno.wordpress.com/]My Blog[/url]
Offline
if you fire up vim and run command
:scriptnamesin it, you should find them in the output.
Offline
I have a vimrc and a gvimrc file in /etc. Along with those, I have a vimrc in my /home that is hidden. After further reviewing both of the rc files it appears my problems stem from gvimrc file, not the vimrc. A full color scheme isn't set there, but certain parts of one are and it kept overiding my vimrc while in the GUI. I've never used a gvimrc file before, I guess I'll have to create one.
Typically, I just symlink my ~/.vimrc to ~/.gvimrc, and use a single file with some "if has(gui)" sections
Offline
Symlinking is a good idea. I hadn't thought of that actually. I have some of those "if has(gui)" statements in mine but I don't really see the need for them most of the time unless you would for some reason want it different in gvim than vim. I think that would only confuse me.
[http://steveno.wordpress.com/]My Blog[/url]
Offline
Typically, I just symlink my ~/.vimrc to ~/.gvimrc, and use a single file with some "if has(gui)" sections
Shouldn't it be rather 'if has("gui_running")'?
from :he feature-list
gui Compiled with GUI enabled.
gui_running Vim is running in the GUI, or it will start soon.Offline
bzklrm, your right it should be. But I knew what he meant. Thanks for clearing it up though in case someone else was curious.
[http://steveno.wordpress.com/]My Blog[/url]
Offline
phrakture wrote:Typically, I just symlink my ~/.vimrc to ~/.gvimrc, and use a single file with some "if has(gui)" sections
Shouldn't it be rather 'if has("gui_running")'?
yeah, it should - I was writing from memory
Offline
Pages: 1