aboutsummaryrefslogtreecommitdiff
path: root/init.vim
diff options
context:
space:
mode:
authorMitch Riedstra <Mitch@riedstra.us>2016-02-25 09:01:53 -0500
committerMitch Riedstra <Mitch@riedstra.us>2016-02-25 09:01:53 -0500
commit2e885acd2773579a379750d6c7ad046bea8ba314 (patch)
treecf5fcd9d2bb0d5ba9ba28b739271e370b448fa55 /init.vim
downloadvim-cfg-2e885acd2773579a379750d6c7ad046bea8ba314.tar.gz
vim-cfg-2e885acd2773579a379750d6c7ad046bea8ba314.tar.xz
Initial
Diffstat (limited to 'init.vim')
-rw-r--r--init.vim192
1 files changed, 192 insertions, 0 deletions
diff --git a/init.vim b/init.vim
new file mode 100644
index 0000000..5ec402e
--- /dev/null
+++ b/init.vim
@@ -0,0 +1,192 @@
+execute pathogen#infect('bundle/{}', 'themes/{}')
+
+" My old standard theme
+" colorscheme distinguished
+
+" My new favorite theme
+colorscheme alduin
+
+" Love hate relationship with this thing. I guess it's back
+map <C-n> :NERDTreeToggle<CR>
+
+
+" To enable/disable the autocomplete dropdown
+nmap <leader> [ :AcpDisable<CR>
+nmap <leader> ] :AcpEnable<CR>
+
+" Gundo
+nnoremap <F5> :GundoToggle<CR>
+
+" Show me where I should end my lines
+set colorcolumn=80
+
+" Allow me to hide buffers w/o saving
+set hidden
+
+" Persistent undo
+set undofile
+set undodir=~/.vimundo
+set undolevels=1000
+set undoreload=10000
+
+" lots of history, it's always nice to find old nasty command that happen
+" to be really useful
+set history=10000
+
+" Be smart about the mouse
+set mouse+=a
+if &term =~ '^screen'
+ " tmux knows the extended mouse mode
+ set ttymouse=xterm2
+endif
+
+" Always show status line
+set laststatus=2
+
+" Enable the list of buffers
+let g:airline#extensions#tabline#enabled = 1
+
+" Show just the filename
+let g:airline#extensions#tabline#fnamemod = ':t'
+
+" Backslash l
+nmap <leader>l :set list!<CR>
+" If you want listchars
+set list
+" set listchars=tab:\|\
+set listchars=tab:▸\ ,eol:¬,trail:•
+" set listchars=tab:▸\ ,eol:¬
+" set listchars=tab:\|\ ,eol:↴
+" set listchars=tab:\|\ ,eol:$
+" set listchars=tab:\⇒\ ,eol:↴
+" Tabs show up as MARCON, aka 0xC2 0xAF
+" Misc symbols for tabs: ¯ ⇒ ⇥ ⇨ ⇏ ⇸ →
+
+" This lets you just hit enter instead
+" of pressing control-n Some people like it
+" personally I'm not that much of a fan
+" set completeopt=longest,menuone
+
+" Omni completion
+filetype plugin on
+set omnifunc=syntaxcomplete#Complete
+
+" Keep the newbs from using arrow keys
+inoremap <Left> <NOP>
+inoremap <Right> <NOP>
+inoremap <Up> <NOP>
+inoremap <Down> <NOP>
+
+nmap <F8> :TagbarToggle<CR>
+
+let g:ctrlp_follow_symlinks = 1
+let g:ctrlp_working_path_mode = 0
+
+" Line numbers
+set nu
+
+" Derp
+syntax on
+" syntax off
+
+" Case insensitive searching by default
+set ic
+" Highlight my searches by default
+set hls
+
+set encoding=utf-8 " The encoding displayed.
+set fileencoding=utf-8 " The encoding written to file.
+
+" Do not read modeline from comments
+set nomodeline
+
+" No more swap files
+set updatecount=0
+
+" Vi in-compatibility
+set nocompatible
+
+
+autocmd Filetype python call SetPythonOptions()
+autocmd Filetype htmldjango call SethtmldjangoOptions()
+autocmd Filetype json call SetJsonOptions()
+autocmd Filetype php call SetPHPOptions()
+autocmd Filetype html call SetHTMLOptions()
+autocmd Filetype sh call SetShellOptions()
+autocmd Filetype go call SetGoOptions()
+autocmd Filetype yaml call SetYamlOptions()
+
+function SetPythonOptions()
+ set tabstop=4
+ set shiftwidth=4
+ set expandtab
+ filetype indent on
+ set smartindent
+endfunction
+function SetJsonOptions()
+ set tabstop=3
+ set shiftwidth=3
+ set expandtab
+ filetype indent on
+ set smartindent
+endfunction
+function SethtmldjangoOptions()
+ set tabstop=2
+ set shiftwidth=2
+ set expandtab
+ filetype indent on
+ set smartindent
+endfunction
+function SetPHPOptions()
+ set colorcolumn=120
+ set tabstop=4
+ set shiftwidth=4
+ set expandtab
+ filetype indent on
+ set smartindent
+endfunction
+function SetHTMLOptions()
+ set colorcolumn=120
+ set tabstop=2
+ set shiftwidth=2
+ set expandtab
+ filetype indent on
+ set smartindent
+endfunction
+function SetShellOptions()
+ set tabstop=4
+ set shiftwidth=4
+ set noexpandtab
+ filetype indent on
+ set smartindent
+endfunction
+function SetGoOptions()
+ " colorscheme acme
+ " syntax off
+ " colorscheme 256_noir
+ AcpDisable
+ set nolist
+ set noic
+ set nolist
+endfunction
+function SetYamlOptions()
+ set listchars=tab:▸\ ,eol:¬,trail:•,space:·
+ " set listchars=tab:▸\ ,eol:¬,trail:•
+ set expandtab
+ set noic
+endfunction
+
+set tabstop=4
+set shiftwidth=4
+set noexpandtab
+
+
+function! PhpSyntaxOverride()
+ hi! def link phpDocTags phpDefine
+ hi! def link phpDocParam phpType
+endfunction
+
+augroup phpSyntaxOverride
+ autocmd!
+ autocmd FileType php call PhpSyntaxOverride()
+augroup END