Setting up Vim and Gvim on Windows

Vim is a text editor for programmers. It is not ordinary editor, because if you get used to this editor, you no longer need to use a mouse. Because you start to handle everything quickly with keyboard shortcuts. Of course, vim is an editor that causes serious difficulties while learning. However, if these difficulties can be overcome, it is highly likely that we will enjoy using it later. 

We may need to set up vim and gvim at first. We configure these settings from the file called .vimrc. Let's open the command prompt:

$> vim .vimrc

We created .vimrc file. For example, I will open the line number feature. I type this code in the .vimrc file in the insert mode:

set nu

After that, let's save it this file in the command mode with the w command:


If you quit and open again this .vimrc file, then you will see line numbers on the editor. I want open syntax mode. Therefore I opened again .vimrc with this command in the vim when I was command mode:

:e ~/.vimrc

I opened syntax mode:

syntax on

set nu

Now, I want to make configurations on gvim. I can add this configurations to .vimrc. I will make this settinng according to Windows system. I want change font-family of the gvim as default:

syntax on

set nu

if has('gui_running')
        if has('gui_win32')
                set guifont=Consolas:h11
Let's save and quit :wq. We have seen how to set up the settings at Vim/Gvim on Windows.

No comments:

Post a Comment