mirror of
https://github.com/SpaceVim/SpaceVim.git
synced 2025-02-03 00:40:05 +08:00
Add persistent hls option
This commit is contained in:
parent
870876db7f
commit
c42b77ffe2
@ -154,7 +154,8 @@ function! SpaceVim#mapping#space#init() abort
|
||||
call SpaceVim#mapping#space#def('nnoremap', ['s', 't', 'F'], 'call SpaceVim#mapping#search#grep("t", "F")',
|
||||
\ 'search cursor word in arbitrary directory with pt', 1)
|
||||
|
||||
|
||||
call SpaceVim#mapping#space#def('nnoremap', ['s', 'c'], 'noh',
|
||||
\ 'clear search highlight', 1)
|
||||
endfunction
|
||||
|
||||
function! SpaceVim#mapping#space#def(m, keys, cmd, desc, is_cmd) abort
|
||||
|
@ -68,11 +68,13 @@ title: "Documentation"
|
||||
* [Auto-saving](#auto-saving)
|
||||
* [Searching](#searching)
|
||||
* [With an external tool](#with-an-external-tool)
|
||||
* [Useful key bindings](#useful-key-bindings)
|
||||
* [Searching in current file](#searching-in-current-file)
|
||||
* [Searching in all loaded buffers](#searching-in-all-loaded-buffers)
|
||||
* [Searching in an arbitrary directory](#searching-in-an-arbitrary-directory)
|
||||
* [Searching in a project](#searching-in-a-project)
|
||||
* [Useful key bindings](#useful-key-bindings)
|
||||
* [Searching in current file](#searching-in-current-file)
|
||||
* [Searching in all loaded buffers](#searching-in-all-loaded-buffers)
|
||||
* [Searching in an arbitrary directory](#searching-in-an-arbitrary-directory)
|
||||
* [Searching in a project](#searching-in-a-project)
|
||||
* [Searching the web](#searching-the-web)
|
||||
* [Persistent highlighting](#persistent-highlighting)
|
||||
* [Editing](#editing)
|
||||
* [Multi-Encodings](#multi-encodings)
|
||||
* [Errors handling](#errors-handling)
|
||||
@ -963,7 +965,7 @@ Notes:
|
||||
|
||||
**Beware** if you use `pt`, [TCL parser tools](https://core.tcl.tk/tcllib/doc/trunk/embedded/www/tcllib/files/apps/pt.html) also install a command line tool called `pt`.
|
||||
|
||||
#### Useful key bindings
|
||||
##### Useful key bindings
|
||||
|
||||
Key Binding | Description
|
||||
-----------| -----------
|
||||
@ -971,7 +973,7 @@ Key Binding | Description
|
||||
`` SPC s ` `` | go back to the previous place before jump
|
||||
Prefix argument | will ask for file extensions
|
||||
|
||||
#### Searching in current file
|
||||
##### Searching in current file
|
||||
|
||||
Key Binding | Description
|
||||
-----------| -----------
|
||||
@ -984,7 +986,7 @@ Key Binding | Description
|
||||
`SPC s r r` | rg
|
||||
`SPC s r R` | rg with default input
|
||||
|
||||
#### Searching in all loaded buffers
|
||||
##### Searching in all loaded buffers
|
||||
|
||||
Key Binding | Description
|
||||
-----------| -----------
|
||||
@ -1001,7 +1003,7 @@ Key Binding | Description
|
||||
`SPC s t b` | pt
|
||||
`SPC s t B` | pt with default input
|
||||
|
||||
#### Searching in an arbitrary directory
|
||||
##### Searching in an arbitrary directory
|
||||
|
||||
Key Binding | Description
|
||||
-----------| -----------
|
||||
@ -1018,7 +1020,7 @@ Key Binding | Description
|
||||
`SPC s t f` | pt
|
||||
`SPC s t F` | pt with default text
|
||||
|
||||
#### Searching in a project
|
||||
##### Searching in a project
|
||||
|
||||
Key Binding | Description
|
||||
-----------| -----------
|
||||
@ -1034,6 +1036,21 @@ Key Binding | Description
|
||||
`SPC s r p` | rg
|
||||
`SPC s r P` | rg with default text
|
||||
|
||||
**Hint**: It is also possible to search in a project without needing to open a file beforehand. To do so use `SPC p p` and then `C-s` on a given project to directly search into it like with `SPC s p`. (TODO)
|
||||
|
||||
##### Searching the web
|
||||
|
||||
Key Binding Description
|
||||
-----------| -----------
|
||||
`SPC s w g` | Get Google suggestions in vim. Opens Google results in Browser.
|
||||
`SPC s w w` | Get Wikipedia suggestions in vim. Opens Wikipedia page in Browser.(TODO)
|
||||
|
||||
**Note**: to enable google suggestions in vim, you need to add `let g:spacevim_enable_googlesuggest = 1` to your custom Configuration file.
|
||||
|
||||
#### Persistent highlighting
|
||||
|
||||
SpaceVim uses `g:spacevim_search_highlight_persist` to keep the searched expression highlighted until the next search. It is also possible to clear the highlighting by pressing `SPC s c` or executing the ex command `:noh`.
|
||||
|
||||
### Editing
|
||||
|
||||
#### Multi-Encodings
|
||||
|
Loading…
Reference in New Issue
Block a user