Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion autoload/fern/internal/window.vim
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ function! s:statusline(winnr, char) abort
let width = winwidth(a:winnr) - len(a:winnr . '') - 6
let leading = repeat(' ', width / 2)
return printf(
\ '%%#NonText#%s%%#DiffText# %s %%#NonText#',
\ '%%#FernWindowSelectStatusLine#%s%%#FernWindowSelectIndicator# %s %%#FernWindowSelectStatusLine#',
\ leading,
\ a:char,
\)
Expand All @@ -105,7 +105,19 @@ function! s:cunmap_all() abort
endfor
endfunction

function! s:highlight() abort
highlight default link FernWindowSelectStatusLine StatusLineNC
highlight default link FernWindowSelectIndicator DiffText
endfunction

call s:Config.config(expand('<sfile>:p'), {
\ 'auto_select': 1,
\ 'select_chars': split('abcdefghijklmnopqrstuvwxyz', '\zs'),
\})

augroup fern_internal_window_internal
autocmd!
autocmd ColorScheme * call s:highlight()
augroup END

call s:highlight()
12 changes: 11 additions & 1 deletion doc/fern.txt
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,8 @@ Window selector~
Fern has an internal window selector which works like
t9md/vim-choosewin. Users can quickly select which window to open a
selected node.
See |hl-FernWindowSelectIndicator| and |hl-FernWindowSelectStatusLine|
to customize the statusline when selecting a window.
https://github.com/t9md/vim-choosewin

Renamer (A.k.a exrename)~
Expand Down Expand Up @@ -615,11 +617,19 @@ FernBranchSymbol *hl-FernBranchSymbol*
An actual appearance will be determined by the |fern-renderer| thus
this highlight might not be referred.

FernBranchText *hl-FernBranchText*
FernBranchText *hl-FernBranchText*
A |highlight| group of renderer used for branch node text.
An actual appearance will be determined by the |fern-renderer| thus
this highlight might not be referred.

FernWindowSelectIndicator *hl-FernWindowSelectIndicator*
A |highlight| group used for an indicator when selecting a window
through "open:select" action.

FernWindowSelectStatusLine *hl-FernWindowSelectStatusLine*
A |highlight| group used for |statusline| when selecting a window
through "open:select" action.


=============================================================================
CHANGELOG *fern-changelog*
Expand Down