Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/hrsh7th/fern-mapping-call-function.vim


https://github.com/hrsh7th/fern-mapping-call-function.vim

fern-vim-plugin

Last synced: about 11 hours ago
JSON representation

Awesome Lists containing this project

README

        

# fern-mapping-call-function

The fern plugin to call your custom function.

# Warning
This plugin publish fern's internal object.
You should care about of the fern update.

# Usage

```viml

" Add your custom function to mapping.
function! s:fern_project_top(helper) abort
let l:node = a:helper.sync.get_current_node()
let l:proj = s:detect_project_root(l:node._path)
execute printf('Fern %s', fnameescape(l:proj))
endfunction
call fern#mapping#call_function#add('project_top', function('s:fern_project_top'))

autocmd! vimrc FileType fern call s:setup_fern()
function! s:setup_fern() abort

" Map to your custom function.
nmap (fern-action-call-function:project_top)

endfunction

```