diff --git a/config/plugins/denite.vim b/config/plugins/denite.vim index b29e0770f..b9f2f7333 100644 --- a/config/plugins/denite.vim +++ b/config/plugins/denite.vim @@ -178,7 +178,12 @@ function! s:denite_my_settings() abort endfunction function! s:denite_filter_my_settings() abort + call s:clear_imap('g') + call s:clear_imap('S') + call s:clear_imap('s') + call s:clear_imap('%') imap (denite_filter_quit) + imap (denite_filter_quit):q inoremap \ p:call cursor(line('.')+1,0)pA inoremap @@ -187,4 +192,10 @@ function! s:denite_filter_my_settings() abort endfunction +function! s:clear_imap(map) abort + if maparg(a:map, 'i') + exe 'iunmap ' . a:map + endif +endfunction + " vim:set et sw=2 cc=80: diff --git a/docs/documentation.md b/docs/documentation.md index 9d2c24b3e..84516a340 100644 --- a/docs/documentation.md +++ b/docs/documentation.md @@ -764,7 +764,8 @@ endfunction ### Fuzzy finder -SpaceVim provides five fuzzy find tools, each of them is configured in a layer(`unite`, `denite`, `leaderf`, `ctrlp` and `fzf` layer). +SpaceVim provides five fuzzy find tools, each of them is configured in a layer +(`unite`, `denite`, `leaderf`, `ctrlp` and `fzf` layer). These layers have the same key bindings and features. But they need different dependencies. Users only need to load one of these layers, they will be able to get these features. @@ -791,8 +792,25 @@ for example, load the denite layer: | ` f q` | Fuzzy find quick fix | | ` f r` | Resumes Unite window | +**Key bindings within fuzzy finder buffer** + +| Key Bindings | Descriptions | +| ------------------------ | ------------------------------- | +| `` / `Ctrl-j` | Select next line | +| `Shift-` / `Ctrl-k` | Select previous line | +| `` | Leave Insert mode | +| `Ctrl-w` | Delete backward path | +| `Ctrl-u` | Delete whole line before cursor | +| `` | Run default action | +| `Ctrl-s` | Open in a split | +| `Ctrl-v` | Open in a vertical split | +| `Ctrl-t` | Open in a new tab | +| `Ctrl-g` | Close fuzzy finder | + **Differences between these layers** +The above key bindings are only part of fuzzy finder layers, please read the layers's documentations. + | Feature | denite | unite | leaderf | ctrlp | fzf | | ------------------ | :----: | :---: | :-----: | :---: | --- | | CustomKeyMaps menu | yes | yes | no | no | no | @@ -807,33 +825,6 @@ for example, load the denite layer: | quickfix list | yes | yes | no | yes | yes | | resume windows | yes | yes | no | no | no | -**Key bindings within fuzzy finder buffer** - -| Key Bindings | Descriptions | -| ------------------------ | ----------------------------------------- | -| `` / `Ctrl-j` | Select next line | -| `Shift-` / `Ctrl-k` | Select previous line | -| `j k` | Leave Insert mode (Only for denite/unite) | -| `Ctrl-w` | Delete backward path | -| `` | Run default action | -| `Ctrl-s` | Open in a split | -| `Ctrl-v` | Open in a vertical split | -| `Ctrl-t` | Open in a new tab | -| `Ctrl-g` | Exit unite | - -**Denite/Unite normal mode key bindings** - -| Key Bindings | Mode | Descriptions | -| -------------- | ------------- | ------------------------------------ | -| `Ctrl-h/k/l/r` | Normal | Un-map | -| `Ctrl-l` | Normal | Redraw | -| `` | Normal | Select actions | -| `` | Normal | Toggle mark current candidate, up | -| `r` | Normal | Replace ('search' profile) or rename | -| `Ctrl-z` | Normal/insert | Toggle transpose window | - -The above key bindings are only part of fuzzy finder layers, please read the layers's documentations. - ### Discovering #### Mappings