mirror of
https://github.com/SpaceVim/SpaceVim.git
synced 2025-02-03 03:00:04 +08:00
Fix flygrep detach script
This commit is contained in:
parent
154510d15a
commit
9dbcb8c5b0
@ -48,63 +48,7 @@ main () {
|
|||||||
_detect autoload/SpaceVim/mapping/search.vim
|
_detect autoload/SpaceVim/mapping/search.vim
|
||||||
_detect autoload/SpaceVim/logger.vim
|
_detect autoload/SpaceVim/logger.vim
|
||||||
_detect syntax/SpaceVimFlyGrep.vim
|
_detect syntax/SpaceVimFlyGrep.vim
|
||||||
cat <<EOT > README.md
|
_default_readme "FlyGrep.vim" "Grep on the fly in Vim/Neovim"
|
||||||
|
|
||||||
# FlyGrep.vim
|
|
||||||
> Asynchronously fly grep in vim
|
|
||||||
|
|
||||||
This plugin is automatically detach from [SpaceVim](https://github.com/SpaceVim/SpaceVim/). you can use it without SpaceVim.
|
|
||||||
|
|
||||||
![searching project](https://user-images.githubusercontent.com/13142418/35278709-7856ed62-0010-11e8-8b1e-e6cc6374b0dc.gif)
|
|
||||||
|
|
||||||
## Install
|
|
||||||
|
|
||||||
for dein.vim
|
|
||||||
|
|
||||||
```vim
|
|
||||||
call dein#add('wsdjeg/FlyGrep.vim')
|
|
||||||
```
|
|
||||||
|
|
||||||
for vim-plug
|
|
||||||
|
|
||||||
```vim
|
|
||||||
Plug 'wsdjeg/FlyGrep.vim'
|
|
||||||
```
|
|
||||||
|
|
||||||
## usage
|
|
||||||
|
|
||||||
```
|
|
||||||
:FlyGrep
|
|
||||||
```
|
|
||||||
|
|
||||||
you also can define custom mapping, for example:
|
|
||||||
|
|
||||||
```vim
|
|
||||||
nnoremap <Space>s/ :FlyGrep<cr>
|
|
||||||
```
|
|
||||||
|
|
||||||
Key Binding | Description
|
|
||||||
-----------| -----------
|
|
||||||
`SPC s /` | Searching in project on the fly with default tools
|
|
||||||
|
|
||||||
key binding in FlyGrep buffer:
|
|
||||||
|
|
||||||
Key Binding | Description
|
|
||||||
-----------| -----------
|
|
||||||
`<Esc>` | close FlyGrep buffer
|
|
||||||
`<C-c>` | close FlyGrep buffer
|
|
||||||
`<Enter>` | open file at the cursor line
|
|
||||||
`<Tab>` | move cursor line down
|
|
||||||
`<C-j>` | move cursor line down
|
|
||||||
`<S-Tab>` | move cursor line up
|
|
||||||
`<C-k>` | move cursor line up
|
|
||||||
`<Bs>` | remove last character
|
|
||||||
`<C-w>` | remove the Word before the cursor
|
|
||||||
`<C-u>` | remove the Line before the cursor
|
|
||||||
`<C-k>` | remove the Line after the cursor
|
|
||||||
`<C-a>`/`<Home>` | Go to the beginning of the line
|
|
||||||
`<C-e>`/`<End>` | Go to the end of the line
|
|
||||||
EOT
|
|
||||||
_detect LICENSE
|
_detect LICENSE
|
||||||
_checkdir plugin
|
_checkdir plugin
|
||||||
cat <<EOT > plugin/FlyGrep.vim
|
cat <<EOT > plugin/FlyGrep.vim
|
||||||
@ -139,11 +83,7 @@ let g:FlyGrep_input_delay = 500
|
|||||||
" A list of searching tools will be userd.
|
" A list of searching tools will be userd.
|
||||||
let g:FlyGrep_search_tools = ['ag', 'rg', 'grep', 'pt', 'ack']
|
let g:FlyGrep_search_tools = ['ag', 'rg', 'grep', 'pt', 'ack']
|
||||||
|
|
||||||
let g:spacevim_data_dir
|
let g:spacevim_data_dir = '~/.cache'
|
||||||
\ = $XDG_CACHE_HOME != ''
|
|
||||||
\ ? $XDG_CACHE_HOME . SpaceVim#api#import('file').separator
|
|
||||||
\ : expand($HOME. join(['', '.cache', ''],
|
|
||||||
\ SpaceVim#api#import('file').separator))
|
|
||||||
|
|
||||||
""
|
""
|
||||||
" Enable FlyGrep statusline
|
" Enable FlyGrep statusline
|
||||||
|
Loading…
Reference in New Issue
Block a user