Customizing VIM (Part N)

As I’ve been reading about VIM and learning trick I’ve been customizing it, too. Here is my current setup and what it does:

 1 set rtp+=~/.vim
Windows does not load from the ~/.vim directory the way that *Nix does. Fix this.
 2 source ~/.vim/autoload/pathogen.vim
3 call pathogen#runtime_append_all_bundles()
4 call pathogen#helptags()
Pathogen manages my plugins. This loads and initialized pathogen.
 5 set number
6 filetype plugin indent on
7 syntax on
I want numbered listings, indents and signal coloring on
 8 set visualbell
When I make a mistake I don’t want to hear a stupid bell, but I do want to know about it.
9 set guifont=Courier_New:h9:cANSI 
This gives me a nicer font than the default
The code that follows is a nice idea for keeping track of my mode. In normal mode the screen is light green. When I go into insert mode it’s light yellow:
 





SNAGHTMLfd9ca53[4]SNAGHTMLfdab167
10 :highlight Normal guibg=#CBF2C7
11 noremap i :highlight Normal guibg=#f8fab4<cr>i
12 noremap o :highlight Normal guibg=#f8fab4<cr>o
13 noremap s :highlight Normal guibg=#f8fab4<cr>s
14 noremap a :highlight Normal guibg=#f8fab4<cr>a
15 noremap I :highlight Normal guibg=#f8fab4<cr>I
16 noremap O :highlight Normal guibg=#f8fab4<cr>O
17 noremap S :highlight Normal guibg=#f8fab4<cr>S
18 noremap A :highlight Normal guibg=#f8fab4<cr>A
19
20 "You need the next line to change the color back when you hit escape.
21 inoremap <Esc> <Esc>:highlight Normal guibg=#CBF2C7<cr>
22
23 "Note: the color "Sys_Window" works for Windows only.
24 "If running linux, use white or lightgrey instead.
25 set lines=40 columns=80



The colors, like #f8fab4 came from http://www.colorpicker.com






 

SNAGHTMLfe15d5e


Finally, the nicely colored display of my data came from using the vim script ‘TOhtml’ which renders the selected part of a window and saves it.


 


Well, almost finally. Here is a page with a whole bunch of VIM color schemes.



Comments

Popular Posts