Vim Love
I decided to post my .gvimrc for any other Vim users. Maybe it will give you some ideas for your own. This .gvimrc is the product of my using Vim as my primary text editor the last 5 years.
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" D's .gvimrc Settings File
" Tweaked over several years of Vim use to make Vim work how I want it to.
"
" All commands in this file are executed at GUI runtime.
"
" Maintainer: Derrick Sobodash <dsobodash (-_at_-) sina (-_dot_-) com>
" Last change: 2006/08/22
"
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Visual Settings
"
" Windows Vim is Superior Attack
behave mswin
" Set the color scheme to use (must be in $vim$/colors/)
colorscheme doriath " I also like habiLight
" Set the font to use. This should be in the pattern of NAME:hSIZE
" Be sure to escape font name spaces with "\"
set guifont=Consolas:h11
" Fix fonts on MacOSX
"set nomacatsui
"set termencoding=macroman
" Set the size of the Vim display window in characters
" Remember this is in addition to whatever you have set as the
" command line height
win 140 34
" Show the line and column number of the Vim cursor
set ruler
" Create a nicer ruler for the file similar to the one in LESS and
" allocate 26 characters for its display
" Format: "Ln LINE, Col COL (PERCENT%)"
set rulerformat=%26(Ln\ %l,\ Col\ %c\ \(%p%%%\))
" Use a two line command window instead of one line
set cmdheight=2
" Show line numbers on the left of each line
""set number
" Highlight matched strings when using Vim search
set hlsearch
" Highlight matching brackets/braces/parenthesis when cursor on top
set showmatch
" Enable syntax highlighting for all languages
if !exists("syntax_on")
syntax on
endif
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Usability
"
" Disable automatic line wrapping
set nowrap
set textwidth=0
" Set the width of the <TAB> character (I like small indents)
set tabstop=2
set shiftwidth=2
" Enable autoindenting
set autoindent
" Show commands as you type them
set showcmd
" Disable backup files
" This is mostly an annoyance fix for Windows users as Gvim forgets to to
" delete backups after save and exit
set nobackup
" Instead, write a temporary backup file while saving in case the PC explodes
" and you have to beg for repair money
set writebackup
" Hide the mouse pointer when typing text
set mousehide
" Store the last 30 console commands in the history and allow the user to
" browse them with the Up and Down arrows
set history=30
" Disable the annoying ding sounds when Vim has an error
set noerrorbells
" Flash error messages to the console instead
set visualbell
" Kill Vi compatability for Vim style
set nocompatible
" Make shift-insert work like in Xterm
map <S-Insert> <MiddleMouse>
map! <S-Insert> <MiddleMouse>
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Programming Settings
"
" Do not send a carriage return after the last line when doing web
" programming or it will cause HTML output to begin. Yikes!
set binary noeol
" Allow users to backspace over any characters, no more Vim blocking you from
" deleting that empty line
set backspace=indent,eol,start whichwrap+=<,>,[,]
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Plugin Specific Settings
"
" TagList.vim (by Yegappan Lakshmanan)
let Tlist_Use_Right_Window=1 " Place the tag list on the right side
let Tlist_Show_One_File=1 " Only show tags for the current file
map <F8> <Esc>:TlistToggle<Cr>
" PHPFolding.vim (by Ray Burgemeestre)
let php_folding=0 " Disable Vim's default PHP folding
map <F5> <Esc>:EnableFastPHPFolds<Cr>
map <F6> <Esc>:EnablePHPFolds<Cr>
map <F7> <Esc>:DisablePHPFolds<Cr>
Related Posts
- Gateway M460 laptops, Ubuntu, Xfce and you...
- Safe way to start DOSBox with config...
- I’ve updated gPHPEdit...
- How To: Getting Linux to look consistent...
Related posts brought to you by Yet Another Related Posts Plugin.
About this entry
You’re currently reading “Vim Love,” an entry on CinnamonPirate.com
- Published:
- Tuesday, August 22nd, 2006 at 7:24 pm
- Author:
- Derrick Sobodash
- Category:
- Jargon
- Previous:
- Considering a job change?












2 Comments
Jump to comment form | comments rss