Skip to content

Commit

Permalink
Add document about <Plug>(fern-wait)
Browse files Browse the repository at this point in the history
  • Loading branch information
lambdalisue committed Jun 12, 2020
1 parent 0dbedea commit d62d87a
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions doc/fern.txt
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,25 @@ hit "e", add the following code:
" Use 'open:split' instead of 'open:edit' for 'open' action
nmap <buffer> <Plug>(fern-action-open) <Plug>(fern-action-open:split)
<
*fern-custom-wait*
Fern provide following mapping helper:

*<Plug>(fern-wait)* Wait until the fern buffer become ready which
would opened just before this mapping. This is
required while fern buffers are loaded
asynchronously but mappings are inovked
synchronously.

For example, following execute "tcd:root" action every after "leave" action.
>
nmap <buffer> <Plug>(fern-my-leave-and-tcd)
\ <Plug>(fern-action-leave)
\ <Plug>(fern-wait)
\ <Plug>(fern-action-tcd:root)
<
Without <Plug>(fern-wait), the "tcd:root" action will be invoked before actual
"leave" while "leave" action is asynchronous.

*fern-custom-smart*
Fern provide following mapping helper functions:

Expand Down

0 comments on commit d62d87a

Please sign in to comment.