mirror of
https://github.com/amix/vimrc
synced 2025-06-23 06:35:01 +08:00
Updated plugins
This commit is contained in:
@ -188,6 +188,9 @@ endfunction
|
||||
|
||||
With this locking and unlocking we prevent neocomplete to trigger it's function calls until we are finished with multiple cursors editing.
|
||||
|
||||
Plugins themselves can register `User` autocommands on `MultipleCursorsPre` and
|
||||
`MultipleCursorsPost` for automatic integration.
|
||||
|
||||
### Highlight
|
||||
The plugin uses the highlight group `multiple_cursors_cursor` and `multiple_cursors_visual` to highlight the virtual cursors and their visual selections respectively. You can customize them by putting something similar like the following in your vimrc:
|
||||
|
||||
|
@ -111,8 +111,11 @@ endfunction
|
||||
" attempted to be created at the next occurrence of the visual selection
|
||||
function! multiple_cursors#new(mode, word_boundary)
|
||||
" Call before function if exists only once until it is canceled (<Esc>)
|
||||
if exists('*Multiple_cursors_before') && !s:before_function_called
|
||||
exe "call Multiple_cursors_before()"
|
||||
if !s:before_function_called
|
||||
doautocmd User MultipleCursorsPre
|
||||
if exists('*Multiple_cursors_before')
|
||||
exe "call Multiple_cursors_before()"
|
||||
endif
|
||||
let s:before_function_called = 1
|
||||
endif
|
||||
let s:use_word_boundary = a:word_boundary
|
||||
@ -436,8 +439,11 @@ function! s:CursorManager.reset(restore_view, restore_setting, ...) dict
|
||||
call self.restore_user_settings()
|
||||
endif
|
||||
" Call after function if exists and only if action is canceled (<Esc>)
|
||||
if exists('*Multiple_cursors_after') && a:0 && s:before_function_called
|
||||
exe "call Multiple_cursors_after()"
|
||||
if a:0 && s:before_function_called
|
||||
if exists('*Multiple_cursors_after')
|
||||
exe "call Multiple_cursors_after()"
|
||||
endif
|
||||
doautocmd User MultipleCursorsPost
|
||||
let s:before_function_called = 0
|
||||
endif
|
||||
endfunction
|
||||
|
Reference in New Issue
Block a user