Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/LumaKernel/fern-mapping-fzf.vim
fern.vim plugin for fzf.
https://github.com/LumaKernel/fern-mapping-fzf.vim
fern fern-vim-plugin fzf vim
Last synced: 3 months ago
JSON representation
fern.vim plugin for fzf.
- Host: GitHub
- URL: https://github.com/LumaKernel/fern-mapping-fzf.vim
- Owner: LumaKernel
- Created: 2020-03-30T09:21:47.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2021-09-20T00:10:33.000Z (about 3 years ago)
- Last Synced: 2024-06-10T01:38:26.928Z (5 months ago)
- Topics: fern, fern-vim-plugin, fzf, vim
- Language: Vim script
- Homepage:
- Size: 47.9 KB
- Stars: 25
- Watchers: 2
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# fern-mapping-fzf.vim
[![fern plugin](https://img.shields.io/badge/🌿%20fern-plugin-yellowgreen)](https://github.com/lambdalisue/fern.vim)
## Dependencies
- [lambdalisue/fern.vim](https://github.com/lambdalisue/fern.vim)
- [junegunn/fzf](https://github.com/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](https://github.com/Shougo/dein.vim) with TOML.
```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`](https://github.com/LumaKernel/fern-mapping-fzf.vim/blob/master/doc/fern-mapping-fzf.txt) .
## Screenshot
![fern-mapping-fzf](https://user-images.githubusercontent.com/29811106/77903876-8e00ef00-72be-11ea-8d17-fa312cc2ab93.gif)
## Sample settings
### FZF multiple and mark on Fern
```vim
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
endfunctionfunction! Fern_mapping_fzf_before_all(dict)
if !len(a:dict.lines)
return
endif
return a:dict.fern_helper.async.update_marks([])
endfunctionfunction! s:reveal(dict)
execute "FernReveal -wait" a:dict.relative_path
execute "normal \(fern-action-mark:set)"
endfunctionlet g:Fern_mapping_fzf_file_sink = function('s:reveal')
let g:Fern_mapping_fzf_dir_sink = function('s:reveal')
```## License
[MIT](https://github.com/LumaKernel/fern-mapping-fzf.vim/blob/master/LICENSE)