Created
January 9, 2011 05:12
-
-
Save basicxman/771435 to your computer and use it in GitHub Desktop.
Will get in repo later.
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
" Vim configuration - Andrew Horsman [basicxman] | |
" Reference | |
" Surround Plugin: | |
" <Normal> cst - Change surrounding tag | |
" <Normal> dst - Delete surrounding tag | |
" Operating system dependent options | |
if has("win32") | |
" Windows specific options | |
source $VIMRUNTIME/vimrc_example.vim | |
source $VIMRUNTIME/mswin.vim | |
behave mswin | |
:cd C:\Users\Andrew " Ctrl+S for save. | |
set guifont=Consolas | |
else | |
if has("unix") | |
let s:uname = system("uname") | |
if s:uname == "Darwin\n" | |
" Mac OS X specific options | |
else | |
" Linux specific options | |
endif | |
endif | |
endif | |
" autocmd options | |
if has("autocmd") | |
" Automagically reload vimrc after edit. | |
autocmd bufwritepost .vimrc source $MYVIMRC | |
autocmd bufwritepost _vimrc source $MYVIMRC " Windows :| | |
" Load indent files for language-dependent indenting. | |
filetype plugin indent on | |
endif | |
" gvim options | |
if has("gui_running") | |
set guioptions-=T | |
endif | |
" <injekt> In many terminal emulators the mouse works just fine, thus enable | |
" it. | |
if has('mouse') | |
set mouse=a | |
endif | |
" Regular options | |
" --------------- | |
set nocompatible " Who the hell uses vi? | |
set title " Set window title | |
set number " Line numbering | |
set showmatch " Match opening/closing punctuation together | |
set nobackup " Git is my backup. | |
set nowritebackup " Git is my backup. | |
set foldenable " Folding <3 (take that injekt!) | |
set noswapfile " wurt. | |
set ruler " Cursor position! | |
set noerrorbells " Annoying as !@#$ | |
set visualbell " Flashes screen for 20mS instead of error bell. | |
set cursorline " Highlight line of cursor (awesome sauce) | |
set nowrap " Also annoying. | |
set splitbelow " Splitting buffers goes below instead of above | |
set showmatch " Matching brackets/braces etc | |
set nohlsearch " Highlighting searches are so annoying. | |
set incsearch " Incremental searching. | |
set foldmethod=indent " Awesome folding! (folds via indentation) | |
set whichwrap+=<,>,h,l,b,[,] " Backspace and cursor keys wrap back to previous line! | |
set history=2000 " Command history | |
syntax on | |
" Indentation | |
set autoindent | |
set smartindent | |
set shiftwidth=2 | |
set tabstop=2 | |
set smarttab | |
set expandtab | |
" Tab completion | |
set wildmode=list:longest,list:full | |
" Themeing | |
colorscheme desert | |
" Keyboard shortcuts | |
nmap <C-t> :tabnew<CR> | |
imap <C-t> <Esc>:tabnew<CR> | |
nmap <C-b> :tabclose<CR> | |
imap <C-b> <Esc>:tabclose<CR> | |
nmap <C-Tab> :tabn<CR> | |
imap <C-Tab> <Esc>:tabn<CR> | |
nmap <C-S-Tab> :tabp<CR> | |
imap <C-S-Tab> <Esc>:tabp<CR> | |
nmap <C-d> dd | |
imap <C-d> <Esc>dd | |
nmap <C-S> :update<CR> | |
imap <C-S> <Esc>:update<CR> | |
vmap <C-S> <Esc>:update<CR> | |
nmap ,vrc :tabedit $MYVIMRC<CR> | |
nmap ,nt :NERDTreeToggle<CR> | |
nmap ,ntc :NERDTreeClose<CR> | |
nmap ,h :split<CR> | |
nmap ,v :vs<CR> | |
nmap ,ff :FufCoverageFile<CR> | |
imap <C-space> <Esc> | |
inoremap <S-Right> <Esc>$i | |
inoremap <S-Left> <Esc>^i | |
nnoremap <Left> :echoe "Use h!"<CR> | |
nnoremap <Right> :echoe "Use l!"<CR> | |
nnoremap <Up> :echoe "Use k!"<CR> | |
nnoremap <Down> :echoe "Use j"<CR> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment