From 14af034523bc8886b3a230f14f1783ca5571147f Mon Sep 17 00:00:00 2001 From: Connor Olding Date: Sat, 23 Jan 2016 23:00:53 -0800 Subject: [PATCH] more new vim crap --- home/vimrc | 63 ++++++++++++++++++++++++++++++++++++++++++++---------- 1 file changed, 52 insertions(+), 11 deletions(-) diff --git a/home/vimrc b/home/vimrc index b0aee9e..bbfbabc 100644 --- a/home/vimrc +++ b/home/vimrc @@ -1,4 +1,3 @@ -" vim:cc=79,39 " make vim unusable for anyone else " from the get-go, we assume version >= 703 @@ -80,7 +79,6 @@ endif if has('title') | set title | endif " terminal title set history=512 " command lines to remember -set colorcolumn=79 set number " lines set ruler " write out the cursor position set showcmd " show number of lines/etc. selected @@ -96,7 +94,7 @@ set smartcase " except when uppercase is used set infercase " use existing case when ins-completing set tabstop=8 shiftwidth=8 smarttab " 8 space tabs set virtualedit=block " allow cursor anywhere in visual block -set foldmethod=marker +set foldmethod=marker " (performance issues with other methods) set foldlevelstart=99 " start with everything unfolded...? let c_syntax_for_h=1 " use C highlighting for .h files set nowrap " word wrapping is pretty weak in vim @@ -116,6 +114,20 @@ if 0 endif endif " it's really just annoying though +if has('wildignore') + " a bunch of stuff that may or may not do any good + set wildignore="" + set wildignore+=.git,.svn,.hg,pkg,tmp,crap + set wildignore+=*.bak,*.tmp,*.log,*.cache, + set wildignore+=Desktop.ini,Thumbs.db,*.lnk,.DS_Store + set wildignore+=*.zip,*.tar,*.tar.*, + set wildignore+=*.suo,*.sln,*.pch,*.pdb,*.pgc,*.pgd + set wildignore+=*.o,*.obj,*.elf,*.lib,*.a,*.dll,*.so,*.so.*,*.exe,*.out + set wildignore+=__pycache__,*.pyc,*.pyo,*.pyd + set wildignore+=*.gem,.bundle + set wildignore+=CMake*,cmake_install.cmake,install_manifest.txt +endif + " autocmd {{{1 fu! SaveSession() @@ -228,7 +240,7 @@ Inn :w! Inn :e! Inn :bd! Inn :wall -Inn :tab ball +"Inn :tab ball Inn :call KillSession():qall Inn :call KillSession():qall! @@ -268,7 +280,8 @@ nm i i?r nm a a?r nn p "0p nn P "0P -nn e :tabe +nn e :e **/* +nn b :ls:b nn :call SaveSession():xall nn d :cd %:p:h:pwd nn . @: @@ -276,6 +289,14 @@ nn . @: nn , :Tab /,\zs "nn x :system('chmod +x %') | e +" trying some copypasta from http://stackoverflow.com/a/16084326 +set path=.,** +nn f :find * +nn F :find =expand('%:h').'/*' + +" extension binds {{{1 +map :CtrlPBuffer + " messing around with colors " a la https://github.com/xolox/vim-colorscheme-switcher/blob/master/autoload/xolox/colorscheme_switcher.vim fu! HiDump() @@ -312,7 +333,7 @@ fu! ToggleHex() let b:oldbin=&bin " set new options setlocal binary " make sure it overrides any textwidth, etc. - silent :e " this will reload the file without trickeries + silent :e " this will reload the file without trickeries "(DOS line endings will be shown entirely ) let &ft="xxd" " set status @@ -355,6 +376,25 @@ catch /E185/ colorscheme desert endtry +" set up default windows on a big terminal +fu! DefaultWin() + if &columns >= 84*2 && &lines >= 36*2 + "/vim\ + "| |_| + "|.| | + "\---/ + vsplit + wincmd l + split + wincmd h + endif +endf + +augroup DefaultWin + au! + au VimEnter * call DefaultWin() +augroup END + " airline {{{1 if has('gui_running') @@ -381,9 +421,9 @@ let g:airline_mode_map = { \ } let g:airline_symbols = { -\ 'branch': 'β†’', -\ 'crypt': 'πŸ”’', -\ 'linenr': 'ΒΆ', +\ 'branch': 'ξ‚ ', +\ 'crypt': 'ξ‚’', +\ 'linenr': 'ξ‚‘', \ 'modified': '+', \ 'paste': 'ρ', \ 'readonly': 'R', @@ -391,8 +431,8 @@ let g:airline_symbols = { \ 'whitespace': 'Β·', \ } -let g:airline_left_sep = 'Β»' -let g:airline_right_sep = 'Β«' +let g:airline_left_sep = 'ξ‚°' +let g:airline_right_sep = 'ξ‚²' let g:airline#extensions#default#section_truncate_width = { \ 'b': 79, @@ -409,6 +449,7 @@ let g:airline#extensions#tabline#formatter = 'unique_tail_improved' let g:airline#extensions#tabline#show_close_button = 0 let g:airline#extensions#tabline#buffer_nr_show = 0 let g:airline#extensions#tabline#buffer_nr_format = '%s β”Š' +" ξ‚± ξ‚³ let g:airline#extensions#tabline#left_sep = 'β”Š' let g:airline#extensions#tabline#left_alt_sep = 'β”Š' let g:airline#extensions#tabline#right_sep = 'β”Š'