1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-02-15 23:39:27 +08:00

docs(flygrep): add flygrep_next_version opt

This commit is contained in:
Eric Wong 2025-01-31 12:56:10 +08:00
parent 29c4cfa569
commit c892ce225c
No known key found for this signature in database
GPG Key ID: 41BB7053E835C848
4 changed files with 21 additions and 2 deletions

View File

@ -1334,6 +1334,9 @@ let g:spacevim_lint_on_save = 1
" Default search tools supported by flygrep. The default order is ['rg', 'ag', " Default search tools supported by flygrep. The default order is ['rg', 'ag',
" 'pt', 'ack', 'grep', 'findstr', 'git'] " 'pt', 'ack', 'grep', 'findstr', 'git']
let g:spacevim_search_tools = ['rg', 'ag', 'pt', 'ack', 'grep', 'findstr', 'git'] let g:spacevim_search_tools = ['rg', 'ag', 'pt', 'ack', 'grep', 'findstr', 'git']
let g:spacevim_flygrep_next_version = v:false
"" ""
" @section project_rooter_patterns, options-project_rooter_patterns " @section project_rooter_patterns, options-project_rooter_patterns
" @parentsection options " @parentsection options

View File

@ -250,6 +250,9 @@ function! SpaceVim#layers#core#plugins() abort
if s:enable_winbar if s:enable_winbar
call add(plugins, [g:_spacevim_root_dir . 'bundle/winbar.nvim' , { 'merged' : 0} ]) call add(plugins, [g:_spacevim_root_dir . 'bundle/winbar.nvim' , { 'merged' : 0} ])
endif endif
if g:spacevim_flygrep_next_version
call add(plugins, [g:_spacevim_root_dir . 'bundle/flygrep.nvim' , { 'merged' : 0} ])
endif
return plugins return plugins
endfunction endfunction

View File

@ -637,8 +637,13 @@ function! SpaceVim#mapping#space#init() abort
call SpaceVim#mapping#space#def('nnoremap', ['s', 't', 'J'], 'call SpaceVim#plugins#searcher#find(expand("<cword>"), "pt")', call SpaceVim#mapping#space#def('nnoremap', ['s', 't', 'J'], 'call SpaceVim#plugins#searcher#find(expand("<cword>"), "pt")',
\ 'Background search cursor words in project with pt', 1) \ 'Background search cursor words in project with pt', 1)
call SpaceVim#mapping#space#def('nnoremap', ['s', '/'], 'call SpaceVim#plugins#flygrep#open({})', if g:spacevim_flygrep_next_version
\ 'grep-on-the-fly', 1) call SpaceVim#mapping#space#def('nnoremap', ['s', '/'], 'FlyGrep',
\ 'grep-on-the-fly', 1)
else
call SpaceVim#mapping#space#def('nnoremap', ['s', '/'], 'call SpaceVim#plugins#flygrep#open({})',
\ 'grep-on-the-fly', 1)
endif
call SpaceVim#mapping#space#def('nnoremap', ['s', 'c'], 'call SpaceVim#plugins#searcher#clear()', call SpaceVim#mapping#space#def('nnoremap', ['s', 'c'], 'call SpaceVim#plugins#searcher#clear()',
\ 'clear-search-results', 1) \ 'clear-search-results', 1)

View File

@ -1787,6 +1787,14 @@ Key bindings in FlyGrep buffer:
| `Ctrl-a` / `<Home>` | Go to the beginning of the line | | `Ctrl-a` / `<Home>` | Go to the beginning of the line |
| `Ctrl-e` / `<End>` | Go to the end of the line | | `Ctrl-e` / `<End>` | Go to the end of the line |
The next version of FlyGrep.vim is WIP, If you want to have a try. Set `flygrep_next_version` to `true`.
This option maybe removed when `flygrep.nvim` development is done.
```
[options]
flygrep_next_version = true
```
#### Persistent highlighting #### Persistent highlighting
SpaceVim uses `search_highlight_persist` to keep the searched expression highlighted until the next search. SpaceVim uses `search_highlight_persist` to keep the searched expression highlighted until the next search.