You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
88 lines
2.6 KiB
88 lines
2.6 KiB
" Disable listing ignored files/directories |
|
let g:fern_git_status#disable_ignored = 1 |
|
|
|
" Disable listing untracked files |
|
let g:fern_git_status#disable_untracked = 1 |
|
|
|
" Disable listing status of submodules |
|
let g:fern_git_status#disable_submodules = 1 |
|
|
|
" Disable listing status of directories |
|
let g:fern_git_status#disable_directories = 1 |
|
|
|
|
|
|
|
let g:fern#renderer = "DroidSansMono_Nerd_Font" |
|
|
|
|
|
augroup my-glyph-palette |
|
autocmd! * |
|
autocmd FileType fern call glyph_palette#apply() |
|
autocmd FileType nerdtree,startify call glyph_palette#apply() |
|
augroup END |
|
|
|
|
|
function! s:init_fern() abort |
|
" Use 'select' instead of 'edit' for default 'open' action |
|
nmap <buffer> <Plug>(fern-action-open) <Plug>(fern-action-open:select) |
|
endfunction |
|
|
|
augroup fern-custom |
|
autocmd! * |
|
autocmd FileType fern call s:init_fern() |
|
augroup END |
|
|
|
|
|
function! s:init_fern() abort |
|
" Define NERDTree like mappings |
|
nmap <buffer> o <Plug>(fern-action-open:edit) |
|
nmap <buffer> go <Plug>(fern-action-open:edit)<C-w>p |
|
nmap <buffer> t <Plug>(fern-action-open:tabedit) |
|
nmap <buffer> T <Plug>(fern-action-open:tabedit)gT |
|
nmap <buffer> i <Plug>(fern-action-open:split) |
|
nmap <buffer> gi <Plug>(fern-action-open:split)<C-w>p |
|
nmap <buffer> s <Plug>(fern-action-open:vsplit) |
|
nmap <buffer> gs <Plug>(fern-action-open:vsplit)<C-w>p |
|
nmap <buffer> ma <Plug>(fern-action-new-path) |
|
nmap <buffer> P gg |
|
|
|
nmap <buffer> C <Plug>(fern-action-enter) |
|
nmap <buffer> u <Plug>(fern-action-leave) |
|
nmap <buffer> r <Plug>(fern-action-reload) |
|
nmap <buffer> R gg<Plug>(fern-action-reload)<C-o> |
|
nmap <buffer> cd <Plug>(fern-action-cd) |
|
nmap <buffer> CD gg<Plug>(fern-action-cd)<C-o> |
|
|
|
nmap <buffer> I <Plug>(fern-action-hide-toggle) |
|
|
|
nmap <buffer> q :<C-u>quit<CR> |
|
endfunction |
|
|
|
function! s:init_fern() abort |
|
nmap <buffer><expr> |
|
\ <Plug>(fern-my-expand-or-collapse) |
|
\ fern#smart#leaf( |
|
\ "\<Plug>(fern-action-collapse)", |
|
\ "\<Plug>(fern-action-expand)", |
|
\ "\<Plug>(fern-action-collapse)", |
|
\ ) |
|
|
|
nmap <buffer><nowait> l <Plug>(fern-my-expand-or-collapse) |
|
endfunction |
|
|
|
function! s:init_fern() abort |
|
nmap <buffer><expr> |
|
\ <Plug>(fern-my-expand-or-enter) |
|
\ fern#smart#drawer( |
|
\ "\<Plug>(fern-open-or-expand)", |
|
\ "\<Plug>(fern-open-or-enter)", |
|
\ ) |
|
nmap <buffer><expr> |
|
\ <Plug>(fern-my-collapse-or-leave) |
|
\ fern#smart#drawer( |
|
\ "\<Plug>(fern-action-collapse)", |
|
\ "\<Plug>(fern-action-leave)", |
|
\ ) |
|
nmap <buffer><nowait> l <Plug>(fern-my-expand-or-enter) |
|
nmap <buffer><nowait> h <Plug>(fern-my-collapse-or-leave) |
|
endfunction |