# vim+LeaderF-filer **Repository Path**: oneTwoThreeAll/LeaderF-filer ## Basic Information - **Project Name**: vim+LeaderF-filer - **Description**: No description available - **Primary Language**: Unknown - **License**: Apache-2.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2025-01-23 - **Last Updated**: 2025-01-23 ## Categories & Tags **Categories**: Uncategorized **Tags**: Vim ## README # LeaderF-filer This Plugin use [LeaderF](https://github.com/Yggdroot/LeaderF) to navigate the files in directory. Inspired by [vim-clap's filer provider](https://github.com/liuchengxu/vim-clap/pull/272), [helm's find-files](https://github.com/emacs-helm/helm).

leaderf-filer-gif

## Installation ``` Plug 'Yggdroot/LeaderF' Plug 'tamago324/LeaderF-filer' ``` If you use `remove_trash` and `remove_trash_force`, you need [Send2Trash](https://pypi.org/project/Send2Trash/). ## Usage ``` :Leaderf filer :Leaderf filer --popup ``` ## Screenshots `:Leaderf filer` buffer `:Leaderf filer --popup` popup `let g:Lf_FilerShowPromptPath = 1` popup-show-path-in-prompt ## Mappings ### Insert mode | Mapping | Command | Description | |-----------------------------|---------------------------|---------------------------------------------------------------------------------------------------------| | | nop | Does nothing like ``. | | ``
`` | quit | Quit from LeaderF. | | `` | up | move the cursor downward in the result window. | | `` | down | move the cursor upward in the result window. | | ``
`<2-LeftMouse>` | accept | Open the file under cursor or create a file with the input pattern file name (when empty results). | | `` | accept_horizontal | Open the file under cursor in horizontal split window. | | `` | accept_vertical | Open the file under cursor in vertical split window. | | `` | accept_tab | Open the file under cursor new tabpage. | | `` | add_selections | select multiple result. | | `` | select_all | select all result. | | `` | clear_selections | clear all selections. | | `` | preview | Preview the result. | | `` | page_up_in_preview | Scroll up in the popup preview window. | | `` | page_down_in_preview | Scroll down in the popup preview window. | | | close_preview_popup | Close popup preview window. | | | open_parent | The prompt string is cleared and show files files in the parent directory. | | `` | open_current | Show files in directory under cursor or open the file under the cursor. | | `` | toggle_hidden_files | Toggle show hidden files. | | `` | goto_root_marker_dir | Show files of directory where `g:Lf_RootMarkers` exists. | | | change_directory | Change the current directory to cwd of LeaderF-filer. | | | | | | `` | toggle_regex | Switch between fuzzy search mode and regex mode. | | `` | switch_normal_mode | Switch to normal mode. | | | open_parent_or_backspace | Show files in parent directory or delete the preceding character in the prompt if a pattern wasentered. | | `` | open_parent_or_clear_line | Show files in parent directory or clears the prompt if a pattern was entered. | | ``
`` | paste | Paste from clipboard. | | `` | clear_line | Clear the prompt. | | `` | delete_left_word | Delete the word before the cursor in the prompt. | | `` | prev_history | Recall last input pattern from history. | | `` | next_history | Recall next input pattern from history. | | `` | backspace | Delete the preceding character in the prompt. | | `` | delete | Delete the current character in the prompt. | | ``
`` | home | Move the cursor to the begin of the prompt. | | ``
`` | end | Move the cursor to the end of the prompt. | | `` | left | Move the cursor one character to the left. | | `` | right | Move the cursor one character to the right. | ### Normal mode You can view help in F1. | Mapping | Command | Description | |--------------------------------------|----------------------|----------------------------------------------------------------------------------------------------| | | nop | Does nothing like ``. | | `q` | quit | Quit from LeaderF. | | `` | up | move the cursor downward in the result window. | | `` | down | move the cursor upward in the result window. | | `o`
``
`<2-LeftMouse>` | accept | Open the file under cursor or create a file with the input pattern file name (when empty results). | | `x` | accept_horizontal | Open the file under cursor in horizontal split window. | | `v` | accept_vertical | Open the file under cursor in vertical split window. | | `t` | accept_tab | Open the file under cursor new tabpage. | | `s` | add_selections | select multiple result. | | `a` | select_all | select all result. | | `c` | clear_selections | clear all selections. | | `p` | preview | Preview the result. | | `` | page_up_in_preview | Scroll up in the popup preview window. | | `` | page_down_in_preview | Scroll down in the popup preview window. | | `` | close_preview_popup | Close popup preview window. | | `h`
`` | open_parent | The prompt string is cleared and show files files in the parent directory. | | `l`
`` | open_current | Show files in directory under cursor or open the file under the cursor. | | `I` | toggle_hidden_files | Toggle show hidden files. | | `` | goto_root_marker_dir | Show files of directory where `g:Lf_RootMarkers` exists. | | `@` | change_directory | Change the current directory to cwd of LeaderF-filer. | | | | | | `` | toggle_help | Toggle this help. | | `` | switch_insert_mode | Switch to insert mode. | | `H` | history_backward | Go backwards in history. | | `L` | history_forward | Go forwards in history. | | `K` | mkdir | Create a directory.
See `g:Lf_FilerMkdirAutoChdir` | | `O` | create_file | Create a file. | | `R` | rename | Rename files and directories. | | `C` | copy | Copy files and directories under cursor. | | `P` | paste | Paste the file or directory copied by the copy command to cwd of LeaderF-filer. | | | remove | Remove files. | | | remove_force | Remove files without confirmation. | | | remove_trash | Remove files and put in the trash. | | | remove_trash_force | Remove files and put in the trash without confirmation. | ## Credit * LeaderF-filer uses some code from [defx.nvim](https://github.com/Shougo/defx.nvim), [ranger](https://github.com/ranger/ranger). * Thanks [Send2Trash](https://pypi.org/project/Send2Trash/). ## License Apache-2.0