Created Friday 06 January 2017
Vi is a terminal based text editor - Vim is a improved version. We'll be using Gvim, which is Vim that support GTK/X.
Installation
$ pacman -S gvim
# To manage plugins, install a package manager
$ yaourt -S vim-pathogen-git
Configuration
# You'll find the configuration at ~/.vimrc (Github)
Color Scheme
# The script for changing colors on the fly (Github) should be placed in ~/.vim/plugin/setcolors.vim
# Create the folder and Symlink the script
$ mkdir ~/.vim/plugin
$ ln -s /home/stick/dotfiles/.vim/plugin/setcolors.vim /home/stick/.vim/plugin/
Remove White GTK Border
# Gvim has a ugly thick white border, which it inherits from the GTK settings.
# Edit/Create ~/.gtkrc-2.0 and paste the following
style "no-resize-handle" { GtkWindow::resize-grip-height = 0 GtkWindow::resize-grip-width = 0 } class "GtkWidget" style "no-resize-handle" style "vimfix" { bg[NORMAL] = "#242424" # this matches my gvim theme 'Normal' bg color. } widget "vim-main-window.*GtkForm" style "vimfix"
Modelines
# According to my vimrc, Vim will check the bottom of the file it's editing
# You can specify document specific settings in this line.
Fold markers (easy overview when opening file again)
# If you've created markers in your document {}
# Place this at the bottom to make it open collapsed next time
" vim:foldmethod=marker:foldlevel=0
Plugins
# Make sure you installed the pathogen package.
# Now any plugin you like, can be extracted to ~/.vim/bundle/
# Some sweet plugins can be found at http://vimawesome.com/
# Here is some of the favorites!
# A nice and easy way to install plugins, is to navigate to the ~/.vim/bundle folder
# and clone the repositories
$ cd ~/.vim/bundle
# Solarized Color Scheme (sweet color scheme)
$ git clone git://github.com/altercation/vim-colors-solarized.git
# Airline - improved command bar
$ git clone https://github.com/vim-airline/vim-airline ~/.vim/bundle/vim-airline
# AutoClose will close your () {} [] automatic
$ git clone https://github.com/Townk/vim-autoclose.git
# NerdTree will let you navigate files and folders inside Vim
$ git clone https://github.com/scrooloose/nerdtree.git
# Gundo for a Undo/Redo tree
$ git clone http://github.com/sjl/gundo.vim.git