Skip to content

Commit

Permalink
Merge pull request #11 from plkokanov/remove-pathogen
Browse files Browse the repository at this point in the history
Remove pathogen plugins
  • Loading branch information
plkokanov authored Nov 21, 2019
2 parents 6258af4 + 94c1839 commit e3f4255
Showing 1 changed file with 1 addition and 210 deletions.
211 changes: 1 addition & 210 deletions dotfiles/.vimrc
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,6 @@ set nocompatible
" set runtime path dynamically based on user env home
set runtimepath+=$DOTFILES_HOME/.vim

" pathogen bundle manager
execute pathogen#infect()
filetype plugin on

" ------------
" | HELP |
" ------------
Expand Down Expand Up @@ -340,209 +336,4 @@ endfunction
nnoremap <F7> :call GitDiffToggle()<CR>
" let vim see bash aliases when executing commands
let $BASH_ENV="$DOTFILES_HOME/.bash_aliases"

" ---------------
" | PLUGINS |
" ---------------

" nerd tree (and tabs)
" ... open by default
" autocmd VimEnter * NERDTree
" ... open only if no file is specified
autocmd StdinReadPre * let s:std_in=1
autocmd VimEnter * if argc() == 0 && !exists("s:std_in") | NERDTree | endif
" close it if nerd is the last man standing
autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTreeType") && b:NERDTreeType == "primary") | q | endif
" settings
let WebDevIconsUnicodeDecorateFolderNodes=1
let WebDevIconsUnicodeDecorateFolderNodeDefaultSymbol='ƛ'
let WebDevIconsNerdTreeAfterGlyphPadding=' '
let WebDevIconsUnicodeGlyphDoubleWidth=1
let webdevicons_conceal_nerdtree_brackets=1
" key mappings
let NERDTreeShowHidden=1
let NERDTreeMinimalUI=1
let NERDTreeDirArrows=1
let NERDTreeWinSize=50
let NERDTreeMapRefresh="<F5>"
let NERDTreeMapUpdir="<BS>"
let NERDTreeMapOpenRecursively="r"
let NERDTreeMapActivateNode="<Right>"
let NERDTreeMapCloseDir="<Left>"
let NERDTreeMapOpenSplit="h"
let NERDTreeMapOpenVSplit="v"
nnoremap <F3> :NERDTreeTabsToggle<CR>
nnoremap <S-F3> :NERDTreeTabsOpen<CR>:NERDTreeFocusToggle<CR>:NERDTreeTabsFind<CR>
" file type highlighting
function! NERDTreeHighlightFile(extension, fg, bg, guifg, guibg)
exec 'autocmd FileType nerdtree highlight ' . a:extension .' ctermbg='. a:bg .' ctermfg='. a:fg .' guibg='. a:guibg .' guifg='. a:guifg
exec 'autocmd FileType nerdtree syn match ' . a:extension .' #^\s\+.*'. a:extension .'$#'
endfunction
" ... for programming language files
call NERDTreeHighlightFile('c', 'black', 'none', 'black', '#151515')
call NERDTreeHighlightFile('cpp', 'black', 'none', 'black', '#151515')
call NERDTreeHighlightFile('go', 'cyan', 'none', 'cyan', '#151515')
call NERDTreeHighlightFile('h', 'black', 'none', 'black', '#151515')
call NERDTreeHighlightFile('hpp', 'black', 'none', 'black', '#151515')
call NERDTreeHighlightFile('java', 'red', 'none', '#ffa500', '#151515')
call NERDTreeHighlightFile('js', 'Magenta', 'none', '#ff00ff', '#151515')
call NERDTreeHighlightFile('php', 'Magenta', 'none', '#ff00ff', '#151515')
call NERDTreeHighlightFile('py', 'blue', 'none', 'blue', '#151515')
call NERDTreeHighlightFile('rb', 'red', 'none', '#ffa500', '#151515')
call NERDTreeHighlightFile('spec', 'red', 'none', '#ffa500', '#151515')
" ... for documentation files
call NERDTreeHighlightFile('md', 'blue', 'none', '#3366FF', '#151515')
call NERDTreeHighlightFile('txt', 'blue', 'none', '#3366FF', '#151515')
" ... for web files
call NERDTreeHighlightFile('css', 'Magenta', 'none', '#ff00ff', '#151515')
call NERDTreeHighlightFile('htm', 'Magenta', 'none', '#ff00ff', '#151515')
call NERDTreeHighlightFile('html', 'Magenta', 'none', '#ff00ff', '#151515')
call NERDTreeHighlightFile('styl', 'Magenta', 'none', '#ff00ff', '#151515')
" ... for media files
call NERDTreeHighlightFile('bmp', 'yellow', 'none', 'yellow', '#151515')
call NERDTreeHighlightFile('gif', 'yellow', 'none', 'yellow', '#151515')
call NERDTreeHighlightFile('jpeg', 'yellow', 'none', 'yellow', '#151515')
call NERDTreeHighlightFile('jpg', 'yellow', 'none', 'yellow', '#151515')
call NERDTreeHighlightFile('png', 'yellow', 'none', 'yellow', '#151515')
" ... for configuration files
call NERDTreeHighlightFile('bashalias', 'green', 'none', 'green', '#151515')
call NERDTreeHighlightFile('bashprofile', 'green', 'none', 'green', '#151515')
call NERDTreeHighlightFile('bashprompt', 'green', 'none', 'green', '#151515')
call NERDTreeHighlightFile('bashrc', 'green', 'none', 'green', '#151515')
call NERDTreeHighlightFile('conf', 'green', 'none', 'green', '#151515')
call NERDTreeHighlightFile('config', 'green', 'none', 'green', '#151515')
call NERDTreeHighlightFile('ini', 'green', 'none', 'green', '#151515')
call NERDTreeHighlightFile('json', 'green', 'none', 'green', '#151515')
call NERDTreeHighlightFile('xml', 'green', 'none', 'green', '#151515')
call NERDTreeHighlightFile('yaml', 'green', 'none', 'green', '#151515')
call NERDTreeHighlightFile('yml', 'green', 'none', 'green', '#151515')
" ... for shell files
call NERDTreeHighlightFile('sh', 'black', 'none', 'black', '#151515')
" ... for log files
call NERDTreeHighlightFile('log', 'black', 'none', 'black', '#151515')
" ... for git files
call NERDTreeHighlightFile('gitconfig', 'Gray', 'none', '#686868', '#151515')
call NERDTreeHighlightFile('gitignore', 'Gray', 'none', '#686868', '#151515')

