Created
November 19, 2010 06:45
-
-
Save sathishmanohar/706200 to your computer and use it in GitHub Desktop.
Gvim Configuration File
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set nocompatible | |
source $VIMRUNTIME/vimrc_example.vim | |
source $VIMRUNTIME/mswin.vim | |
behave mswin | |
filetype plugin on | |
filetype indent on | |
" Sathish: Following lines set line numbers in all files | |
set number | |
" Sathish: Following lines set GUI Font and Color scheme | |
set guifont=Monaco:h10 | |
colorscheme dusk | |
" Sathish: Following Line Set default encoding to utf-8 for files | |
set enc=utf-8 | |
" Sathish: New Splits are opened below or right of current splits | |
set splitbelow | |
set splitright | |
" Sathish: New Splits are opened below or right of current splits | |
set linespace=3 | |
" Sathish: Auto indent and smart indent | |
set smartindent | |
set autoindent | |
" Sathish: Enable Code Folding | |
set foldmethod=indent "fold based on indent | |
set foldnestmax=10 "deepest fold is 10 levels | |
set nofoldenable "dont fold by default | |
set foldlevel=1 "this is just what i use | |
" Sathish: Following line sets default tabstop to 4 spaces | |
set tabstop=3 | |
set shiftwidth=3 | |
" Sathish: Make searches case insensitive | |
set ignorecase | |
" Sathish: tell vim to keep a backup file | |
set backup | |
" Sathish: tell vim where to put its backup files | |
" NOTE: vimbackup directory has to be created in user directory | |
set backupdir=~\vimbackup\ | |
" Sathish: tell vim where to put swap files | |
" Note: vimbackup directory has to be created in user directory | |
set dir=~\vimbackup\ | |
"Sathish: Shortcut for editing vimrc file | |
nmap ,ev :tabedit $MYVIMRC<cr> | |
"Sathish: space types : in normal mode | |
nmap <space> : | |
"Sathish: Automatically change current directory to that of the file in the buffer | |
autocmd BufEnter * cd %:p:h | |
"Sathish: Shortcut for NerdTreeToggle | |
nmap ,nt :NERDTreeToggle<cr> | |
nmap ,no :NERDTree | |
let NERDTreeShowHidden=1 "Sathish: Show Hidden files in NERDTree | |
"Sathish: Automatically reload _VIMRC when its changed | |
if has("autocmd") | |
autocmd bufwritepost _VIMRC source $MYVIMRC | |
endif | |
"Sathish: Open Current Buffer in Firefox | |
abbrev ff :! start firefox %:p<cr> | |
"Sathish: Open Current Buffer in Chrome | |
abbrev cm :! start chrome %:p<cr> | |
"Sathish: Open Current Buffer in IE | |
abbrev ie :! start iexplore %:p<cr> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment