Surely everyone must know Vim, in my opinion the best text editor for GNU / Linux. The first few times I used Vim I found it very complicated, but since I manage the dedicated server of my personal blog, it has become my default editor, even for programming, in this article we will see how to apply the final configuration for Vim thanks to a repository that I found in GitHub.
As is usual in the world of free software, Vim It has a great capacity for configuration and customization. So I decided to search the web for configurations that would make the task of programming easier and I came across a repository in GitHub created by Amix, during 8 years. has been using and modifying Vim to get a vimrc definitive. You can find the repository in question here!, let's see how to install it.
Table of Contents
Basic version or "Awesome" version
It is possible to choose between two versions, a basic that will not install any plugin, or another much more complete that will Vim a very powerful editor.
To install the basic one, just run the following command:
$ git clone git: //github.com/amix/vimrc.git ~ / .vim_runtime $ sh ~ / .vim_runtime / install_basic_vimrc.sh
And for the advanced or “Awesome"
git clone git: //github.com/amix/vimrc.git ~ / .vim_runtime sh ~ / .vim_runtime / install_awesome_vimrc.sh
El vimrc for version "Awesome" It is as follows:
set runtimepath + = ~ / .vim_runtime source ~ / .vim_runtime / vimrcs / basic.vim source ~ / .vim_runtime / vimrcs / filetypes.vim source ~ / .vim_runtime / vimrcs / plugins_config.vim source ~ / .vim_runtime / vimr source ~ / .vim_runtime / vimr source ~ / .vim_runtime / vimr source vim try source ~ / .vim_runtime / my_configs.vim catch endtry
To add our own configurations we have to edit the file ~ / .vim_runtime / my_configs.vim.
Edit the default settings
At installation the default color scheme is set to peaksea, it is possible to change the colors used to highlight the syntax by Vim editing the file ~ / .vim_runtime / my_configs.vim and adding the following line:
Must be replaced peaksea by any of these other 3 color schemes:
Possible issues with the transparent background
It is possible that when installing this configuration for Vim we lose the transparent background of the terminal and we see vim in the following way:
To solve the problem it is necessary to add the following lines to the file ~ / .vim_runtime / my_configs.vim:
hi NonText ctermfg = 18 ctermbg = NONE cterm = NONE hi Normal ctermfg = 16 ctermbg = NONE cterm = NONE hi Special ctermfg = Yellow ctermbg = NONE hi Comment ctermfg = DarkYellow ctermbg = NONE hi Constant ctermfg = Blue ctermbg = NONEfg hi Yellow ctermbg = NONE hi LineNr ctermfg = DarkGrey ctermbg = NONE hi PreProc ctermfg = Green ctermbg = NONE hi Statement ctermfg = Cyan ctermbg = NONE hi Type ctermfg = Cyan ctermbg = NONE hi Error ctermfg = Red ctermbg Magenta NONEf Identifier ctermbg = Ctermbg Mnta NONEf Identifier = NONE hi SpecialKey ctermfg = Cyan ctermbg = NONE hi NonText ctermfg = Blue ctermbg = NONE hi Directory ctermfg = Blue ctermbg = NONE hi MoreMsg ctermfg = Green ctermbg = NONE hi Red Title ctermfg = Magenta ctermbg = NONE ctermf WarningMs = hi DiffDelete ctermfg = Blue ctermbg = NONE
Which removes the black background (ctermbg = NONE) of all keywords in the programming language and sites where there is no text (NonText).
I personally like to highlight the current line with the following appearance:
hi CursorLine guifg = NONE guibg = # 121212 gui = NONE ctermfg = NONE ctermbg = NONE cterm = BOLD hi CursorColumn guifg = NONE guibg = # 121212 gui = NONE ctermfg = NONE ctermbg = NONE cterm = BOLD
After applying all these changes, Vim looks like this:
This has been my first article as a contributor to FromLinux, I hope you have found it useful. Did you know this configuration for Vim ?. What customizations have you made? Leave a comment !.