1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-03-26 12:10:32 +08:00

Compare commits

..

No commits in common. "2c92c0b51ffa5303eb54f54b3ea5a1a8385a36bc" and "aa03777a736239ba8ee1c085edab2c31f458be86" have entirely different histories.

4 changed files with 55 additions and 86 deletions

View File

@ -1,78 +1,55 @@
# FlyGrep.vim # FlyGrep.vim
> Asynchronously fly grep in vim
[![](https://spacevim.org/img/build-with-SpaceVim.svg)](https://spacevim.org) This plugin is automatically detach from [SpaceVim](https://github.com/SpaceVim/SpaceVim/). you can use it without SpaceVim.
[![GPLv3 License](https://img.spacevim.org/license-GPLv3-blue.svg)](LICENSE)
![searching project](https://img.spacevim.org/35278709-7856ed62-0010-11e8-8b1e-e6cc6374b0dc.gif) ![searching project](https://img.spacevim.org/35278709-7856ed62-0010-11e8-8b1e-e6cc6374b0dc.gif)
<!-- vim-markdown-toc GFM -->
- [Intro](#intro)
- [Install](#install)
- [Usage](#usage)
- [Command](#command)
- [Key bindings in FlyGrep window](#key-bindings-in-flygrep-window)
- [FeedBack](#feedback)
<!-- vim-markdown-toc -->
## Intro
_FlyGrep.vim_ is a vim/neovim plugin to run the searching tool asynchronously, and display the result on the fly.
## Install ## Install
Using [dein.vim](https://github.com/Shougo/dein.vim) for dein.vim
```vim ```vim
call dein#add('wsdjeg/FlyGrep.vim') call dein#add('wsdjeg/FlyGrep.vim')
``` ```
Using [vim-plug](https://github.com/junegunn/vim-plug) for vim-plug
```vim ```vim
Plug 'wsdjeg/FlyGrep.vim' Plug 'wsdjeg/FlyGrep.vim'
``` ```
## Usage ## usage
### Command
This plugin provides a `:FlyGrep` command.
``` ```
:FlyGrep :FlyGrep
``` ```
### Key bindings in FlyGrep window you also can define custom mapping, for example:
| Key Bindings | Descriptions | ```vim
| ------------------ | --------------------------------------------- | nnoremap <Space>s/ :FlyGrep<cr>
| Tab / Ctrl-j | move cursor to next item | ```
| Shift-Tab / Ctrl-K | move cursor to previous item |
| ScrollWheelDown | move cursor to next item |
| ScrollWheelUp | move cursor to previous item |
| Enter | open file at the cursor line |
| Ctrl-t | open item in new tab |
| LeftMouse | move cursor to mouse position |
| 2-LeftMouse | open file at the mouse position |
| Ctrl-f | start filter mode |
| Ctrl-v | open item in vertical split window |
| Ctrl-s | open item in split window |
| Ctrl-q | apply all items into quickfix |
| Ctrl-e | toggle fix-string mode |
| Ctrl-h | toggle display hidden files |
| Ctrl-r | read from register, need insert register name |
| Left / Right | move cursor to left or right |
| BackSpace | remove last character |
| Ctrl-w | remove the Word before the cursor |
| Ctrl-u | remove the Line before the cursor |
| Ctrl-k | remove the Line after the cursor |
| Ctrl-a / Home | Go to the beginning of the line |
| End | Go to the end of the line |
## FeedBack Key Binding | Description
-----------| -----------
`SPC s /` | Searching in project on the fly with default tools
The development of this plugin is in [`SpaceVim/bundle/FlyGrep`](https://github.com/SpaceVim/SpaceVim/tree/master/bundle/FlyGrep) directory. 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
If you encounter any bugs or have suggestions, please file an issue in the [issue tracker](https://github.com/SpaceVim/SpaceVim/issues)

View File

@ -1,35 +1,36 @@
# cpicker.nvim # cpicker.nvim
> A color picker for Neovim
> _cpicker.nvim_ is a Color Converter for neovim.
[![](https://spacevim.org/img/build-with-SpaceVim.svg)](https://spacevim.org)
[![GPLv3 License](https://img.spacevim.org/license-GPLv3-blue.svg)](LICENSE)
![cpicker](./img/cpicker.png) ![cpicker](./img/cpicker.png)
<!-- vim-markdown-toc GFM -->
- [Install](#install)
- [Commands](#commands)
- [Feedback](#feedback)
<!-- vim-markdown-toc -->
## Install ## Install
Using vim-plug
``` ```
Plug 'wsdjeg/cpicker.nvim' Plug 'wsdjeg/cpicker.nvim'
``` ```
## Commands ## Usage
1. `:Cpicker`: open the color converter ```
2. `:CpickerCursorForeground`: open the color converter with cursor highlight :Cpicker rgb hsl
3. `:CpickerColorMix`: open the color mixer ```
## Feedback
The development of this plugin is in [`SpaceVim/bundle/cpicker.nvim`](https://github.com/SpaceVim/SpaceVim/tree/master/bundle/cpicker.nvim) directory.
If you encounter any bugs or have suggestions, please file an issue in the [issue tracker](https://github.com/SpaceVim/SpaceVim/issues)

View File

@ -86,14 +86,7 @@ end
-- https://zenn.dev/kawarimidoll/articles/a8ac50a17477bd -- https://zenn.dev/kawarimidoll/articles/a8ac50a17477bd
local function copy_color() local function copy_color()
local from, to = vim local from, to = vim.regex(table.concat(vim.tbl_map(function(t) return t[2] end, color_code_regex), '\\|')):match_str(vim.fn.getline('.'))
.regex(table.concat(
vim.tbl_map(function(t)
return t[2]
end, color_code_regex),
'\\|'
))
:match_str(vim.fn.getline('.'))
if from then if from then
vim.fn.setreg('+', string.sub(vim.fn.getline('.'), from, to)) vim.fn.setreg('+', string.sub(vim.fn.getline('.'), from, to))
notify.notify('copied:' .. string.sub(vim.fn.getline('.'), from, to)) notify.notify('copied:' .. string.sub(vim.fn.getline('.'), from, to))
@ -148,6 +141,9 @@ M.picker = function(formats)
vim.api.nvim_set_option_value('bufhidden', 'wipe', { vim.api.nvim_set_option_value('bufhidden', 'wipe', {
buf = bufnr, buf = bufnr,
}) })
vim.api.nvim_set_option_value('wrap', false, {
buf = bufnr,
})
vim.api.nvim_set_option_value('number', false, { vim.api.nvim_set_option_value('number', false, {
buf = bufnr, buf = bufnr,
}) })
@ -185,9 +181,6 @@ M.picker = function(formats)
vim.api.nvim_set_option_value('number', false, { vim.api.nvim_set_option_value('number', false, {
win = winid, win = winid,
}) })
vim.api.nvim_set_option_value('wrap', false, {
win = winid,
})
vim.api.nvim_set_option_value('winhighlight', 'NormalFloat:Normal,FloatBorder:WinSeparator', { vim.api.nvim_set_option_value('winhighlight', 'NormalFloat:Normal,FloatBorder:WinSeparator', {
win = winid, win = winid,
}) })

View File

@ -71,5 +71,3 @@ Plug 'wsdjeg/git.vim'
## Feedback ## Feedback
The development of this plugin is in [`SpaceVim/bundle/git.vim`](https://github.com/SpaceVim/SpaceVim/tree/master/bundle/git.vim) directory. The development of this plugin is in [`SpaceVim/bundle/git.vim`](https://github.com/SpaceVim/SpaceVim/tree/master/bundle/git.vim) directory.
If you encounter any bugs or have suggestions, please file an issue in the [issue tracker](https://github.com/SpaceVim/SpaceVim/issues)