You are not logged in.

#1 2007-01-26 04:12:34

Penguin of Wonder
Member
From: West Virginia
Registered: 2007-01-25
Posts: 16
Website

Where is my vimrc?

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

#2 2007-01-26 04:35:01

battra
Member
From: Earth.US.Illinois.Chicago
Registered: 2006-05-12
Posts: 71

Re: Where is my vimrc?

$ locate vimrc
/usr/share/vim/vimrc_example.vim
$

"I know nothing except the fact of my ignorance."
- Socrates

Offline

#3 2007-01-26 05:48:49

Penguin of Wonder
Member
From: West Virginia
Registered: 2007-01-25
Posts: 16
Website

Re: Where is my vimrc?

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

#4 2007-01-26 06:26:16

pbw
Member
From: Barrie ON, Canada
Registered: 2005-06-01
Posts: 65

Re: Where is my vimrc?

yeeupp, just toss it in ~/.

Offline

#5 2007-01-26 08:34:38

phrakture
Arch Overlord
From: behind you
Registered: 2003-10-29
Posts: 7,879
Website

Re: Where is my vimrc?

You are aware of:

$ pacman -Qo /etc/vimrc
/etc/vimrc is owned by vim 7.0.178-1

I assume?

Offline

#6 2007-02-15 22:27:46

Penguin of Wonder
Member
From: West Virginia
Registered: 2007-01-25
Posts: 16
Website

Re: Where is my vimrc?

phrakture wrote:

You are aware of:

$ pacman -Qo /etc/vimrc
/etc/vimrc is owned by vim 7.0.178-1

I 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

#7 2007-02-15 22:42:19

phrakture
Arch Overlord
From: behind you
Registered: 2003-10-29
Posts: 7,879
Website

Re: Where is my vimrc?

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

#8 2007-02-15 22:42:25

elasticdog
Member
From: Washington, USA
Registered: 2005-05-02
Posts: 995
Website

Re: Where is my vimrc?

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

#9 2007-02-15 22:48:13

Penguin of Wonder
Member
From: West Virginia
Registered: 2007-01-25
Posts: 16
Website

Re: Where is my vimrc?

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

#10 2007-02-15 23:20:01

lang2
Member
Registered: 2006-02-10
Posts: 386

Re: Where is my vimrc?

if you fire up vim and run command

:scriptnames

in it, you should find them in the output.

Offline

#11 2007-02-15 23:49:07

phrakture
Arch Overlord
From: behind you
Registered: 2003-10-29
Posts: 7,879
Website

Re: Where is my vimrc?

Penguin of Wonder wrote:

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

#12 2007-02-16 00:17:13

Penguin of Wonder
Member
From: West Virginia
Registered: 2007-01-25
Posts: 16
Website

Re: Where is my vimrc?

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

#13 2007-02-20 20:40:39

bzklrm
Member
From: Australia
Registered: 2005-04-18
Posts: 36

Re: Where is my vimrc?

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")'?

from :he feature-list

gui            Compiled with GUI enabled.
gui_running        Vim is running in the GUI, or it will start soon.

Offline

#14 2007-02-20 21:00:07

Penguin of Wonder
Member
From: West Virginia
Registered: 2007-01-25
Posts: 16
Website

Re: Where is my vimrc?

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

#15 2007-02-20 21:51:39

phrakture
Arch Overlord
From: behind you
Registered: 2003-10-29
Posts: 7,879
Website

Re: Where is my vimrc?

bzklrm wrote:
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

Board footer

Powered by FluxBB