Where is vim located?

All Gurus once were Newbies
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Please stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions prefer the other forums within the support section.
Before you post please read how to get help

Where is vim located?

Postby meyer0095 on Thu Jan 24, 2013 3:52 pm

I just switched over to Mint/Linux from Windows yesterday. Very confused about the file structure compared to Windows.

I am trying to find the vim directory to mess around with configurations and plugins, but have no idea where vim was installed. Could anyone also point me in the direction to a good guide on the file structure of Mint/Linux. Do all distros have the same file structure, or do they vary by distro? Are programs installed in a central location like C:\Program Files in windows?

Any help is greatly appreciated.

Thanks!
meyer0095
Level 1
Level 1
 
Posts: 3
Joined: Thu Jan 24, 2013 3:49 pm

Linux Mint is funded by ads and donations.
 

Re: Where is vim located?

Postby xenopeek on Thu Jan 24, 2013 4:21 pm

This could be the start of a beautiful story, called "how I borked my Linux Mint installation on the first day by pretending Linux = Windows." It doesn't have a happy ending :(

Not to worry, we're here to help write a better story :D First, generally the various Linux distros have a filesystem layout based on the Filesystem Hierarchy Standard, which you can access here: https://wiki.linuxfoundation.org/en/FHS. Generally a program's static files are installed in /usr, which you normally have no reason to modify, and it's system-wide configuration files are installed in /etc, which you would modify sometimes. Your personal preferences are saved by the program as you use it in hidden files or folders in your home folder (press Ctrl+H to show these), or you can create these as you need them.

vim has a system-wide configuration file in /etc/vim/vimrc, but you wouldn't normally edit this. You would edit, or first create, the .vimrc file in your home folder for your personal preferences. Read the documentation for help on this; here is the online copy of the relevant section: http://vimdoc.sourceforge.net/htmldoc/s ... -settings/.

vim plugins or scripts are generally also installed in your home folder, in the folder called .vim.

There are various other resources available for help with vim: http://www.vim.org/docs.php. Perhaps good to start there.
User avatar
xenopeek
Level 21
Level 21
 
Posts: 15445
Joined: Wed Jul 06, 2011 3:58 am
Location: The Netherlands

Re: Where is vim located?

Postby meyer0095 on Thu Jan 24, 2013 8:05 pm

My .vimrc file is not being read, nor are any my plugins in ~/.vim :/

If I do :scriptnames it is showing 17 files allow found in /usr/share/vim/vim73

How do I configure vim to also read the files found in ~/.vim?

Thanks!
meyer0095
Level 1
Level 1
 
Posts: 3
Joined: Thu Jan 24, 2013 3:49 pm

Re: Where is vim located?

Postby xenopeek on Fri Jan 25, 2013 4:43 am

Your .vimrc should be read, if it is located in /home/yourusername/.vimrc. Sorry for failing to mention this, but by default *.vim script files you want to add should be in the /home/yourusername/.vim/plugin folder (or in a subfolder of that). This is also documented in the manual, here the online copy: http://vimdoc.sourceforge.net/htmldoc/usr_05.html#05.4.

This page on the Ubuntu wiki about vim may be helpful: https://help.ubuntu.com/community/VimHowto.

You can get scripts from the vim website, or from the vim scripts mirror on GitHub.

And yes, default scripts are installed somewhere in /usr but with the above you should be able to load your own scripts successfully.
User avatar
xenopeek
Level 21
Level 21
 
Posts: 15445
Joined: Wed Jul 06, 2011 3:58 am
Location: The Netherlands

Re: Where is vim located?

Postby meyer0095 on Fri Jan 25, 2013 1:36 pm

I accidently placed in .vimrc file in my .vim folder instead of right in the home folder. That fixed everything. Thanks for all the help and information!
meyer0095
Level 1
Level 1
 
Posts: 3
Joined: Thu Jan 24, 2013 3:49 pm


Return to Newbie Questions

Who is online

Users browsing this forum: Google [Bot], Google Adsense [Bot] and 32 guests