" tagbar
nnoremap <F4> :TagbarToggle<CR>
inoremap <F4> <ESC>:TagbarToggle<CR>i
" fugitive
set diffopt=filler,vertical

" gitv
nnoremap <F8> :Gitv<CR>
cnoremap Gitk Gitv
cnoremap gitk Gitv
" syntastic
set statusline+=%#warningmsg#
set statusline+=%{SyntasticStatuslineFlag()}
set statusline+=%*
let g:syntastic_always_populate_loc_list = 1
let g:syntastic_auto_loc_list = 1
let g:syntastic_check_on_open = 1
let g:syntastic_check_on_wq = 0
let g:syntastic_enable_perl_checker = 1
let g:syntastic_perl_checkers = ['perl', 'yaml', 'yml']
let g:syntastic_python_checkers = [] " disable syntastic Python checkers [ 'flake8', 'frosted', 'mypy', 'pep257', 'pep8', 'prospector', 'py3kwarn', 'pyflakes', 'pylama', 'pylint', 'python']
let g:syntastic_yaml_checkers = ['yamlxs']
let g:syntastic_yml_checkers = ['yamlxs']

" python-mode
let g:pymode = 1
let g:pymode_trim_whitespaces = 1
let g:pymode_options_max_line_length = 119
let g:pymode_options_colorcolumn = 0
let g:pymode_python = 'python'
" disable python-mode Python checker: let g:pymode_lint = 0
let g:pymode_lint_ignore = 'E111'
let g:pymode_quickfix_minheight = 3
let g:pymode_quickfix_maxheight = 6

" airline (requires powerline fonts https://github.com/powerline/fonts.git;
" ideally also https://github.com/ryanoasis/vim-devicons + its modified powerline
" fonts https://github.com/ryanoasis/nerd-fonts/tree/master/patched-fonts/UbuntuMono
" (plus Nerd File Types) which you need to download and doubleclick to install them
" (will hiddenly replace the powerline fonts; font will appear under the same name))
set encoding=utf8
let g:airline_powerline_fonts = 1
let g:airline#extensions#tmuxline#enabled = 1
let g:airline#extensions#tabline#enabled = 1
let g:airline#extensions#tabline#fnamemod = ':t'

" tmuxline
" to create a new tmux statusline run :TmuxlineSnapshot! ~/.tmux.statusline
let g:tmuxline_theme = 'airline'
let g:tmuxline_preset = {
\'a' : '#(cat \"$DOTFILES_HOME/.host_alias\")',
\'b' : '#S',
\'win' : ' #W ',
\'cwin' : ' #W ',
\'y' : '%H:%M',
\'z' : '%Y-%m-%d' }

" custom tabline with tab index and full file name only
" set guitablabel=%t\ %M " not working with other plugins
" set tabline=%!MyTabLine()
function! MyTabLine()
let s = '' " complete tabline goes here
" loop through each tab page
for t in range(tabpagenr('$'))
" select the highlighting for the buffer names
if t + 1 == tabpagenr()
let s .= '%#TabLineSel#'
else
let s .= '%#TabLine#'
endif
let s .= ' ['
" set the tab page number (for mouse clicks)
let s .= '%' . (t + 1) . 'T'
" set page number string
let s .= t + 1 . ']'
" get buffer names and statuses
let n = '' "temp string for buffer names while we loop and check buftype
let m = 0 " &modified counter
let bc = len(tabpagebuflist(t + 1)) "counter to avoid last ','
" loop through each buffer in a tab
for b in tabpagebuflist(t + 1)
" buffer types: quickfix gets a [Q], help gets [H]{base fname}
if getbufvar( b, "&buftype" ) == 'help'
let n .= '[H]' . fnamemodify( bufname(b), ':t:s/.txt$//' )
elseif getbufvar( b, "&buftype" ) == 'quickfix'
let n .= '[Q]'
elseif bufname(b) == ''
let n .= '[No Name]'
else
"let n .= pathshorten(bufname(b))
"let n .= bufname(b)
let n .= fnamemodify( bufname(b), ':t' )
endif
" check and ++ tab's &modified count
if getbufvar( b, "&modified" )
let m += 1
endif
" no final ' ' added...formatting looks better done later
if bc > 1
let n .= ','
endif
let bc -= 1
endfor
" add modified label [+] where n pages in tab are modified
if m > 0
"let s .= '[' . m . '+]'
let s.= '[+]'
endif
let s .= ' '
" add buffer names
let s .= n
" switch to no underlining and add final space to buffer list
"let s .= '%#TabLineSel#' . ' '
let s .= ' '
endfor
" after the last tab fill with TabLineFill and reset tab page nr
let s .= '%#TabLineFill#%T'
return s
endfunction
let $BASH_ENV="$DOTFILES_HOME/.bash_aliases"

0 comments on commit e3f4255

Please sign in to comment.