Skip to content

Commit

Permalink
refactor: remove unnecessary capital function
Browse files Browse the repository at this point in the history
  • Loading branch information
kawarimidoll committed Nov 29, 2023
1 parent 576484f commit 972bc27
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions k.vim
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@ source ./converters.vim
source ./google_cgi.vim
source ./job.vim

function! s:capital(char) abort
return substitute(a:char, '.', '\U\0', '')
endfunction

function! s:is_completed() abort
return get(complete_info(), 'selected', -1) >= 0
Expand Down Expand Up @@ -57,7 +54,7 @@ function! k#enable() abort
execute $"inoremap {k} <cmd>call k#ins('{k_lt}')<cr>"

if key =~ '^\l$'
let ck = s:capital(k)
let ck = toupper(k)
let current_map = maparg(ck, 'i', 0, 1)
if empty(current_map)
call add(s:keys_to_unmaps, ck)
Expand Down

0 comments on commit 972bc27

Please sign in to comment.