Created
November 6, 2014 23:50
-
-
Save spheromak/45ba0d00441a1de7a1b3 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
" | |
" Jesse Nelson <[email protected]> | |
" ab | |
"------------------------------------------------------------------------------- | |
" | |
" | |
set nocompatible " be iMproved | |
set t_Co=256 | |
"set clipboard=unnamed | |
set ts=2 | |
set sw=2 | |
set expandtab | |
autocmd FileType go set tabstop=2|set shiftwidth=2|set noexpandtab | |
" buffer pos memory | |
set viminfo='10,\"100,:20,%,n~/.viminfo | |
function! ResCur() | |
if line("'\"") <= line("$") | |
normal! g`" | |
return 1 | |
endif | |
endfunction | |
augroup resCur | |
autocmd! | |
autocmd BufWinEnter * call ResCur() | |
augroup END | |
" Scripts and Bundles " {{{ | |
filetype off | |
set rtp+=~/.vim/bundle/Vundle.vim | |
call vundle#begin() | |
" let Vundle manage Vundle | |
" required! | |
Plugin 'gmarik/Vundle.vim' | |
" My Bundles here: | |
Plugin 'oplatek/Conque-Shell' | |
Plugin 'rizzatti/dash.vim' | |
Plugin 'scrooloose/nerdtree' | |
Plugin 'Townk/vim-autoclose' | |
Plugin 'airblade/vim-gitgutter' | |
Plugin 'Lokaltog/vim-powerline' | |
Plugin 'Lokaltog/vim-easymotion' | |
Plugin 't9md/vim-chef' | |
Plugin 'JSON.vim' | |
Plugin 'ervandew/supertab' | |
Plugin 'Blackrush/vim-gocode' | |
Plugin 'https://github.com/kien/ctrlp.vim' | |
Plugin 'altercation/vim-colors-solarized' | |
Plugin 'majutsushi/tagbar' | |
Plugin 'craigemery/vim-autotag' | |
Plugin 'scrooloose/syntastic' | |
" Gist | |
Bundle 'mattn/webapi-vim' | |
Bundle 'mattn/gist-vim' | |
" Track the engine. | |
Plugin 'SirVer/ultisnips' | |
Plugin 'tpope/vim-surround' | |
" | |
" " Snippets are separated from the engine. Add this if you want them: | |
Plugin 'honza/vim-snippets' | |
" | |
" " Trigger configuration. Do not use <tab> if you use | |
" https://github.com/Valloric/YouCompleteMe. | |
let g:UltiSnipsExpandTrigger="<tab>" | |
let g:UltiSnipsJumpForwardTrigger="<c-b>" | |
let g:UltiSnipsJumpBackwardTrigger="<c-z>" | |
" | |
" " If you want :UltiSnipsEdit to split your window. | |
" let g:UltiSnipsEditSplit="vertical" | |
call vundle#end() " required | |
let g:Powerline_symbols = 'unicode' | |
filetype plugin indent on " required! | |
" Common typos fixed. | |
ab teh the | |
ab fro for | |
ab nad and | |
ab adn and | |
ab recipie recipe | |
ab tempalte template | |
ab seperate separate | |
ab srting string | |
" lines of visible b4 scroll | |
set scrolloff=10 | |
" Date/Time stamps | |
" %a - Day of the week | |
" %b - Month | |
" %d - Day of the month | |
" %Y - Year | |
" %H - Hour | |
" %M - Minute | |
" %S - Seconds | |
" %Z - Time Zone | |
hi clear | |
set laststatus=2 | |
set statusline= | |
set statusline+=%-3.3n\ " buffer number | |
set statusline+=%f\ " filename | |
set statusline+=%h%m%r%w " status flags | |
set statusline+=\[%{strlen(&ft)?&ft:'none'}] " file type | |
set statusline+=\ %{fugitive#statusline()} " fugitive | |
set statusline+=%= " right align remainder | |
set statusline+=0x%-8B " character value | |
set statusline+=%-14(%l,%c%V%) " line, character | |
set statusline+=%<%P " file position | |
"set grepprg=ack | |
"set grepformat=%f:%l:%m | |
" Don't use Ex mode, use Q for formatting | |
map Q gq | |
"highlight clear SignColumn | |
filetype plugin indent on | |
syntax on | |
let mapleader=',' | |
set nobackup "no backup files | |
set nowritebackup "only in case you don't want a backup file while editing | |
set noswapfile "no swap files | |
"set paste | |
set number | |
set mouse=a | |
set background=dark | |
let g:solarized_visibility = "low" | |
filetype plugin on | |
highlight Pmenu ctermbg=238 gui=bold | |
"set guifont=Source\ Code\ Pro:h16 " Set default font | |
let g:SuperTabDefaultCompletionType = "context" | |
au FileType go map <leader>r :!go run %<CR> | |
let g:tagbar_type_go = { | |
\ 'ctagstype' : 'go', | |
\ 'kinds' : [ | |
\ 'p:package', | |
\ 'i:imports:1', | |
\ 'c:constants', | |
\ 'v:variables', | |
\ 't:types', | |
\ 'n:interfaces', | |
\ 'w:fields', | |
\ 'e:embedded', | |
\ 'm:methods', | |
\ 'r:constructor', | |
\ 'f:functions' | |
\ ], | |
\ 'sro' : '.', | |
\ 'kind2scope' : { | |
\ 't' : 'ctype', | |
\ 'n' : 'ntype' | |
\ }, | |
\ 'scope2kind' : { | |
\ 'ctype' : 't', | |
\ 'ntype' : 'n' | |
\ }, | |
\ 'ctagsbin' : 'gotags', | |
\ 'ctagsargs' : '-sort -silent' | |
\ } | |
" If you prefer the Omni-Completion tip window to close when a selection is | |
" " made, these lines close it on movement in insert mode or when leaving | |
" " insert mode | |
autocmd CursorMovedI * if pumvisible() == 0|pclose|endif | |
autocmd InsertLeave * if pumvisible() == 0|pclose|endif | |
" syntastic should populate the loclist | |
let g:syntastic_always_populate_loc_list = 1 | |
" jump loclist | |
map <Leader>n :lnext<CR> | |
map <Leader>p :lprev<CR> | |
autocmd StdinReadPre * let s:std_in=1 | |
autocmd VimEnter * if argc() == 0 && !exists("s:std_in") | NERDTree | endif | |
nmap <F8> :TagbarToggle<CR> | |
nmap <F1> :NERDTreeToggle<CR> | |
let g:gofmt_command = "goimports" | |
" Make gf work on Chef include_recipe lines | |
" Add all cookbooks/*/recipe dirs to Vim's path variable | |
autocmd BufRead,BufNewFile */cookbooks/*/recipes/*.rb setlocal path+=recipes;/cookbooks/**1 | |
syntax enable | |
set background=dark | |
let g:solarized_termcolors=256 | |
"let g:solarized_visibility = "high" | |
"let g:solarized_contrast = "high" | |
colorscheme solarized | |
nmap <silent> <F2> <Plug>DashSearch | |
nmap <silent> <F3> <Plug>DashSearch | |
" golint https://github.com/golang/lint | |
set rtp+=$GOPATH/src/github.com/golang/lint/misc/vim | |
autocmd BufWritePost,FileWritePost *.go execute 'Lint' | cwindow |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment