Feature/vim repeat #1

Merged
lohhiiccc merged 6 commits from feature/vim-repeat into main 2025-08-19 09:21:53 +00:00
Showing only changes of commit 629a204590 - Show all commits

View file

@ -46,7 +46,7 @@ g:last_singlechar_count = 1
# mode: 'at' to insert before cursor, 'after' to insert after cursor # mode: 'at' to insert before cursor, 'after' to insert after cursor
# count: number of times to repeat the character # count: number of times to repeat the character
# pkey: character to insert (optional) # pkey: character to insert (optional)
export def InsertChar(mode: string, count: number, pkey: string = ''): void def InsertChar(mode: string, count: number, pkey: string = ''): void
var key = pkey var key = pkey
if pkey == '' if pkey == ''
@ -75,7 +75,7 @@ export def InsertChar(mode: string, count: number, pkey: string = ''): void
legacy call repeat#set("\<Plug>(singlechar-repeat)") legacy call repeat#set("\<Plug>(singlechar-repeat)")
enddef enddef
export def g:RepeatSingleChar(): void def g:RepeatSingleChar(): void
if g:last_singlechar_key != '' if g:last_singlechar_key != ''
call InsertChar(g:last_singlechar_mode, g:last_singlechar_count, g:last_singlechar_key) call InsertChar(g:last_singlechar_mode, g:last_singlechar_count, g:last_singlechar_key)
endif endif