Skip to content

Commit

Permalink
fix: restore capital maps
Browse files Browse the repository at this point in the history
  • Loading branch information
kawarimidoll committed Nov 20, 2023
1 parent 1b9b9c4 commit b75fa93
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion k.vim
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,15 @@ function! k#enable() abort
endif
execute $"inoremap <expr> {k} k#ins('{k}')"
if k =~ '\l'
execute $"inoremap <expr> {s:capital(k)} k#ins('{k}',1)"
let ck = s:capital(k)
execute $"inoremap <expr> {ck} k#ins('{k}',1)"

let current_map = maparg(ck, 'i', 0, 1)
if empty(current_map)
call add(s:keys_to_unmaps, ck)
else
call add(s:keys_to_remaps, current_map)
endif
endif
endfor

Expand Down

0 comments on commit b75fa93

Please sign in to comment.