GitXplorerGitXplorer
L

fern-mapping-fzf.vim

public
25 stars
2 forks
1 issues

Commits

List of commits on branch master.
Verified
1015a02b8b8717df3501fa7729c78f7f1e6eeaf1

Merge pull request #7 from yuki-yano/fix/customize_option_doc

LLumaKernel committed 4 years ago
Unverified
5ca4780e0f4ee0cca8768ea4a94ca201175f9db4

Fix Fern_mapping_fzf_customize_option doc

yyuki-yano committed 4 years ago
Verified
d71c6b69faf4c44c30e30fadeb287378f2db3de5

Update fern-mapping-fzf.txt

LLumaKernel committed 4 years ago
Verified
2fd30cbda71f38facea3a624345fc97db4283882

Update README.md

LLumaKernel committed 4 years ago
Verified
e8c855c4475884f24d45cc53899d0d07445fb22e

Merge pull request #6 from LumaKernel/fern-helper

LLumaKernel committed 4 years ago
Unverified
c0f274893d35a6db537f1483a25daf821d873f22

udpate readme

LLumaKernel committed 4 years ago

README

The README file for this repository.

fern-mapping-fzf.vim

fern plugin

Dependencies

  • lambdalisue/fern.vim
  • junegunn/fzf
  • For Windows users, sh and find command compatible with UNIX-like.
    • You can find them from like Cygwin. (Note that some tools are not working fine.)

Installation

Example for dein with TOML.

[[plugins]]
repo = 'LumaKernel/fern-mapping-fzf.vim'
depends = ['fzf', 'fern.vim']

Usage

Mapping Action Description
ff fzf-files Fzf for files
fd fzf-dirs Fzf for directories
fa fzf-both Fzf for both files and directories
frf fzf-root-files Fzf for files from root
frd fzf-root-dirs Fzf for directories from root
fra fzf-root-both Fzf for both files and directories from root

More details, see :help fern-mapping-fzf .

Screenshot

fern-mapping-fzf

Sample settings

FZF multiple and mark on Fern

function! Fern_mapping_fzf_customize_option(spec)
    let a:spec.options .= ' --multi'
    " Note that fzf#vim#with_preview comes from fzf.vim
    if exists('*fzf#vim#with_preview')
        return fzf#vim#with_preview(a:spec)
    else
        return a:spec
    endif
endfunction

function! Fern_mapping_fzf_before_all(dict)
    if !len(a:dict.lines)
        return
    endif
    return a:dict.fern_helper.async.update_marks([])
endfunction

function! s:reveal(dict)
    execute "FernReveal -wait" a:dict.relative_path
    execute "normal \<Plug>(fern-action-mark:set)"
endfunction

let g:Fern_mapping_fzf_file_sink = function('s:reveal')
let g:Fern_mapping_fzf_dir_sink = function('s:reveal')

License

MIT