Skip to content

Instantly share code, notes, and snippets.

NeoBundleFetch 'Shougo/neobundle.vim'
NeoBundle 'Shougo/vimproc.vim', {
\ 'build' : {
\ 'windows' : 'make -f make_mingw32.mak',
\ 'cygwin' : 'make -f make_cygwin.mak',
\ 'mac' : 'make -f make_mac.mak',
\ 'unix' : 'make -f make_unix.mak',
\ },
\ }
NeoBundleLazy 'Shougo/vimfiler', {
function! g:yaml_load(filename)
ruby << EOF
require 'yaml'
obj = YAML.load_file(File.expand_path(VIM::evaluate('a:filename')))
obj_hash = obj.inspect.gsub('=>', ':').gsub('nil', '{}')
VIM::command("let l:ret = #{obj_hash}")
EOF
return l:ret
endfunction
let s:my_bundles = g:yaml_load('~/.vim/bundles.yml')
for bundle in s:my_bundles
for [bundle_source_name, bundle_options] in items(bundle)
execute 'NeoBundle "' . bundle_source_name . '", ' . string(bundle_options)
endfor
endfor
let g:switch_custom_definitions =
\ [
\ {
\ '\vhttps://github.com/(.*)/(.*)': '\1/\2'
\ }
\ ]
augroup LightLine
autocmd!
autocmd WinEnter,BufWinEnter,FileType,ColorScheme * call lightline#update()
autocmd ColorScheme,SessionLoadPost * call lightline#highlight()
autocmd CursorMoved,BufUnload * call lightline#update_once()
augroup END
function! s:filtered_lightline_call(funcname)
if bufname('%') == '__CS__'
return
endif
execute 'call lightline#' . a:funcname . '()'
endfunction
augroup LightLine
autocmd!
autocmd WinEnter,BufWinEnter,FileType,ColorScheme * call s:filtered_lightline_call('update')
autocmd ColorScheme,SessionLoadPost * call s:filtered_lightline_call('highlight')
autocmd CursorMoved,BufUnload * call s:filtered_lightline_call('update_once')
augroup END
let s:plugin_setting_dirname = expand('~/.vim/plugin_settings')
function! s:edit_plugin_setting(plugin_name)
if !isdirectory(s:plugin_setting_dirname)
call mkdir(s:plugin_setting_dirname)
endif
execute 'edit' s:plugin_setting_dirname . '/' . a:plugin_name . '.vim'
endfunction
command! -nargs=1