You are not logged in.

#1 2013-09-26 08:44:09

Sameer
Member
Registered: 2013-09-16
Posts: 18

[SOLVED] ~/.vimrc and ~/.vim/ not found...

Hi...

I created a user sam and logged in from sam.
Then, I did:

sudo pacman -S vim

Vim was installed.
Now, there is

/etc/vimrc
/usr/share/vim/

cool.

But there is no

~/.vimrc
~/.vim/

Can anybody please tell me, where did I go wrong?

Last edited by Sameer (2013-09-29 06:25:09)

Offline

#2 2013-09-26 09:01:22

Raynman
Member
Registered: 2011-10-22
Posts: 1,539

Re: [SOLVED] ~/.vimrc and ~/.vim/ not found...

A package will (should) never put anything in your home dir. Some programs may create configuration files there when they run for the first time (and a few will even refuse to run without a config file), but those are your personal settings and you can create/edit/delete them as you see fit.

/etc/vimrc is system wide, but apart from that it's the same story: create it if you want, but it's not included in the package (other packages do include config files under /etc). Use

$ pacman -Ql
$ pkgfile -l

for installed and repository packages, respectively, to see which files are included, or search for the package on the website and inspect the file list.

Offline

#3 2013-09-26 09:20:24

mr.MikyMaus
Member
From: disabled
Registered: 2006-03-31
Posts: 285

Re: [SOLVED] ~/.vimrc and ~/.vim/ not found...

You did nothing wrong. There is nothing wrong.

It's only telling you there is no user settings (~/*) or system settings (/etc/) for Vim available meaning you should create your own if you wish to.

If you put your settings to /etc/vimrc, it will be applied system-wide (e.g. for all users) while if put in /home/(username)/, it will only apply for that user.


What happened to Arch's KISS? systemd sure is stupid but I must have missed the simple part ...

... and who is general Failure and why is he reading my harddisk?

Offline

#4 2013-09-26 14:38:46

Sameer
Member
Registered: 2013-09-16
Posts: 18

Re: [SOLVED] ~/.vimrc and ~/.vim/ not found...

Sorry... I had a misunderstanding...

/etc/vimrc

is there (edited the question)... but not the local one...

Raynman & mr.MikyMaus thanks for the reply...
sorry, I am from Ubuntu, Fedora n CentOS background, where it is already created for us...
OK
If I want to create my local ~/.vimrc, then how do I make Vim know that I have created one (i.e. Where do I specify it's path )?

Offline

#5 2013-09-26 14:42:59

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [SOLVED] ~/.vimrc and ~/.vim/ not found...

You don't have to specify anything, it will check automatically and if it finds ~/.vimrc, it will use the settings you put there.

Offline

#6 2013-09-26 15:16:48

ANOKNUSA
Member
Registered: 2010-10-22
Posts: 2,141

Re: [SOLVED] ~/.vimrc and ~/.vim/ not found...

Copy /etc/vimrc to ~/.vimrc, and build from that. There's a flag in there that will start you off with some sane settings, rather than vi-compatible settings:

" All system-wide defaults are set in $VIMRUNTIME/archlinux.vim (usually just
" /usr/share/vim/vimfiles/archlinux.vim) and sourced by the call to :runtime
" you can find below.  If you wish to change any of those settings, you should
" do it in this file (/etc/vimrc), since archlinux.vim will be overwritten
" everytime an upgrade of the vim packages is performed.  It is recommended to
" make changes after sourcing archlinux.vim since it alters the value of the
" 'compatible' option.

" This line should not be removed as it ensures that various options are
" properly set to work with the Vim-related packages.
runtime! archlinux.vim

" If you prefer the old-style vim functionalty, add 'runtime! vimrc_example.vim'
" Or better yet, read /usr/share/vim/vim74/vimrc_example.vim or the vim manual
" and configure vim to your own liking!

You can just create the ~/.vim directory on your own.

Offline

#7 2013-09-29 06:24:42

Sameer
Member
Registered: 2013-09-16
Posts: 18

Re: [SOLVED] ~/.vimrc and ~/.vim/ not found...

Thanks guys...

I created ~/.vimrc and it found it.. smile

Thank you... smile

Offline

Board footer

Powered by FluxBB