Created
March 7, 2012 12:26
-
-
Save serverhorror/1992823 to your computer and use it in GitHub Desktop.
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
"" MAGIC! call pathogen#infect() | |
syntax on | |
if has("autocmd") | |
filetype plugin indent on | |
endif | |
"" Variables | |
set nocompatible " Use Vim defaults (much better!) | |
set bs=2 " allow backspacing over everything in insert mode | |
set shiftwidth=4 " our default intendation is 4 characters | |
set tabstop=4 " make a <TAB> count 4 characters | |
set softtabstop=4 " treat 2 spaces as a tab | |
set visualbell " bells and whistles are bad | |
set showmatch " show us the matching brackets | |
set showmode " show us the mode we are using now | |
set smartcase " this is nicer to for search | |
set incsearch " search while we type | |
set hlsearch " and we want to see what we search for | |
set encoding=utf-8 " yes we want utf-8 | |
set textwidth=76 " textwidth is only 78 chars, easier mail quoting :) | |
set nowrap " lines longer than textwidth still shouldn't be wrapped - we want to see that | |
set autowrite " We want to save on :bn and similiar stuff | |
set expandtab " when we press tab we want it to be spaces | |
set noautoindent | |
set pastetoggle=<F5> | |
set noerrorbells | |
set esckeys | |
set nobackup | |
set writebackup | |
set showcmd | |
set laststatus=2 "always show the statusline | |
set cmdheight=4 | |
set statusline=%F%m%r%h%w\ [FORMAT=%{&ff}]\ [TYPE=%Y]\ [POS=%04l,%04v][%p%%]\ [LEN=%L] | |
" setlocal cursorline | |
set list | |
set listchars=tab:»·,trail:·,eol:¬ | |
" Test chars: (3 tabs) | |
" Test chars: (3 trailing whitespace) | |
" color theme settings | |
" install to .vim/color | |
colorscheme default | |
" Reload Snippets on request | |
nmap <C-r>r :call ReloadAllSnippets()<CR> | |
if has('gui_running') | |
set background=light | |
set mouse=a | |
" colorscheme darkblue | |
else | |
set background=dark | |
" We don't want no fckn mouse | |
set mouse= | |
endif | |
" This option hides useless files when browsing | |
set wildignore=*.pyc,*.class,*.o,*.obj,*.dmp | |
" Python settings | |
autocmd BufRead *.py setlocal tabstop=4 | |
autocmd BufRead *.py setlocal softtabstop=4 | |
autocmd BufRead *.py setlocal encoding=utf-8 | |
autocmd BufRead *.py setlocal nowrap | |
autocmd BufRead *.py setlocal expandtab | |
autocmd BufRead *.py source ~/.vim/vimrc_python | |
"ReStructuredText | |
autocmd BufRead *.rst setlocal filetype=rest syntax=rest | |
autocmd BufRead *.rest setlocal filetype=rest syntax=rest | |
"Golang | |
autocmd BufRead *.go setlocal nolist | |
autocmd BufRead *.go setlocal shiftwidth=2 | |
autocmd BufRead *.go setlocal tabstop=4 | |
autocmd BufRead *.go setlocal softtabstop=4 | |
autocmd BufRead *.go setlocal noexpandtab | |
"autocmd BufWritePost *.go :!gofmt -w % | |
" GoLang settings | |
autocmd BufRead *.py set tabstop=4 | |
autocmd BufRead *.py set softtabstop=4 | |
autocmd BufRead *.py set encoding=utf-8 | |
autocmd BufRead *.py set fileencoding=utf-8 | |
autocmd BufRead *.py set noexpandtab | |
autocmd BufRead *.py set nolist | |
autocmd FileType python set omnifunc=pythoncomplete#Complete | |
" More omni-completion stuff... | |
autocmd FileType javascript set omnifunc=javascriptcomplete#CompleteJS | |
autocmd FileType html set omnifunc=htmlcomplete#CompleteTags | |
autocmd FileType css set omnifunc=csscomplete#CompleteCSS | |
autocmd FileType xml set omnifunc=xmlcomplete#CompleteTags | |
autocmd FileType php set omnifunc=phpcomplete#CompletePHP | |
autocmd FileType c set omnifunc=ccomplete#Complete | |
" Variables for the ChangeLog plugin | |
let g:changelog_username="Martin Marcher <martin@marcher.name>" | |
let g:changelog_dateformat="%Y-%m-%d %H:%M" | |
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" | |
"" mappings START | |
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" | |
" Window movement | |
nmap <C-h> <C-w>h | |
nmap <C-j> <C-w>j | |
nmap <C-k> <C-w>k | |
nmap <C-l> <C-w>l | |
"" BEGIN Nicer unimpaired settings | |
nmap <C-up> [e | |
nmap <C-down> ]e | |
vmap <C-up> [egv | |
vmap <C-down> ]egv | |
"" END Nicer unimpaired settings | |
"" Insert Date in <F2> | |
nmap <F2> :put =strftime('%F - %H:%M:%S')<CR> | |
imap <F2> :put =strftime('%F - %H:%M:%S')<CR> | |
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" | |
"" mappings END | |
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" | |
" GPG Settings | |
let g:GPGUseAgent=1 | |
let g:GPGPreferArmor=1 | |
let g:GPGDefaultRecipients="martin@marcher.name" | |
source ~/.vim/cursorline | |
" vim:set syn=vim ft=vim ts=4 sts=4 tw=0 expandtab fenc=utf-8: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment