initial commit

This commit is contained in:
2015-03-29 18:22:30 -04:00
commit c491f0fea7
146 changed files with 14482 additions and 0 deletions

109
.vim/plugin/airline.vim Normal file
View File

@@ -0,0 +1,109 @@
" MIT License. Copyright (c) 2013-2014 Bailey Ling.
" vim: et ts=2 sts=2 sw=2
if &cp || v:version < 702 || (exists('g:loaded_airline') && g:loaded_airline)
finish
endif
let g:loaded_airline = 1
" autocmd VimEnter * call airline#deprecation#check()
let s:airline_initialized = 0
let s:airline_theme_defined = 0
function! s:init()
if !s:airline_initialized
let s:airline_initialized = 1
call airline#init#bootstrap()
call airline#extensions#load()
call airline#init#sections()
let s:airline_theme_defined = exists('g:airline_theme')
if s:airline_theme_defined || !airline#switch_matching_theme()
let g:airline_theme = get(g:, 'airline_theme', 'dark')
call airline#switch_theme(g:airline_theme)
endif
endif
endfunction
function! s:on_window_changed()
if pumvisible()
return
endif
call <sid>init()
call airline#update_statusline()
endfunction
function! s:on_colorscheme_changed()
call <sid>init()
if !s:airline_theme_defined
if airline#switch_matching_theme()
return
endif
endif
" couldn't find a match, or theme was defined, just refresh
call airline#load_theme()
endfunction
function airline#cmdwinenter(...)
call airline#extensions#apply_left_override('Command Line', '')
endfunction
function! s:airline_toggle()
if exists("#airline")
augroup airline
au!
augroup END
augroup! airline
if exists("s:stl")
let &stl = s:stl
endif
silent doautocmd User AirlineToggledOff
else
let s:stl = &statusline
augroup airline
autocmd!
autocmd CmdwinEnter *
\ call airline#add_statusline_func('airline#cmdwinenter')
\ | call <sid>on_window_changed()
autocmd CmdwinLeave * call airline#remove_statusline_func('airline#cmdwinenter')
autocmd ColorScheme * call <sid>on_colorscheme_changed()
autocmd VimEnter,WinEnter,BufWinEnter,FileType,BufUnload,VimResized *
\ call <sid>on_window_changed()
autocmd BufWritePost */autoload/airline/themes/*.vim
\ exec 'source '.split(globpath(&rtp, 'autoload/airline/themes/'.g:airline_theme.'.vim', 1), "\n")[0]
\ | call airline#load_theme()
augroup END
silent doautocmd User AirlineToggledOn
if s:airline_initialized
call <sid>on_window_changed()
endif
endif
endfunction
function! s:get_airline_themes(a, l, p)
let files = split(globpath(&rtp, 'autoload/airline/themes/'.a:a.'*'), "\n")
return map(files, 'fnamemodify(v:val, ":t:r")')
endfunction
function! s:airline_theme(...)
if a:0
call airline#switch_theme(a:1)
else
echo g:airline_theme
endif
endfunction
command! -nargs=? -complete=customlist,<sid>get_airline_themes AirlineTheme call <sid>airline_theme(<f-args>)
command! AirlineToggleWhitespace call airline#extensions#whitespace#toggle()
command! AirlineToggle call <sid>airline_toggle()
command! AirlineRefresh call airline#load_theme() | call airline#update_statusline()
call <sid>airline_toggle()

144
.vim/plugin/easytags.vim Normal file
View File

@@ -0,0 +1,144 @@
" Vim plug-in
" Author: Peter Odding <peter@peterodding.com>
" Last Change: June 29, 2014
" URL: http://peterodding.com/code/vim/easytags/
" Requires: Exuberant Ctags (http://ctags.sf.net)
" Support for automatic update using the GLVS plug-in.
" GetLatestVimScripts: 3114 1 :AutoInstall: easytags.zip
" Don't source the plug-in when it's already been loaded or &compatible is set.
if &cp || exists('g:loaded_easytags')
finish
endif
" Make sure vim-misc is installed. {{{1
try
" The point of this code is to do something completely innocent while making
" sure the vim-misc plug-in is installed. We specifically don't use Vim's
" exists() function because it doesn't load auto-load scripts that haven't
" already been loaded yet (last tested on Vim 7.3).
call type(g:xolox#misc#version)
catch
echomsg "Warning: The vim-easytags plug-in requires the vim-misc plug-in which seems not to be installed! For more information please review the installation instructions in the readme (also available on the homepage and on GitHub). The vim-easytags plug-in will now be disabled."
let g:loaded_easytags = 1
finish
endtry
" Configuration defaults and initialization. {{{1
if !exists('g:easytags_file')
if xolox#misc#os#is_win()
let g:easytags_file = '~\_vimtags'
else
let g:easytags_file = '~/.vimtags'
endif
endif
if !exists('g:easytags_by_filetype')
let g:easytags_by_filetype = ''
endif
if !exists('g:easytags_events')
let g:easytags_events = ['BufWritePost']
if !exists('g:easytags_on_cursorhold') || g:easytags_on_cursorhold
call extend(g:easytags_events, ['CursorHold', 'CursorHoldI'])
endif
if exists('g:easytags_always_enabled') && g:easytags_always_enabled
call extend(g:easytags_events, ['BufReadPost', 'FocusGained', 'ShellCmdPost', 'ShellFilterPost'])
endif
endif
if !exists('g:easytags_ignored_filetypes')
let g:easytags_ignored_filetypes = '^tex$'
endif
if exists('g:easytags_ignored_syntax_groups')
call xolox#misc#msg#warn("easytags.vim %s: The 'g:easytags_ignored_syntax_groups' option is no longer supported. It has been moved back into the code base for more flexible handling at runtime.", g:xolox#easytags#version)
endif
if !exists('g:easytags_python_script')
let g:easytags_python_script = expand('<sfile>:p:h') . '/../misc/easytags/highlight.py'
endif
" Make sure Exuberant Ctags >= 5.5 is installed.
if !xolox#easytags#initialize('5.5')
" Did the user configure the plug-in to suppress the regular warning message?
if !(exists('g:easytags_suppress_ctags_warning') && g:easytags_suppress_ctags_warning)
" Explain to the user what went wrong:
if !exists('g:easytags_ctags_version') || empty(g:easytags_ctags_version)
" Exuberant Ctags is not installed / could not be found.
let s:msg = "easytags.vim %s: Plug-in not loaded because Exuberant Ctags isn't installed!"
if executable('apt-get')
let s:msg .= " On Ubuntu & Debian you can install Exuberant Ctags by"
let s:msg .= " installing the package named `exuberant-ctags':"
let s:msg .= " sudo apt-get install exuberant-ctags"
else
let s:msg .= " Please download & install Exuberant Ctags from http://ctags.sf.net"
endif
call xolox#misc#msg#warn(s:msg, g:xolox#easytags#version)
else
" The installed version is too old.
let s:msg = "easytags.vim %s: Plug-in not loaded because Exuberant Ctags 5.5"
let s:msg .= " or newer is required while you have version %s installed!"
call xolox#misc#msg#warn(s:msg, g:xolox#easytags#version, g:easytags_ctags_version)
endif
unlet s:msg
endif
" Stop loading the plug-in; don't define the (automatic) commands.
finish
endif
" The plug-in initializes the &tags option as soon as possible so that the
" global tags file is available when using "vim -t some_tag". If &tags is
" reset, we'll try again on the "VimEnter" automatic command event (below).
call xolox#easytags#register(1)
" The :UpdateTags and :HighlightTags commands. {{{1
command! -bar -bang -nargs=* -complete=file UpdateTags call xolox#easytags#update(0, <q-bang> == '!', [<f-args>])
command! -bar HighlightTags call xolox#easytags#highlight()
command! -bang TagsByFileType call xolox#easytags#update#convert_by_filetype(<q-bang> == '!')
" Automatic commands. {{{1
augroup PluginEasyTags
autocmd!
" This is the alternative way of registering the global tags file using
" the automatic command event "VimEnter". Apparently this makes the
" plug-in behave better when used together with tplugin?
autocmd VimEnter * call xolox#easytags#register(1)
" Define the automatic commands to perform updating/highlighting.
for s:eventname in g:easytags_events
if s:eventname !~? 'cursorhold'
execute 'autocmd' s:eventname '* call xolox#easytags#autoload(' string(s:eventname) ')'
endif
endfor
" Define an automatic command to register file type specific tags files?
if !empty(g:easytags_by_filetype)
autocmd FileType * call xolox#easytags#register(0)
endif
" After reloading a buffer the dynamic syntax highlighting is lost. The
" following code makes sure the highlighting is refreshed afterwards.
autocmd BufReadPost * unlet! b:easytags_last_highlighted
" During :vimgrep each searched buffer triggers an asynchronous tags file
" update resulting in races for the tags file. To avoid this we temporarily
" disable automatic tags file updates during :vimgrep.
autocmd QuickFixCmdPre *vimgrep* call xolox#easytags#disable_automatic_updates()
autocmd QuickFixCmdPost *vimgrep* call xolox#easytags#restore_automatic_updates()
augroup END
" Use vim-misc to register an event handler for Vim's CursorHold and
" CursorHoldI events which is rate limited so that our event handler is never
" called more than once every interval.
if index(g:easytags_events, 'CursorHold') >= 0
call xolox#misc#cursorhold#register({'function': 'xolox#easytags#autoload', 'arguments': ['CursorHold'], 'interval': xolox#misc#option#get('easytags_updatetime_min', 4000)/1000})
endif
" }}}1
" Make sure the plug-in is only loaded once.
let g:loaded_easytags = 1
" vim: ts=2 sw=2 et

View File

@@ -0,0 +1,19 @@
" Vim plug-in
" Author: Peter Odding <peter@peterodding.com>
" Last Change: June 21, 2014
" URL: http://peterodding.com/code/vim/misc/
" Don't source the plug-in when it's already been loaded or &compatible is set.
if &cp || exists('g:loaded_xolox_misc')
finish
endif
" Automatic commands used by the vim-misc plug-in.
augroup PluginXoloxMisc
autocmd! CursorHold,CursorHoldI * call xolox#misc#cursorhold#autocmd()
augroup END
" Make sure the plug-in is only loaded once.
let g:loaded_xolox_misc = 1
" vim: ts=2 sw=2 et