diff options
| -rw-r--r-- | basic.vim | 3 | ||||
| -rw-r--r-- | init.vim | 67 | ||||
| -rw-r--r-- | vim/Makefile | 59 | ||||
| -rw-r--r-- | vim/base.vim | 48 | ||||
| -rw-r--r-- | vim/filetypes.vim | 98 | ||||
| -rw-r--r-- | vim/listchars.vim | 12 | ||||
| -rw-r--r-- | vim/mouse.vim | 8 | ||||
| -rw-r--r-- | vim/plugins.vim | 34 | ||||
| -rw-r--r-- | vim/syntax.vim | 7 | ||||
| -rw-r--r-- | vim/warning.vim | 9 |
10 files changed, 27 insertions, 318 deletions
@@ -1,7 +1,9 @@ " Basic vimrc for systems you don't want to copy the full one to set background=dark +nmap <leader>n :set invnu<CR> set nu set encoding=utf-8 +nmap <leader>l :set list!<CR> set listchars=tab:▸\ ,eol:¬,trail:• set colorcolumn=80 set fileencoding=utf-8 @@ -14,4 +16,3 @@ set shiftwidth=4 set noexpandtab set mouse+=a syntax on -colorscheme slate @@ -9,7 +9,7 @@ set nomodeline execute pathogen#infect('bundle/{}', 'themes/{}') " Allow me to hide buffers w/o saving -set hidden +" set hidden " Persistent undo set undofile @@ -28,7 +28,7 @@ inoremap <Up> <NOP> inoremap <Down> <NOP> " Always show status line -set laststatus=2 +" set laststatus=2 " Case insensitive searching by default set ic @@ -41,55 +41,38 @@ set updatecount=0 " Vi in-compatibility set nocompatible - " Bring down the tab spacing set tabstop=4 set shiftwidth=4 set noexpandtab - -" Maily for the ability to match HTML tags with '%' -runtime macros/matchit.vim - -" 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> -" +" 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" +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']) -" 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 - -nmap <F8> :TagbarToggle<CR> - -let g:ctrlp_follow_symlinks = 1 -let g:ctrlp_working_path_mode = 0 - autocmd Filetype python call SetPythonOptions() autocmd Filetype htmldjango call SethtmldjangoOptions() autocmd Filetype json call SetJsonOptions() @@ -103,8 +86,8 @@ autocmd Filetype markdown call SetMarkdownOptions() function SetMarkdownOptions() set spell - set tabstop=4 - set shiftwidth=4 + set tabstop=2 + set shiftwidth=2 set expandtab AcpDisable endfunction @@ -160,9 +143,9 @@ function SetShellOptions() set smartindent endfunction function SetGoOptions() - " colorscheme acme - " syntax off - " colorscheme 256_noir + set tabstop=8 + set noexpandtab + # The ACP is pretty slow with my Go plugins enabled AcpDisable set nolist set noic @@ -170,6 +153,9 @@ function SetGoOptions() 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 @@ -192,14 +178,10 @@ augroup END 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:• -" 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: ¯ ⇒ ⇥ ⇨ ⇏ ⇸ → " Be smart about the mouse set mouse+=a @@ -211,8 +193,9 @@ endif " Line numbers set nu +" Backslash-n ( \-n ) will toggle line numbers on and off +nmap <leader>n :set invnu<CR> " Derp syntax on -" syntax off colorscheme distinguished diff --git a/vim/Makefile b/vim/Makefile deleted file mode 100644 index 5d60657..0000000 --- a/vim/Makefile +++ /dev/null @@ -1,59 +0,0 @@ - -all: default install clean - -install: - cp stage ../init.vim - -clean: - # remove *.bak files for the in-place editing - rm stage *.bak - -main: - cat \ - base.vim \ - plugins.vim \ - filetypes.vim \ - listchars.vim \ - mouse.vim \ - syntax.vim \ - >> stage - -default:main - echo "colorscheme distinguished" \ - >> stage - -solarized: - echo "colorscheme solarized" >> stage - -solarized_dark: solarized - echo "set backgroud=dark" >> stage - -solarized_256: solarized - echo "let g:solarized_termcolors=256" >> stage - -solarized_dark_256: solarized solarized_dark solarized_256 - -base: - # Disable Plugins for base - cat \ - warning.vim \ - base.vim \ - > stage - -disable_plugins: - # Using -i.bak for compatibility with BSD sed - sed -i.bak -e'/pathogen#infect/d' stage - - -help: - @echo "Current build options are:" - @echo " default: builds full configuratoin ( default )" - @echo " main: builds full configuratoin without colors" - @echo " solarized: adds solarized light ( requires terminal theme )" - @echo " solarized_dark: adds solarized dark ( requires terminal theme )" - @echo " solarized_256: adds solarized ( 256color )" - @echo " solarized_dark_256: adds solarized dark ( 256color )" - @echo " base: builds a basic configuration" - @echo " disable_plugins: Disable pathogen ( plugin support )" - @echo " clean: cleans the stage file" - @echo " install: installs the staged config" diff --git a/vim/base.vim b/vim/base.vim deleted file mode 100644 index 73bd8c1..0000000 --- a/vim/base.vim +++ /dev/null @@ -1,48 +0,0 @@ -set encoding=utf-8 " The encoding displayed. -set fileencoding=utf-8 " The encoding written to file. - -" 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 - - diff --git a/vim/filetypes.vim b/vim/filetypes.vim deleted file mode 100644 index b14b47e..0000000 --- a/vim/filetypes.vim +++ /dev/null @@ -1,98 +0,0 @@ -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=4 - set shiftwidth=4 - 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() - " 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 - -" 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 diff --git a/vim/listchars.vim b/vim/listchars.vim deleted file mode 100644 index 74af5df..0000000 --- a/vim/listchars.vim +++ /dev/null @@ -1,12 +0,0 @@ -" 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: ¯ ⇒ ⇥ ⇨ ⇏ ⇸ → diff --git a/vim/mouse.vim b/vim/mouse.vim deleted file mode 100644 index 3679475..0000000 --- a/vim/mouse.vim +++ /dev/null @@ -1,8 +0,0 @@ - -" Be smart about the mouse -set mouse+=a -if &term =~ '^screen' - " tmux knows the extended mouse mode - set ttymouse=xterm2 -endif - diff --git a/vim/plugins.vim b/vim/plugins.vim deleted file mode 100644 index 83c220a..0000000 --- a/vim/plugins.vim +++ /dev/null @@ -1,34 +0,0 @@ -" Maily for the ability to match HTML tags with '%' -runtime macros/matchit.vim - -" 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> -" -" Enable the list of buffers -let g:airline#extensions#tabline#enabled = 1 - -" Show just the filename -let g:airline#extensions#tabline#fnamemod = ':t' - -" 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 - -nmap <F8> :TagbarToggle<CR> - -let g:ctrlp_follow_symlinks = 1 -let g:ctrlp_working_path_mode = 0 - diff --git a/vim/syntax.vim b/vim/syntax.vim deleted file mode 100644 index ac43b2a..0000000 --- a/vim/syntax.vim +++ /dev/null @@ -1,7 +0,0 @@ - -" Line numbers -set nu - -" Derp -syntax on -" syntax off diff --git a/vim/warning.vim b/vim/warning.vim deleted file mode 100644 index 429a12e..0000000 --- a/vim/warning.vim +++ /dev/null @@ -1,9 +0,0 @@ -" __ ___ ____ _ _ ___ _ _ ____ -" \ \ / / \ | _ \| \ | |_ _| \ | |/ ___| -" \ \ /\ / / _ \ | |_) | \| || || \| | | _ -" \ V V / ___ \| _ <| |\ || || |\ | |_| | -" \_/\_/_/ \_\_| \_\_| \_|___|_| \_|\____| -" -" File automatically generated see $HOME/.vim/vim - - |
