La Boina Roja

The struggles off a future RHCE….


Leave a comment

Regarding the .vimrc file and the .vim directory

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 comment

How to change Vim’s default color scheme on Fedora

That should be technically speaking relatively “easy” (notice the quotation marks  photo emo.gif?). All you have to do is open en Vim en type:

:colo torte

(torte is one of Vim’s default colorschemes, meaning this scheme is preinstalled with Vim. You can find a listing of default colorschemes here.)

But then this shit happens you get,  the “E185: Cannot find color scheme ‘torte’ photo piangry.gif

colotorte

Now what???? I am ashamed to say that figuring this problem out took me DAYS. Yes people you are reading it correctly it took me fucking DAYS  photo bonk.gif to find out what was going on.

Here is the thing, apparently Fedora comes with a minimal install of Vim, which is very close to Vi. If you want to mess around with color schemes you have to install vim-enchanced. And how does one install vim-enhanced? By typing:

su -c “dnf install -y vim-enhanced”

vimenhancedinstall

When it asks for password, it is asking for your root password.

After installation is completed, open Vim and then type the following command:

:colo torte

The colorscheme will be set to torte!

(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.)