-
-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
122 additions
and
202 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
39 changes: 39 additions & 0 deletions
39
autoload/vital/_incsearch/Over/Commandline/Modules/LiteralInsert.vim
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
scriptencoding utf-8 | ||
let s:save_cpo = &cpo | ||
set cpo&vim | ||
|
||
function! s:_vital_loaded(V) | ||
let s:Input = a:V.import("Over.Input") | ||
endfunction | ||
|
||
function! s:_vital_depends() | ||
return [ | ||
\ "Over.Input", | ||
\ ] | ||
endfunction | ||
|
||
let s:module = { | ||
\ "name" : "LiteralInsert", | ||
\} | ||
|
||
function! s:module.on_char_pre(cmdline) | ||
if a:cmdline.is_input("\<C-v>") | ||
\ || a:cmdline.is_input("\<C-q>") | ||
let old_line = a:cmdline.getline() | ||
let old_pos = a:cmdline.getpos() | ||
call a:cmdline.insert('^') | ||
call a:cmdline.setpos(old_pos) | ||
call a:cmdline.draw() | ||
let char = s:Input.getchar() | ||
call a:cmdline.setline(old_line) | ||
call a:cmdline.setpos(old_pos) | ||
call a:cmdline.setchar(char) | ||
endif | ||
endfunction | ||
|
||
function! s:make() | ||
return deepcopy(s:module) | ||
endfunction | ||
|
||
let &cpo = s:save_cpo | ||
unlet s:save_cpo |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.