|
9 | 9 | <div align="center"> |
10 | 10 |
|
11 | 11 | <br> |
12 | | -<sup>Fall with [vim-glyph-pallet](https://github.com/lambdalisue/vim-glyph-palette) (Colors on glyphs) on [NordFox](https://github.com/EdenEast/nightfox.nvim) (Vim's colorscheme)</sup> |
| 12 | +<sup>Fall with |
| 13 | +[vim-glyph-pallet](https://github.com/lambdalisue/vim-glyph-palette) (Colors on |
| 14 | +glyphs) on [NordFox](https://github.com/EdenEast/nightfox.nvim) (Vim's |
| 15 | +colorscheme)</sup> |
| 16 | + |
13 | 17 | </div> |
14 | 18 |
|
15 | 19 | Fall is a fuzzy finder for Vim and Neovim, implemented in [Denops], and stands |
@@ -67,156 +71,6 @@ Or use the `line` source with `README.md` as an argument: |
67 | 71 | Fall line README.md |
68 | 72 | ``` |
69 | 73 |
|
70 | | -## Key Mappings |
71 | | - |
72 | | -> [!NOTE] |
73 | | -> |
74 | | -> You can confirm your actual key mappings by opening the help window (`<F1>`). |
75 | | -
|
76 | | -| Key Mapping | Description | Plug Mapping | |
77 | | -| :------------- | :------------------------------------------------------------------ | :------------------------------------------ | |
78 | | -| `<C-t>` | Move the cursor of the list component to the first item | `<Plug>(fall-list-first)` | |
79 | | -| `<C-g>` | Move the cursor of the list component to the last item | `<Plug>(fall-list-last)` | |
80 | | -| `<C-p>` | Move the cursor of the list component to the previous item | `<Plug>(fall-list-prev)` | |
81 | | -| `<C-n>` | Move the cursor of the list component to the next item | `<Plug>(fall-list-next)` | |
82 | | -| `<C-u>` | Move the cursor of the list component up by `&scroll` | `<Plug>(fall-list-prev:scroll)` | |
83 | | -| `<C-d>` | Move the cursor of the list component down by `&scroll` | `<Plug>(fall-list-next:scroll)` | |
84 | | -| `<PageUp>` | Move the content of the list component to the left | `<Plug>(fall-list-left)` | |
85 | | -| `<PageDown>` | Move the content of the list component to the right | `<Plug>(fall-list-right)` | |
86 | | -| `<S-PageUp>` | Move the content of the list component to the left by `&scroll` | `<Plug>(fall-list-left:scroll)` | |
87 | | -| `<S-PageDown>` | Move the content of the list component to the right by `&scroll` | `<Plug>(fall-list-right:scroll)` | |
88 | | -| `<C-,>` | Select the current item in the list component | `<Plug>(fall-select)` | |
89 | | -| `<C-.>` | Select all items in the list component | `<Plug>(fall-select-all)` | |
90 | | -| `<C-j>` | Select and move the cursor to the next item | `<Plug>(fall-select)<Plug>(fall-list-next)` | |
91 | | -| `<C-k>` | Move the cursor to the previous item and select it | `<Plug>(fall-list-prev)<Plug>(fall-select)` | |
92 | | -| `<M-Home>` | Move the cursor of the preview component to the first line | `<Plug>(fall-preview-first)` | |
93 | | -| `<M-End>` | Move the cursor of the preview component to the last line | `<Plug>(fall-preview-last)` | |
94 | | -| `<M-Up>` | Move the cursor of the preview component to the previous line | `<Plug>(fall-preview-prev)` | |
95 | | -| `<M-Down>` | Move the cursor of the preview component to the next line | `<Plug>(fall-preview-next)` | |
96 | | -| `<S-Up>` | Move the cursor of the preview component up by `&scroll` | `<Plug>(fall-preview-prev:scroll)` | |
97 | | -| `<S-Down>` | Move the cursor of the preview component down by `&scroll` | `<Plug>(fall-preview-next:scroll)` | |
98 | | -| `<M-Left>` | Move the content of the preview component to the left | `<Plug>(fall-preview-left)` | |
99 | | -| `<M-Right>` | Move the content of the preview component to the right | `<Plug>(fall-preview-right)` | |
100 | | -| `<S-Left>` | Move the content of the preview component to the left by `&scroll` | `<Plug>(fall-preview-left:scroll)` | |
101 | | -| `<S-Right>` | Move the content of the preview component to the right by `&scroll` | `<Plug>(fall-preview-right:scroll)` | |
102 | | -| `<Tab>` | Open an action selector to execute an action | `<Plug>(fall-action-select)` | |
103 | | -| `<F1>` | Open or close the help window | `<Plug>(fall-help)` | |
104 | | -| `<S-Home>` | Go to the previous page in the help window | `<Plug>(fall-help-prev)` | |
105 | | -| `<S-End>` | Go to the next page in the help window | `<Plug>(fall-help-next)` | |
106 | | -| `<F2>` | Switch to the next matcher in the current picker | `<Plug>(fall-switch-matcher-next)` | |
107 | | -| `<F3>` | Switch to the next sorter in the current picker | `<Plug>(fall-switch-sorter-next)` | |
108 | | -| `<F4>` | Switch to the next renderer in the current picker | `<Plug>(fall-switch-renderer-next)` | |
109 | | -| `<F5>` | Switch to the next previewer in the current picker | `<Plug>(fall-switch-previewer-next)` | |
110 | | - |
111 | | -### Customization |
112 | | - |
113 | | -Use `FallPickerEnter:*` autocmd to customize mappings in the picker window. |
114 | | - |
115 | | -```vim |
116 | | -function! s:fall_mappings() abort |
117 | | - " Use <Up> and <Down> to move the cursor in the list component instead of <C-p> and <C-n> |
118 | | - cnoremap <silent> <Up> <Plug>(fall-list-prev) |
119 | | - cnoremap <silent> <Down> <Plug>(fall-list-next) |
120 | | - " Disable horizontal scrolling |
121 | | - cnoremap <silent> <Nop> <Plug>(fall-list-left) |
122 | | - cnoremap <silent> <Nop> <Plug>(fall-list-right) |
123 | | -endfunction |
124 | | -
|
125 | | -augroup my_fall_mapping |
126 | | - autocmd! |
127 | | - autocmd User FallPickerEnter:* call s:fall_mappings() |
128 | | -augroup END |
129 | | -``` |
130 | | - |
131 | | -If you want to invoke an action with a key mapping, you can use the |
132 | | -`fall#action()` function. |
133 | | - |
134 | | -```vim |
135 | | -function! s:fall_mappings() abort |
136 | | - cnoremap <silent> <C-e> <Cmd>call fall#action('open')<CR> |
137 | | - cnoremap <silent> <C-x> <Cmd>call fall#action('open:split')<CR> |
138 | | - cnoremap <silent> <C-v> <Cmd>call fall#action('open:vsplit')<CR> |
139 | | - cnoremap <silent> <C-t> <Cmd>call fall#action('open:tabedit')<CR> |
140 | | -endfunction |
141 | | -
|
142 | | -augroup my_fall_mapping |
143 | | - autocmd! |
144 | | - autocmd User FallPickerEnter:* call s:fall_mappings() |
145 | | -augroup END |
146 | | -``` |
147 | | - |
148 | | -If you want to apply mappings to a particular picker, you can specify the picker |
149 | | -name in the `FallPickerEnter:{name}` autocmd. |
150 | | - |
151 | | -```vim |
152 | | -" These mappings are only available on the "file" picker. |
153 | | -function! s:fall_mappings_file() abort |
154 | | - cnoremap <silent> <C-e> <Cmd>call fall#action('open')<CR> |
155 | | - cnoremap <silent> <C-x> <Cmd>call fall#action('open:split')<CR> |
156 | | - cnoremap <silent> <C-v> <Cmd>call fall#action('open:vsplit')<CR> |
157 | | - cnoremap <silent> <C-t> <Cmd>call fall#action('open:tabedit')<CR> |
158 | | -endfunction |
159 | | -
|
160 | | -augroup my_fall_mapping |
161 | | - autocmd! |
162 | | - autocmd User FallPickerEnter:file call s:fall_mappings_file() |
163 | | -augroup END |
164 | | -``` |
165 | | - |
166 | | -If you want to completely disable the default key mappings, use the |
167 | | -`g:fall_disable_default_mappings` variable. |
168 | | - |
169 | | -```vim |
170 | | -let g:fall_disable_default_mappings = v:true |
171 | | -``` |
172 | | - |
173 | | -## Configuration |
174 | | - |
175 | | -Use the `:FallConfig` command to open the configuration file. The configuration |
176 | | -file is written in TypeScript and is reloaded automatically when the file is |
177 | | -saved. |
178 | | - |
179 | | -``` |
180 | | -FallConfig |
181 | | -``` |
182 | | - |
183 | | -The following is a minimal configuration example. It defines two pickers. |
184 | | - |
185 | | -```typescript |
186 | | -import { type Entrypoint } from "jsr:@vim-fall/config@^0.17.3"; |
187 | | -import * as builtin from "jsr:@vim-fall/std@^0.6.0/builtin"; |
188 | | - |
189 | | -export const main: Entrypoint = ({ |
190 | | - defineItemPickerFromSource, |
191 | | - defineItemPickerFromCurator, |
192 | | -}) => { |
193 | | - defineItemPickerFromCurator("git-grep", builtin.curator.gitGrep, { |
194 | | - previewers: [builtin.previewer.file], |
195 | | - actions: { |
196 | | - ...builtin.action.defaultOpenActions, |
197 | | - ...builtin.action.defaultSystemopenActions, |
198 | | - ...builtin.action.defaultQuickfixActions, |
199 | | - }, |
200 | | - defaultAction: "open", |
201 | | - }); |
202 | | - |
203 | | - defineItemPickerFromSource("file", builtin.source.file, { |
204 | | - matchers: [builtin.matcher.fzf], |
205 | | - previewers: [builtin.previewer.file], |
206 | | - actions: { |
207 | | - ...builtin.action.defaultOpenActions, |
208 | | - ...builtin.action.defaultSystemopenActions, |
209 | | - ...builtin.action.defaultQuickfixActions, |
210 | | - }, |
211 | | - defaultAction: "open", |
212 | | - }); |
213 | | -}; |
214 | | -``` |
215 | | - |
216 | | -See |
217 | | -[`./denops/fall/_assets/default.config.ts`](./denops/fall/_assets/default.config.ts) |
218 | | -for the full code of the default configuration. |
219 | | - |
220 | 74 | ## Related Projects |
221 | 75 |
|
222 | 76 | | Repository | Package | Description | |
|
0 commit comments