Skip to content

Commit

Permalink
Fix errors
Browse files Browse the repository at this point in the history
  • Loading branch information
Shougo committed Aug 1, 2022
1 parent 38e32cc commit 7076e91
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
12 changes: 7 additions & 5 deletions autoload/skk_vconv.vim
Original file line number Diff line number Diff line change
@@ -1,11 1,13 @@
function! skk_vconv#conv() abort
if !executable('kakasi')
echom 'Please install kakasi'
echomsg 'Please install pykakasi by pip3'
return
endif
let l:roman = system('kakasi -K a -H a -J a -E a', getreg('*'))
if roman =~ 'n$'
let l:roman = roman . 'n'

let l:roman = system('kakasi -K a -H a -J a -E a', getreg('"'))
if l:roman =~# 'n$'
let l:roman = l:roman . 'n'
endif
call feedkeys(g:skk_vconv#enable_henkan_command . roman, 't')

call feedkeys(g:skk_vconv#enable_henkan_command . l:roman, 't')
endfunction
5 changes: 3 additions & 2 deletions plugin/skk_vconv.vim
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 7,13 @@ if !exists('g:skk_vconv#no_default_mappings')
let g:skk_vconv#no_default_mappings = 0
endif

vnoremap <Plug>(skk-vconv:conv) c<Cmd>call skk_vconv#conv()<CR>
xnoremap <Plug>(skk-vconv:conv) c<Cmd>call skk_vconv#conv()<CR>
if !g:skk_vconv#no_default_mappings
silent! vmap <unique> <C-j> <Plug>(skk-vconv:conv)
endif

if !exists('g:skk_vconv#enable_henkan_command')
let g:skk_vconv#enable_henkan_command = "\<C-r>=skkeleton#request('enable', [])\<CR>;"
let g:skk_vconv#enable_henkan_command =
\ "\<C-r>=skkeleton#request('enable', [])\<CR>;"
endif

0 comments on commit 7076e91

Please sign in to comment.