mirror of
https://github.com/SpaceVim/SpaceVim.git
synced 2025-01-24 05:30:07 +08:00
Merge remote-tracking branch 'wsdjeg/cursor' into iedit-IA
This commit is contained in:
commit
e35ae0185f
@ -17,7 +17,6 @@ function! SpaceVim#layers#edit#plugins() abort
|
||||
\ ['tpope/vim-surround'],
|
||||
\ ['tpope/vim-repeat'],
|
||||
\ ['junegunn/vim-emoji'],
|
||||
\ ['terryma/vim-multiple-cursors', { 'loadconf' : 1, 'merged' : 0}],
|
||||
\ ['terryma/vim-expand-region', { 'loadconf' : 1}],
|
||||
\ ['kana/vim-textobj-user'],
|
||||
\ ['kana/vim-textobj-indent'],
|
||||
|
@ -503,8 +503,10 @@ function! SpaceVim#mapping#space#init() abort
|
||||
xnoremap <silent> <plug>SpaceVim-plugin-iedit :call SpaceVim#plugins#iedit#start(1)<cr>
|
||||
call SpaceVim#mapping#space#def('nmap', ['s', 'e'], '<plug>SpaceVim-plugin-iedit',
|
||||
\ 'start iedit mode', 0, 1)
|
||||
call SpaceVim#mapping#space#def('nnoremap', ['s', 'h'], 'call SpaceVim#plugins#highlight#start()',
|
||||
call SpaceVim#mapping#space#def('nnoremap', ['s', 'H'], 'call SpaceVim#plugins#highlight#start(1)',
|
||||
\ 'highlight all symbols', 1)
|
||||
call SpaceVim#mapping#space#def('nnoremap', ['s', 'h'], 'call SpaceVim#plugins#highlight#start(0)',
|
||||
\ 'highlight current symbols', 1)
|
||||
" Getting help
|
||||
let g:_spacevim_mappings_space.h.d = {'name' : '+help-describe'}
|
||||
call SpaceVim#mapping#space#def('nnoremap', ['h', 'd', 'b'],
|
||||
|
@ -110,8 +110,11 @@ function! s:init() abort
|
||||
endfunction
|
||||
" }}}
|
||||
|
||||
" use SPC s H to highlight all symbol on default range.
|
||||
" use SPC s h to highlight current symbol on default range.
|
||||
|
||||
" public API func: start Highlight mode {{{
|
||||
function! SpaceVim#plugins#highlight#start() abort
|
||||
function! SpaceVim#plugins#highlight#start(current) abort
|
||||
let curpos = getcurpos()
|
||||
let save_reg_k = @k
|
||||
normal! viw"ky
|
||||
|
@ -1,39 +0,0 @@
|
||||
if g:spacevim_autocomplete_method ==# 'ycm'
|
||||
function! s:disable_autocomplete() abort
|
||||
|
||||
endfunction
|
||||
function! s:enable_autocomplete() abort
|
||||
|
||||
endfunction
|
||||
elseif g:spacevim_autocomplete_method ==# 'neocomplete'
|
||||
function! s:disable_autocomplete() abort
|
||||
NeoCompleteLock
|
||||
endfunction
|
||||
function! s:enable_autocomplete() abort
|
||||
NeoCompleteUnlock
|
||||
endfunction
|
||||
elseif g:spacevim_autocomplete_method ==# 'neocomplcache' "{{{
|
||||
function! s:disable_autocomplete() abort
|
||||
NeoComplCacheDisable
|
||||
endfunction
|
||||
function! s:enable_autocomplete() abort
|
||||
NeoComplCacheEnable
|
||||
endfunction
|
||||
elseif g:spacevim_autocomplete_method ==# 'deoplete'
|
||||
function! s:disable_autocomplete() abort
|
||||
call deoplete#disable()
|
||||
endfunction
|
||||
function! s:enable_autocomplete() abort
|
||||
call deoplete#enable()
|
||||
endfunction
|
||||
endif
|
||||
" Called once right before you start selecting multiple cursors
|
||||
function! Multiple_cursors_before()
|
||||
call s:disable_autocomplete()
|
||||
endfunction
|
||||
|
||||
" Called once only when the multiple selection is canceled (default <Esc>)
|
||||
function! Multiple_cursors_after()
|
||||
call s:enable_autocomplete()
|
||||
endfunction
|
||||
" vim:set et sw=2 cc=80:
|
@ -12,6 +12,7 @@ lang: cn
|
||||
- [功能特性](#功能特性)
|
||||
- [模块选项](#模块选项)
|
||||
- [快捷键](#快捷键)
|
||||
- [多光标支持](#多光标支持)
|
||||
|
||||
<!-- vim-markdown-toc -->
|
||||
|
||||
@ -40,7 +41,7 @@ lang: cn
|
||||
| ------------------ | ---------------------- |
|
||||
| `SPC x a {分隔符}` | 基于分隔符进行文本对齐 |
|
||||
|
||||
**默认的分隔符:**
|
||||
默认的分隔符:
|
||||
|
||||
- `=`: 对齐 `===`, `==`, `!=`, `>=` 等
|
||||
- `&`: 对齐 `&`
|
||||
@ -60,6 +61,11 @@ lang: cn
|
||||
- `o`: 对齐 `+ - * / % ^` 等
|
||||
- `r`: 对齐用户输入的正则表达式
|
||||
|
||||
### 多光标支持
|
||||
|
||||
在 Visual 模式下可使用 Ctrl+n 按键选择下一个匹配位置。此时文档中所有匹配项都会被高亮,选中的匹配位置会有特殊高亮。
|
||||
可使用 Ctrl+x 按键跳过当前位置。
|
||||
|
||||
| 快捷键 | 功能描述 |
|
||||
| ----------- | ------------------------------------ |
|
||||
| `SPC x j c` | 居中对齐当前段落 |
|
||||
@ -70,3 +76,4 @@ lang: cn
|
||||
| `SPC x u` | 将选中字符串转为小写 |
|
||||
| `SPC x U` | 将选中字符串转为大写 |
|
||||
| `SPC x w c` | 统计选中区域的单词数 |
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user