Added my_config and powerline font
This commit is contained in:
parent
e858942896
commit
2091a877b1
8 changed files with 298 additions and 1 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -4,6 +4,6 @@ temp_dirs/yankring_history_v2.txt
|
||||||
sources_forked/yankring/doc/tags
|
sources_forked/yankring/doc/tags
|
||||||
sources_non_forked/tlib/doc/tags
|
sources_non_forked/tlib/doc/tags
|
||||||
sources_non_forked/ctrlp.vim/doc/tags*
|
sources_non_forked/ctrlp.vim/doc/tags*
|
||||||
my_configs.vim
|
|
||||||
tags
|
tags
|
||||||
.DS_Store
|
.DS_Store
|
||||||
|
.idea/*
|
||||||
|
|
BIN
Sauce Code Powerline Medium.otf
Normal file
BIN
Sauce Code Powerline Medium.otf
Normal file
Binary file not shown.
292
my_configs.vim
Executable file
292
my_configs.vim
Executable file
|
@ -0,0 +1,292 @@
|
||||||
|
set cmdheight=1
|
||||||
|
nmap <leader>q :q<cr>
|
||||||
|
|
||||||
|
set gfn=Source\ Code\ Pro\ for\ Powerline\ Medium\ 11
|
||||||
|
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||||
|
" => Nerd Tree Config
|
||||||
|
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||||
|
autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTree") && b:NERDTree.isTabTree()) | q | endif
|
||||||
|
map <C-n> :NERDTreeToggle<CR>
|
||||||
|
|
||||||
|
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||||
|
" => Syntastic
|
||||||
|
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||||
|
let g:syntastic_asm_checkers = ['nasm']
|
||||||
|
|
||||||
|
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||||
|
" => Airline Theme
|
||||||
|
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||||
|
let g:airline_theme='molokai'
|
||||||
|
let g:airline_powerline_fonts = 1
|
||||||
|
|
||||||
|
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||||
|
" => vim-color-solarised
|
||||||
|
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||||
|
if has("mac") || has("macunix")
|
||||||
|
let g:solarized_termcolors=256
|
||||||
|
endif
|
||||||
|
|
||||||
|
syntax enable
|
||||||
|
set background=dark
|
||||||
|
colorscheme solarized
|
||||||
|
|
||||||
|
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||||
|
"LightLine
|
||||||
|
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||||
|
|
||||||
|
"let g:lightline = {
|
||||||
|
"\ 'active': {
|
||||||
|
"\ 'left': [ [ 'mode', 'paste' ], [ 'fugitive', 'filename' ], ['ctrlpmark'] ],
|
||||||
|
"\ 'right': [ [ 'syntastic', 'lineinfo' ], ['percent'], [ 'fileformat', 'fileencoding', 'filetype' ] ]
|
||||||
|
"\ },
|
||||||
|
"\ 'component_function': {
|
||||||
|
"\ 'fugitive': 'LightLineFugitive',
|
||||||
|
"\ 'filename': 'LightLineFilename',
|
||||||
|
"\ 'fileformat': 'LightLineFileformat',
|
||||||
|
"\ 'filetype': 'LightLineFiletype',
|
||||||
|
"\ 'fileencoding': 'LightLineFileencoding',
|
||||||
|
"\ 'mode': 'LightLineMode',
|
||||||
|
"\ 'ctrlpmark': 'CtrlPMark',
|
||||||
|
"\ },
|
||||||
|
"\ 'component_expand': {
|
||||||
|
"\ 'syntastic': 'SyntasticStatuslineFlag',
|
||||||
|
"\ },
|
||||||
|
"\ 'component_type': {
|
||||||
|
"\ 'syntastic': 'error',
|
||||||
|
"\ },
|
||||||
|
"\ 'separator': { 'left': '', 'right': '' },
|
||||||
|
"\ 'subseparator': { 'left': '\ue0b1', 'right': '\ueb03' }
|
||||||
|
"\ }
|
||||||
|
|
||||||
|
"function! LightLineModified()
|
||||||
|
"return &ft =~ 'help' ? '' : &modified ? '+' : &modifiable ? '' : '-'
|
||||||
|
"endfunction
|
||||||
|
|
||||||
|
"function! LightLineReadonly()
|
||||||
|
"return &ft !~? 'help' && &readonly ? '' : ''
|
||||||
|
"endfunction
|
||||||
|
|
||||||
|
"function! LightLineFilename()
|
||||||
|
"let fname = expand('%:t')
|
||||||
|
"return fname == 'ControlP' && has_key(g:lightline, 'ctrlp_item') ? g:lightline.ctrlp_item :
|
||||||
|
"\ fname == '__Tagbar__' ? g:lightline.fname :
|
||||||
|
"\ fname =~ '__Gundo\|NERD_tree' ? '' :
|
||||||
|
"\ &ft == 'vimfiler' ? vimfiler#get_status_string() :
|
||||||
|
"\ &ft == 'unite' ? unite#get_status_string() :
|
||||||
|
"\ &ft == 'vimshell' ? vimshell#get_status_string() :
|
||||||
|
"\ ('' != LightLineReadonly() ? LightLineReadonly() . ' ' : '') .
|
||||||
|
"\ ('' != fname ? fname : '[No Name]') .
|
||||||
|
"\ ('' != LightLineModified() ? ' ' . LightLineModified() : '')
|
||||||
|
"endfunction
|
||||||
|
|
||||||
|
"function! LightLineFugitive()
|
||||||
|
"try
|
||||||
|
"if expand('%:t') !~? 'Tagbar\|Gundo\|NERD' && &ft !~? 'vimfiler' && exists('*fugitive#head')
|
||||||
|
"let mark = ''
|
||||||
|
"let branch = fugitive#head()
|
||||||
|
"return branch !=# '' ? mark.branch : ''
|
||||||
|
"endif
|
||||||
|
"catch
|
||||||
|
"endtry
|
||||||
|
"return ''
|
||||||
|
"endfunction
|
||||||
|
|
||||||
|
"function! LightLineFileformat()
|
||||||
|
"return winwidth(0) > 70 ? &fileformat . ' ' . WebDevIconsGetFileFormatSymbol() : ''
|
||||||
|
"endfunction
|
||||||
|
|
||||||
|
"function! LightLineFiletype()
|
||||||
|
"return winwidth(0) > 70 ? (&filetype !=# '' ? &filetype. ' ' . WebDevIconsGetFileTypeSymbol() : 'no ft') : ''
|
||||||
|
"endfunction
|
||||||
|
|
||||||
|
"function! LightLineFileencoding()
|
||||||
|
"return winwidth(0) > 70 ? (&fenc !=# '' ? &fenc : &enc) : ''
|
||||||
|
"endfunction
|
||||||
|
|
||||||
|
"function! LightLineMode()
|
||||||
|
"let fname = expand('%:t')
|
||||||
|
"return fname == '__Tagbar__' ? 'Tagbar' :
|
||||||
|
"\ fname == 'ControlP' ? 'CtrlP' :
|
||||||
|
"\ fname == '__Gundo__' ? 'Gundo' :
|
||||||
|
"\ fname == '__Gundo_Preview__' ? 'Gundo Preview' :
|
||||||
|
"\ fname =~ 'NERD_tree' ? 'NERDTree' :
|
||||||
|
"\ &ft == 'unite' ? 'Unite' :
|
||||||
|
"\ &ft == 'vimfiler' ? 'VimFiler' :
|
||||||
|
"\ &ft == 'vimshell' ? 'VimShell' :
|
||||||
|
"\ winwidth(0) > 60 ? lightline#mode() : ''
|
||||||
|
"endfunction
|
||||||
|
"function! CtrlPMark()
|
||||||
|
"if expand('%:t') =~ 'ControlP' && has_key(g:lightline, 'ctrlp_item')
|
||||||
|
"call lightline#link('iR'[g:lightline.ctrlp_regex])
|
||||||
|
"return lightline#concatenate([g:lightline.ctrlp_prev, g:lightline.ctrlp_item
|
||||||
|
"\ , g:lightline.ctrlp_next], 0)
|
||||||
|
"else
|
||||||
|
"return ''
|
||||||
|
"endif
|
||||||
|
"endfunction
|
||||||
|
|
||||||
|
"let g:ctrlp_status_func = {
|
||||||
|
"\ 'main': 'CtrlPStatusFunc_1',
|
||||||
|
"\ 'prog': 'CtrlPStatusFunc_2',
|
||||||
|
"\ }
|
||||||
|
|
||||||
|
"function! CtrlPStatusFunc_1(focus, byfname, regex, prev, item, next, marked)
|
||||||
|
"let g:lightline.ctrlp_regex = a:regex
|
||||||
|
"let g:lightline.ctrlp_prev = a:prev
|
||||||
|
"let g:lightline.ctrlp_item = a:item
|
||||||
|
"let g:lightline.ctrlp_next = a:next
|
||||||
|
"return lightline#statusline(0)
|
||||||
|
"endfunction
|
||||||
|
|
||||||
|
"function! CtrlPStatusFunc_2(str)
|
||||||
|
"return lightline#statusline(0)
|
||||||
|
"endfunction
|
||||||
|
"let g:tagbar_status_func = 'TagbarStatusFunc'
|
||||||
|
|
||||||
|
"function! TagbarStatusFunc(current, sort, fname, ...) abort
|
||||||
|
"let g:lightline.fname = a:fname
|
||||||
|
"return lightline#statusline(0)
|
||||||
|
"endfunction
|
||||||
|
|
||||||
|
"augroup AutoSyntastic
|
||||||
|
"autocmd!
|
||||||
|
"autocmd BufWritePost *.c,*.cpp call s:syntastic()
|
||||||
|
"augroup END
|
||||||
|
"function! s:syntastic()
|
||||||
|
"SyntasticCheck
|
||||||
|
"call lightline#update()
|
||||||
|
"endfunction
|
||||||
|
|
||||||
|
"let g:unite_force_overwrite_statusline = 0
|
||||||
|
"let g:vimfiler_force_overwrite_statusline = 0
|
||||||
|
"let g:vimshell_force_overwrite_statusline = 0
|
||||||
|
|
||||||
|
let g:lightline = {
|
||||||
|
\ 'colorscheme': 'landscape',
|
||||||
|
\ 'active': {
|
||||||
|
\ 'left': [ [ 'mode', 'paste' ], [ 'fugitive', 'filename' ], ['ctrlpmark'] ],
|
||||||
|
\ 'right': [ [ 'syntastic', 'lineinfo' ], ['percent'], [ 'fileformat', 'fileencoding', 'filetype' ] ]
|
||||||
|
\ },
|
||||||
|
\ 'component_function': {
|
||||||
|
\ 'fugitive': 'LightlineFugitive',
|
||||||
|
\ 'filename': 'LightlineFilename',
|
||||||
|
\ 'fileformat': 'LightlineFileformat',
|
||||||
|
\ 'filetype': 'LightlineFiletype',
|
||||||
|
\ 'fileencoding': 'LightlineFileencoding',
|
||||||
|
\ 'mode': 'LightlineMode',
|
||||||
|
\ 'ctrlpmark': 'CtrlPMark',
|
||||||
|
\ },
|
||||||
|
\ 'component_expand': {
|
||||||
|
\ 'syntastic': 'SyntasticStatuslineFlag',
|
||||||
|
\ },
|
||||||
|
\ 'component_type': {
|
||||||
|
\ 'syntastic': 'error',
|
||||||
|
\ },
|
||||||
|
\ 'separator': { 'left': '', 'right': '' },
|
||||||
|
\ 'subseparator': { 'left': '\ue0b1', 'right': '\ue0b3' }
|
||||||
|
\ }
|
||||||
|
|
||||||
|
function! LightlineModified()
|
||||||
|
return &ft =~ 'help' ? '' : &modified ? '+' : &modifiable ? '' : '-'
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
function! LightlineReadonly()
|
||||||
|
return &ft !~? 'help' && &readonly ? '' : ''
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
function! LightlineFilename()
|
||||||
|
let fname = expand('%:t')
|
||||||
|
return fname == 'ControlP' && has_key(g:lightline, 'ctrlp_item') ? g:lightline.ctrlp_item :
|
||||||
|
\ fname == '__Tagbar__' ? g:lightline.fname :
|
||||||
|
\ fname =~ '__Gundo\|NERD_tree' ? '' :
|
||||||
|
\ &ft == 'vimfiler' ? vimfiler#get_status_string() :
|
||||||
|
\ &ft == 'unite' ? unite#get_status_string() :
|
||||||
|
\ &ft == 'vimshell' ? vimshell#get_status_string() :
|
||||||
|
\ ('' != LightlineReadonly() ? LightlineReadonly() . ' ' : '') .
|
||||||
|
\ ('' != fname ? fname : '[No Name]') .
|
||||||
|
\ ('' != LightlineModified() ? ' ' . LightlineModified() : '')
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
function! LightlineFugitive()
|
||||||
|
try
|
||||||
|
if expand('%:t') !~? 'Tagbar\|Gundo\|NERD' && &ft !~? 'vimfiler' && exists('*fugitive#head')
|
||||||
|
let mark = '' " edit here for cool mark
|
||||||
|
let branch = fugitive#head()
|
||||||
|
return branch !=# '' ? mark.branch : ''
|
||||||
|
endif
|
||||||
|
catch
|
||||||
|
endtry
|
||||||
|
return ''
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
function! LightlineFileformat()
|
||||||
|
return winwidth(0) > 70 ? &fileformat : ''
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
function! LightlineFiletype()
|
||||||
|
return winwidth(0) > 70 ? (&filetype !=# '' ? &filetype : 'no ft') : ''
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
function! LightlineFileencoding()
|
||||||
|
return winwidth(0) > 70 ? (&fenc !=# '' ? &fenc : &enc) : ''
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
function! LightlineMode()
|
||||||
|
let fname = expand('%:t')
|
||||||
|
return fname == '__Tagbar__' ? 'Tagbar' :
|
||||||
|
\ fname == 'ControlP' ? 'CtrlP' :
|
||||||
|
\ fname == '__Gundo__' ? 'Gundo' :
|
||||||
|
\ fname == '__Gundo_Preview__' ? 'Gundo Preview' :
|
||||||
|
\ fname =~ 'NERD_tree' ? 'NERDTree' :
|
||||||
|
\ &ft == 'unite' ? 'Unite' :
|
||||||
|
\ &ft == 'vimfiler' ? 'VimFiler' :
|
||||||
|
\ &ft == 'vimshell' ? 'VimShell' :
|
||||||
|
\ winwidth(0) > 60 ? lightline#mode() : ''
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
function! CtrlPMark()
|
||||||
|
if expand('%:t') =~ 'ControlP' && has_key(g:lightline, 'ctrlp_item')
|
||||||
|
call lightline#link('iR'[g:lightline.ctrlp_regex])
|
||||||
|
return lightline#concatenate([g:lightline.ctrlp_prev, g:lightline.ctrlp_item
|
||||||
|
\ , g:lightline.ctrlp_next], 0)
|
||||||
|
else
|
||||||
|
return ''
|
||||||
|
endif
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
let g:ctrlp_status_func = {
|
||||||
|
\ 'main': 'CtrlPStatusFunc_1',
|
||||||
|
\ 'prog': 'CtrlPStatusFunc_2',
|
||||||
|
\ }
|
||||||
|
|
||||||
|
function! CtrlPStatusFunc_1(focus, byfname, regex, prev, item, next, marked)
|
||||||
|
let g:lightline.ctrlp_regex = a:regex
|
||||||
|
let g:lightline.ctrlp_prev = a:prev
|
||||||
|
let g:lightline.ctrlp_item = a:item
|
||||||
|
let g:lightline.ctrlp_next = a:next
|
||||||
|
return lightline#statusline(0)
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
function! CtrlPStatusFunc_2(str)
|
||||||
|
return lightline#statusline(0)
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
let g:tagbar_status_func = 'TagbarStatusFunc'
|
||||||
|
|
||||||
|
function! TagbarStatusFunc(current, sort, fname, ...) abort
|
||||||
|
let g:lightline.fname = a:fname
|
||||||
|
return lightline#statusline(0)
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
augroup AutoSyntastic
|
||||||
|
autocmd!
|
||||||
|
autocmd BufWritePost *.c,*.cpp call s:syntastic()
|
||||||
|
augroup END
|
||||||
|
function! s:syntastic()
|
||||||
|
SyntasticCheck
|
||||||
|
call lightline#update()
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
let g:unite_force_overwrite_statusline = 0
|
||||||
|
let g:vimfiler_force_overwrite_statusline = 0
|
||||||
|
let g:vimshell_force_overwrite_statusline = 0
|
1
sources_non_forked/nerdcommenter
Submodule
1
sources_non_forked/nerdcommenter
Submodule
|
@ -0,0 +1 @@
|
||||||
|
Subproject commit 057f6150bdb11124bcb63e85f5445fae47f383c3
|
1
sources_non_forked/nerdtree-git-plugin
Submodule
1
sources_non_forked/nerdtree-git-plugin
Submodule
|
@ -0,0 +1 @@
|
||||||
|
Subproject commit 1d9e187e76e71466deb14b8b1c546f64f8090a63
|
1
sources_non_forked/vim-devicons
Submodule
1
sources_non_forked/vim-devicons
Submodule
|
@ -0,0 +1 @@
|
||||||
|
Subproject commit 4fbf39a8984ed9a450b5cd078d65955de472bace
|
1
sources_non_forked/vim-easymotion
Submodule
1
sources_non_forked/vim-easymotion
Submodule
|
@ -0,0 +1 @@
|
||||||
|
Subproject commit 11632455de8caa40f264501df8f0a3e249cf0595
|
1
sources_non_forked/vim-signify
Submodule
1
sources_non_forked/vim-signify
Submodule
|
@ -0,0 +1 @@
|
||||||
|
Subproject commit fa5053105fe43bfa90b18052ad58a685c2313675
|
Loading…
Reference in a new issue