Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/hrsh7th/fern-mapping-call-function.vim
- Owner: hrsh7th
- Created: 2020-02-05T10:40:08.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2022-01-17T09:41:47.000Z (almost 3 years ago)
- Last Synced: 2024-11-09T05:13:37.323Z (about 2 months ago)
- Topics: fern-vim-plugin
- Language: Vim script
- Homepage:
- Size: 1.95 KB
- Stars: 4
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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
```