La Boina Roja

Linux, the struggles are real!

How to create a .vimrc file and a .vim directory

Leave a comment

As you might now Vim is highly configurable, Vim is configured through it’s configuration file called .vimrc. The thing with this file is, it doesn’t come pre-installed, you have to create it yourself, preferably in you r home directory. Want to know what/where your home directory is?

Type

echo $HOME

echohome

You might have noticed the .vimrc file starts with a dot, meaning it is a hidden file. If you type

ls -a

It will show you all the hidden files and directories, as you can see I don’t have a .vimrc file yet.

ls-a

Let’s create a .vimrc file

touch ~/.vimrc

This command will ensure that I will create a .vimrc in my home directory no matter which directory I am currently in. There might not be any screen activity going on while creating the .vimrc file, but trust me it is created.

touchvimrc

If you want to mess around with Vim color schemes then you need to have .vim directory in your home directory. Just like the .vimrc file, the .vim directory is hidden and you need create it yourself again preferably in your home directory

mkdir ~/.vim

This command ensures that the directory will be created in the home directory regardless of what directory you are in.

mkdirvim

Now the output of ls -a looks like this:

lsavim

As you can see both the .vimrc file and .vim directory have been created.

*****WARNING****

I know there is a vimrc file in /etcetcvimrc

DON’T.MESS.IN.THERE.YOU.WILL.BE.FUCKED  photo frusty.gif  photo frusty.gif  photo frusty.gif

If you insist on seeing the contents of that file type

cat /etc/vimrc

(Remember, you can always do the cliccie for a larger piccie  photo puh2.gif Disclaimer: For the sake of this tutorial I used Konsole normally I am a tty person only these days.)

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s