diff options
| author | Mitch Riedstra <mitch@riedstra.us> | 2018-10-29 00:01:44 -0400 |
|---|---|---|
| committer | Mitch Riedstra <mitch@riedstra.us> | 2018-10-29 00:01:44 -0400 |
| commit | 188cc44f0d8b090caa740fa7e9b6a197df38b88f (patch) | |
| tree | 44db8d4a284f82f88fc96126f79164c594d2007e /init.vim | |
| parent | 0dbc1ced53ab90811238ba2c25d52f0ceaadff55 (diff) | |
| download | vim-cfg-188cc44f0d8b090caa740fa7e9b6a197df38b88f.tar.gz vim-cfg-188cc44f0d8b090caa740fa7e9b6a197df38b88f.tar.xz | |
massive refactor of my vimrc
Diffstat (limited to 'init.vim')
| -rw-r--r-- | init.vim | 196 |
1 files changed, 6 insertions, 190 deletions
@@ -1,201 +1,17 @@ -set encoding=utf-8 " The encoding displayed. -set fileencoding=utf-8 " The encoding written to file. - -set colorcolumn=80 - -" Apparently there are security issues with this? -set nomodeline - execute pathogen#infect('bundle/{}', 'themes/{}') -" 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 -" -" Keep the newbs from using arrow keys -inoremap <Left> <NOP> -inoremap <Right> <NOP> -inoremap <Up> <NOP> -inoremap <Down> <NOP> - -" Always show status line -" set laststatus=2 - -" Case insensitive searching by default -set ic -" Highlight my searches by default -set hls - -" No more swap files -set updatecount=0 - -" Vi in-compatibility -set nocompatible - -" Bring down the tab spacing -set tabstop=4 -set shiftwidth=4 -set noexpandtab - -map <C-n> :NERDTreeToggle<CR> - -" To enable/disable the autocomplete dropdown -nmap <leader> [ :AcpDisable<CR> -nmap <leader> ] :AcpEnable<CR> +source ~/.vim/inc/basics.vim +source ~/.vim/inc/rebinds.vim +source ~/.vim/inc/undo.vim +source ~/.vim/inc/filetype-options.vim +source ~/.vim/inc/airline.vim +source ~/.vim/inc/ctrlp.vim " Omni completion filetype plugin on set omnifunc=syntaxcomplete#Complete -let g:ctrlp_follow_symlinks = 1 -let g:ctrlp_working_path_mode = 0 - -" Enable the list of buffers -let g:airline#extensions#tabline#enabled = 1 -" Show just the filename -let g:airline#extensions#tabline#fnamemod = ':t' - -if !exists('g:airline_symbols') - let g:airline_symbols = {} -endif -let g:airline_symbols.space = "\ua0" - -let g:airline_section_z = airline#section#create(['windowswap', '%3p%% ', 'linenr', ':%3v']) - - -autocmd Filetype python call SetPythonOptions() -autocmd Filetype htmldjango call SethtmldjangoOptions() -autocmd Filetype json call SetJsonOptions() -autocmd Filetype javascript call SetjavascriptOptions() -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() -autocmd Filetype markdown call SetMarkdownOptions() - -function SetMarkdownOptions() - set spell - set tabstop=2 - set shiftwidth=2 - set expandtab - AcpDisable -endfunction -function SetPythonOptions() - set tabstop=4 - set shiftwidth=4 - set expandtab - filetype indent on - set smartindent -endfunction -function SetjavascriptOptions() - set tabstop=2 - set shiftwidth=2 - 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() - set tabstop=8 - set noexpandtab - # The ACP is pretty slow with my Go plugins enabled - AcpDisable - set nolist - set noic - set nolist -endfunction -function SetYamlOptions() - " set listchars=tab:▸\ ,eol:¬,trail:•,space:· - set tabstop=2 - set shiftwidth=2 - set expandtab - set listchars=tab:▸\ ,eol:¬,trail:• - set expandtab - set noic -endfunction - -" This is specifically for Salt's state files 'sls' -autocmd BufNewFile,BufRead *.sls set filetype=yaml - - -function! PhpSyntaxOverride() - hi! def link phpDocTags phpDefine - hi! def link phpDocParam phpType -endfunction - -augroup phpSyntaxOverride - autocmd! - autocmd FileType php call PhpSyntaxOverride() -augroup END -" Backslash l -nmap <leader>l :set list!<CR> -" If you want listchars set list -" If you don't have a UTF8 compatible terminal you'll want to use this line -" instead -" set listchars=tab:\|\ -set listchars=tab:▸\ ,eol:¬,trail:• - -" Be smart about the mouse -set mouse+=a -if &term =~ '^screen' - " tmux knows the extended mouse mode - set ttymouse=xterm2 -endif - - -" Line numbers -set nu -" Backslash-n ( \-n ) will toggle line numbers on and off -nmap <leader>n :set invnu<CR> -" Derp -syntax on colorscheme distinguished |
