|
|
@ -144,27 +144,10 @@ nnoremap <leader>a :A<cr>
|
|
|
|
" dispatch
|
|
|
|
" dispatch
|
|
|
|
nnoremap <leader>d :Dispatch<cr>
|
|
|
|
nnoremap <leader>d :Dispatch<cr>
|
|
|
|
|
|
|
|
|
|
|
|
" lightline
|
|
|
|
" fzf
|
|
|
|
let g:lightline = {
|
|
|
|
if isdirectory('/usr/local/opt/fzf')
|
|
|
|
\ 'component': {
|
|
|
|
set rtp+=/usr/local/opt/fzf
|
|
|
|
\ 'lineinfo': ' %3l:%-2v',
|
|
|
|
nmap <Leader>b :Buffers<CR>
|
|
|
|
\ },
|
|
|
|
nmap <Leader>f :Files<CR>
|
|
|
|
\ 'component_function': {
|
|
|
|
nmap <Leader>t :Tags<CR>
|
|
|
|
\ 'readonly': 'LightlineReadonly',
|
|
|
|
|
|
|
|
\ 'fugitive': 'LightlineFugitive'
|
|
|
|
|
|
|
|
\ },
|
|
|
|
|
|
|
|
\ 'separator': { 'left': '', 'right': '' },
|
|
|
|
|
|
|
|
\ 'subseparator': { 'left': '', 'right': '' }
|
|
|
|
|
|
|
|
\ }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function! LightlineReadonly()
|
|
|
|
|
|
|
|
return &readonly ? '' : ''
|
|
|
|
|
|
|
|
endfunction
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function! LightlineFugitive()
|
|
|
|
|
|
|
|
if exists('*fugitive#head')
|
|
|
|
|
|
|
|
let branch = fugitive#head()
|
|
|
|
|
|
|
|
return branch !=# '' ? ''.branch : ''
|
|
|
|
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
return ''
|
|
|
|
|
|
|
|
endfunction
|
|
|
|
|
|
|
|