add lightline.vim
This commit is contained in:
parent
4fb10fa88e
commit
9d153895ba
5 changed files with 172 additions and 12 deletions
|
@ -6,6 +6,7 @@ source ~/.vim_runtime/vimrcs/basic.vim
|
||||||
source ~/.vim_runtime/vimrcs/filetypes.vim
|
source ~/.vim_runtime/vimrcs/filetypes.vim
|
||||||
source ~/.vim_runtime/vimrcs/plugins_config.vim
|
source ~/.vim_runtime/vimrcs/plugins_config.vim
|
||||||
source ~/.vim_runtime/vimrcs/extended.vim
|
source ~/.vim_runtime/vimrcs/extended.vim
|
||||||
|
source ~/.vim_runtime/lightline.vim
|
||||||
|
|
||||||
try
|
try
|
||||||
source ~/.vim_runtime/my_configs.vim
|
source ~/.vim_runtime/my_configs.vim
|
||||||
|
|
60
lightline.vim
Normal file
60
lightline.vim
Normal file
|
@ -0,0 +1,60 @@
|
||||||
|
let g:lightline = {
|
||||||
|
\ 'colorscheme': 'solarized',
|
||||||
|
\ 'mode_map': { 'c': 'NORMAL' },
|
||||||
|
\ 'active': {
|
||||||
|
\ 'left': [ [ 'mode', 'paste' ], [ 'fugitive', 'filename' ] ]
|
||||||
|
\ },
|
||||||
|
\ 'component_function': {
|
||||||
|
\ 'modified': 'LightLineModified',
|
||||||
|
\ 'readonly': 'LightLineReadonly',
|
||||||
|
\ 'fugitive': 'LightLineFugitive',
|
||||||
|
\ 'filename': 'LightLineFilename',
|
||||||
|
\ 'fileformat': 'LightLineFileformat',
|
||||||
|
\ 'filetype': 'LightLineFiletype',
|
||||||
|
\ 'fileencoding': 'LightLineFileencoding',
|
||||||
|
\ 'mode': 'LightLineMode',
|
||||||
|
\ },
|
||||||
|
\ 'separator': { 'left': '', 'right': '' },
|
||||||
|
\ 'subseparator': { 'left': '', 'right': '' }
|
||||||
|
\ }
|
||||||
|
|
||||||
|
function! LightLineModified()
|
||||||
|
return &ft =~ 'help\|vimfiler\|gundo' ? '' : &modified ? '+' : &modifiable ? '' : '-'
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
function! LightLineReadonly()
|
||||||
|
return &ft !~? 'help\|vimfiler\|gundo' && &readonly ? '' : ''
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
function! LightLineFilename()
|
||||||
|
return ('' != LightLineReadonly() ? LightLineReadonly() . ' ' : '') .
|
||||||
|
\ (&ft == 'vimfiler' ? vimfiler#get_status_string() :
|
||||||
|
\ &ft == 'unite' ? unite#get_status_string() :
|
||||||
|
\ &ft == 'vimshell' ? vimshell#get_status_string() :
|
||||||
|
\ '' != expand('%:t') ? expand('%:t') : '[No Name]') .
|
||||||
|
\ ('' != LightLineModified() ? ' ' . LightLineModified() : '')
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
function! LightLineFugitive()
|
||||||
|
if &ft !~? 'vimfiler\|gundo' && exists("*fugitive#head")
|
||||||
|
let _ = fugitive#head()
|
||||||
|
return _ !=# '' ? '⭠ '._ : ''
|
||||||
|
endif
|
||||||
|
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()
|
||||||
|
return winwidth(0) > 60 ? lightline#mode() : ''
|
||||||
|
endfunction
|
|
@ -13,7 +13,7 @@ let g:solarized_italic=0 " 1 | 0
|
||||||
" let g:solarized_underline=0
|
" let g:solarized_underline=0
|
||||||
|
|
||||||
set background=light " dark light
|
set background=light " dark light
|
||||||
:colorscheme solarized " solarized ir_black mayansmoke
|
:colorscheme solarized "peaksea solarized ir_black mayansmoke
|
||||||
|
|
||||||
" syntastic
|
" syntastic
|
||||||
set statusline+=%#warningmsg#
|
set statusline+=%#warningmsg#
|
||||||
|
@ -57,11 +57,6 @@ map <leader>t7 :tabnext 7<cr>
|
||||||
map <leader>t8 :tabnext 8<cr>
|
map <leader>t8 :tabnext 8<cr>
|
||||||
map <leader>t9 :tabnext 9<cr>
|
map <leader>t9 :tabnext 9<cr>
|
||||||
|
|
||||||
" mapping :tlist to ,tg
|
|
||||||
" map <leader>tg :TlistOpen<cr>
|
|
||||||
" add current file to tlist
|
|
||||||
" map <leader>ta :TlistAddFiles %<cr>
|
|
||||||
|
|
||||||
" use tagbar to instead of taglist
|
" use tagbar to instead of taglist
|
||||||
let g:tagbar_left = 1
|
let g:tagbar_left = 1
|
||||||
let g:tagbar_width = 30
|
let g:tagbar_width = 30
|
||||||
|
@ -88,12 +83,6 @@ set guioptions-=T
|
||||||
" 删除文件时自动删除文件对应 buffer
|
" 删除文件时自动删除文件对应 buffer
|
||||||
let NERDTreeAutoDeleteBuffer=1
|
let NERDTreeAutoDeleteBuffer=1
|
||||||
|
|
||||||
" Uncomment the following to have Vim jump to the last position when reopening a file
|
|
||||||
if has("autocmd")
|
|
||||||
au BufReadPost * if line("'\"") > 0 && line("'\"") <= line("$")
|
|
||||||
\| exe "normal! g`\"" | endif
|
|
||||||
endif
|
|
||||||
|
|
||||||
" multi_cursor
|
" multi_cursor
|
||||||
" Default mapping
|
" Default mapping
|
||||||
let g:multi_cursor_next_key='<C-n>'
|
let g:multi_cursor_next_key='<C-n>'
|
||||||
|
|
110
sources_non_forked/ctrlp.vim/doc/tags-cn
Normal file
110
sources_non_forked/ctrlp.vim/doc/tags-cn
Normal file
|
@ -0,0 +1,110 @@
|
||||||
|
!_TAG_FILE_ENCODING utf-8 //
|
||||||
|
'ctrl-p' ctrlp.cnx /*'ctrl-p'*
|
||||||
|
'ctrlp' ctrlp.cnx /*'ctrlp'*
|
||||||
|
'ctrlp-<c-p>' ctrlp.cnx /*'ctrlp-<c-p>'*
|
||||||
|
'ctrlp-autocompletion' ctrlp.cnx /*'ctrlp-autocompletion'*
|
||||||
|
'ctrlp-fullregexp' ctrlp.cnx /*'ctrlp-fullregexp'*
|
||||||
|
'ctrlp-pasting' ctrlp.cnx /*'ctrlp-pasting'*
|
||||||
|
'ctrlp-wildignore' ctrlp.cnx /*'ctrlp-wildignore'*
|
||||||
|
'g:ctrlp_abbrev' ctrlp.cnx /*'g:ctrlp_abbrev'*
|
||||||
|
'g:ctrlp_arg_map' ctrlp.cnx /*'g:ctrlp_arg_map'*
|
||||||
|
'g:ctrlp_brief_prompt' ctrlp.cnx /*'g:ctrlp_brief_prompt'*
|
||||||
|
'g:ctrlp_buffer_func' ctrlp.cnx /*'g:ctrlp_buffer_func'*
|
||||||
|
'g:ctrlp_bufname_mod' ctrlp.cnx /*'g:ctrlp_bufname_mod'*
|
||||||
|
'g:ctrlp_bufpath_mod' ctrlp.cnx /*'g:ctrlp_bufpath_mod'*
|
||||||
|
'g:ctrlp_buftag_ctags_bin' ctrlp.cnx /*'g:ctrlp_buftag_ctags_bin'*
|
||||||
|
'g:ctrlp_buftag_systemenc' ctrlp.cnx /*'g:ctrlp_buftag_systemenc'*
|
||||||
|
'g:ctrlp_buftag_types' ctrlp.cnx /*'g:ctrlp_buftag_types'*
|
||||||
|
'g:ctrlp_by_filename' ctrlp.cnx /*'g:ctrlp_by_filename'*
|
||||||
|
'g:ctrlp_cache_dir' ctrlp.cnx /*'g:ctrlp_cache_dir'*
|
||||||
|
'g:ctrlp_clear_cache_on_exit' ctrlp.cnx /*'g:ctrlp_clear_cache_on_exit'*
|
||||||
|
'g:ctrlp_cmd' ctrlp.cnx /*'g:ctrlp_cmd'*
|
||||||
|
'g:ctrlp_custom_ignore' ctrlp.cnx /*'g:ctrlp_custom_ignore'*
|
||||||
|
'g:ctrlp_default_input' ctrlp.cnx /*'g:ctrlp_default_input'*
|
||||||
|
'g:ctrlp_follow_symlinks' ctrlp.cnx /*'g:ctrlp_follow_symlinks'*
|
||||||
|
'g:ctrlp_key_loop' ctrlp.cnx /*'g:ctrlp_key_loop'*
|
||||||
|
'g:ctrlp_lazy_update' ctrlp.cnx /*'g:ctrlp_lazy_update'*
|
||||||
|
'g:ctrlp_line_prefix' ctrlp.cnx /*'g:ctrlp_line_prefix'*
|
||||||
|
'g:ctrlp_map' ctrlp.cnx /*'g:ctrlp_map'*
|
||||||
|
'g:ctrlp_match_current_file' ctrlp.cnx /*'g:ctrlp_match_current_file'*
|
||||||
|
'g:ctrlp_match_func' ctrlp.cnx /*'g:ctrlp_match_func'*
|
||||||
|
'g:ctrlp_match_window' ctrlp.cnx /*'g:ctrlp_match_window'*
|
||||||
|
'g:ctrlp_max_depth' ctrlp.cnx /*'g:ctrlp_max_depth'*
|
||||||
|
'g:ctrlp_max_files' ctrlp.cnx /*'g:ctrlp_max_files'*
|
||||||
|
'g:ctrlp_max_history' ctrlp.cnx /*'g:ctrlp_max_history'*
|
||||||
|
'g:ctrlp_mruf_case_sensitive' ctrlp.cnx /*'g:ctrlp_mruf_case_sensitive'*
|
||||||
|
'g:ctrlp_mruf_default_order' ctrlp.cnx /*'g:ctrlp_mruf_default_order'*
|
||||||
|
'g:ctrlp_mruf_exclude' ctrlp.cnx /*'g:ctrlp_mruf_exclude'*
|
||||||
|
'g:ctrlp_mruf_include' ctrlp.cnx /*'g:ctrlp_mruf_include'*
|
||||||
|
'g:ctrlp_mruf_max' ctrlp.cnx /*'g:ctrlp_mruf_max'*
|
||||||
|
'g:ctrlp_mruf_relative' ctrlp.cnx /*'g:ctrlp_mruf_relative'*
|
||||||
|
'g:ctrlp_mruf_save_on_update' ctrlp.cnx /*'g:ctrlp_mruf_save_on_update'*
|
||||||
|
'g:ctrlp_open_func' ctrlp.cnx /*'g:ctrlp_open_func'*
|
||||||
|
'g:ctrlp_open_multiple_files' ctrlp.cnx /*'g:ctrlp_open_multiple_files'*
|
||||||
|
'g:ctrlp_open_new_file' ctrlp.cnx /*'g:ctrlp_open_new_file'*
|
||||||
|
'g:ctrlp_open_single_match' ctrlp.cnx /*'g:ctrlp_open_single_match'*
|
||||||
|
'g:ctrlp_prompt_mappings' ctrlp.cnx /*'g:ctrlp_prompt_mappings'*
|
||||||
|
'g:ctrlp_regexp' ctrlp.cnx /*'g:ctrlp_regexp'*
|
||||||
|
'g:ctrlp_reuse_window' ctrlp.cnx /*'g:ctrlp_reuse_window'*
|
||||||
|
'g:ctrlp_root_markers' ctrlp.cnx /*'g:ctrlp_root_markers'*
|
||||||
|
'g:ctrlp_show_hidden' ctrlp.cnx /*'g:ctrlp_show_hidden'*
|
||||||
|
'g:ctrlp_status_func' ctrlp.cnx /*'g:ctrlp_status_func'*
|
||||||
|
'g:ctrlp_switch_buffer' ctrlp.cnx /*'g:ctrlp_switch_buffer'*
|
||||||
|
'g:ctrlp_tabpage_position' ctrlp.cnx /*'g:ctrlp_tabpage_position'*
|
||||||
|
'g:ctrlp_tilde_homedir' ctrlp.cnx /*'g:ctrlp_tilde_homedir'*
|
||||||
|
'g:ctrlp_use_caching' ctrlp.cnx /*'g:ctrlp_use_caching'*
|
||||||
|
'g:ctrlp_user_command' ctrlp.cnx /*'g:ctrlp_user_command'*
|
||||||
|
'g:ctrlp_working_path_mode' ctrlp.cnx /*'g:ctrlp_working_path_mode'*
|
||||||
|
'g:loaded_ctrlp' ctrlp.cnx /*'g:loaded_ctrlp'*
|
||||||
|
:CtrlP ctrlp.cnx /*:CtrlP*
|
||||||
|
:CtrlPBookmarkDir ctrlp.cnx /*:CtrlPBookmarkDir*
|
||||||
|
:CtrlPBookmarkDirAdd ctrlp.cnx /*:CtrlPBookmarkDirAdd*
|
||||||
|
:CtrlPBufTag ctrlp.cnx /*:CtrlPBufTag*
|
||||||
|
:CtrlPBufTagAll ctrlp.cnx /*:CtrlPBufTagAll*
|
||||||
|
:CtrlPBuffer ctrlp.cnx /*:CtrlPBuffer*
|
||||||
|
:CtrlPChange ctrlp.cnx /*:CtrlPChange*
|
||||||
|
:CtrlPChangeAll ctrlp.cnx /*:CtrlPChangeAll*
|
||||||
|
:CtrlPClearAllCaches ctrlp.cnx /*:CtrlPClearAllCaches*
|
||||||
|
:CtrlPClearCache ctrlp.cnx /*:CtrlPClearCache*
|
||||||
|
:CtrlPDir ctrlp.cnx /*:CtrlPDir*
|
||||||
|
:CtrlPLastMode ctrlp.cnx /*:CtrlPLastMode*
|
||||||
|
:CtrlPLine ctrlp.cnx /*:CtrlPLine*
|
||||||
|
:CtrlPMRU ctrlp.cnx /*:CtrlPMRU*
|
||||||
|
:CtrlPMixed ctrlp.cnx /*:CtrlPMixed*
|
||||||
|
:CtrlPQuickfix ctrlp.cnx /*:CtrlPQuickfix*
|
||||||
|
:CtrlPRTS ctrlp.cnx /*:CtrlPRTS*
|
||||||
|
:CtrlPRoot ctrlp.cnx /*:CtrlPRoot*
|
||||||
|
:CtrlPTag ctrlp.cnx /*:CtrlPTag*
|
||||||
|
:CtrlPUndo ctrlp.cnx /*:CtrlPUndo*
|
||||||
|
ClearAllCtrlPCaches ctrlp.cnx /*ClearAllCtrlPCaches*
|
||||||
|
ClearCtrlPCache ctrlp.cnx /*ClearCtrlPCache*
|
||||||
|
ControlP ctrlp.cnx /*ControlP*
|
||||||
|
CtrlP ctrlp.cnx /*CtrlP*
|
||||||
|
ResetCtrlP ctrlp.cnx /*ResetCtrlP*
|
||||||
|
ctrlp-autoignore-extension ctrlp.cnx /*ctrlp-autoignore-extension*
|
||||||
|
ctrlp-changelog ctrlp.cnx /*ctrlp-changelog*
|
||||||
|
ctrlp-commands ctrlp.cnx /*ctrlp-commands*
|
||||||
|
ctrlp-content ctrlp.cnx /*ctrlp-content*
|
||||||
|
ctrlp-credits ctrlp.cnx /*ctrlp-credits*
|
||||||
|
ctrlp-customization ctrlp.cnx /*ctrlp-customization*
|
||||||
|
ctrlp-default-value ctrlp.cnx /*ctrlp-default-value*
|
||||||
|
ctrlp-extensions ctrlp.cnx /*ctrlp-extensions*
|
||||||
|
ctrlp-input-formats ctrlp.cnx /*ctrlp-input-formats*
|
||||||
|
ctrlp-intro ctrlp.cnx /*ctrlp-intro*
|
||||||
|
ctrlp-mappings ctrlp.cnx /*ctrlp-mappings*
|
||||||
|
ctrlp-miscellaneous-configs ctrlp.cnx /*ctrlp-miscellaneous-configs*
|
||||||
|
ctrlp-options ctrlp.cnx /*ctrlp-options*
|
||||||
|
ctrlp.txt ctrlp.cnx /*ctrlp.txt*
|
||||||
|
g:ctrlp_dont_split ctrlp.cnx /*g:ctrlp_dont_split*
|
||||||
|
g:ctrlp_dotfiles ctrlp.cnx /*g:ctrlp_dotfiles*
|
||||||
|
g:ctrlp_highlight_match ctrlp.cnx /*g:ctrlp_highlight_match*
|
||||||
|
g:ctrlp_jump_to_buffer ctrlp.cnx /*g:ctrlp_jump_to_buffer*
|
||||||
|
g:ctrlp_live_update ctrlp.cnx /*g:ctrlp_live_update*
|
||||||
|
g:ctrlp_match_window_bottom ctrlp.cnx /*g:ctrlp_match_window_bottom*
|
||||||
|
g:ctrlp_match_window_reversed ctrlp.cnx /*g:ctrlp_match_window_reversed*
|
||||||
|
g:ctrlp_max_height ctrlp.cnx /*g:ctrlp_max_height*
|
||||||
|
g:ctrlp_mru_files ctrlp.cnx /*g:ctrlp_mru_files*
|
||||||
|
g:ctrlp_open_multi ctrlp.cnx /*g:ctrlp_open_multi*
|
||||||
|
g:ctrlp_persistent_input ctrlp.cnx /*g:ctrlp_persistent_input*
|
||||||
|
g:ctrlp_regexp_search ctrlp.cnx /*g:ctrlp_regexp_search*
|
||||||
|
string-match ctrlp.cnx /*string-match*
|
Loading…
Reference in a new issue