diff options
author | Tom Smeding <tom@tomsmeding.com> | 2024-07-07 18:11:53 +0200 |
---|---|---|
committer | Tom Smeding <tom@tomsmeding.com> | 2024-07-07 18:11:53 +0200 |
commit | 63d048a4d891ac850a352fd3e9b345f778f5fdd7 (patch) | |
tree | b7ac46e41cdfdd12bc66d0f11f019a3ea69b570d | |
parent | ae280f4dd6f96a2eb01d1d1fc05be5e7c7f8bbf1 (diff) |
"original tab mapping" doesn't work
-rw-r--r-- | japanese.vim | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/japanese.vim b/japanese.vim index 85b84f9..75bcd8c 100644 --- a/japanese.vim +++ b/japanese.vim @@ -502,7 +502,9 @@ function s:handle_tab_expr() endif if s:cur_region is v:null - return expand('<SID>') .. "orig\<Tab>" " original tab binding if we're not typing + " TODO: No clue why this doesn't work + " return expand('<SID>') .. "orig\<Tab>" " original tab binding if we're not typing + return '' endif " Add a <C-n> at the end to immediately select the first completion item @@ -538,9 +540,9 @@ inoremap <buffer> <expr> <Esc> <SID>handle_escape_expr() inoremap <buffer> <expr> <Space> <SID>handle_space_expr() inoremap <buffer> <expr> <CR> <SID>handle_enter_expr() inoremap <buffer> <expr> <BS> <SID>handle_backspace_expr() -execute 'inoremap <buffer> <SID>orig<Tab> ' .. maparg('<Tab>', 'i') -inoremap <buffer> <expr> <Tab> <SID>handle_tab_expr() -execute 'inoremap <buffer> <SID>orig<S-Tab> ' .. maparg('<S-Tab>', 'i') +" execute 'inoremap <buffer> <SID>orig<Tab> ' .. maparg('<Tab>', 'i') +imap <buffer> <expr> <Tab> <SID>handle_tab_expr() +" execute 'inoremap <buffer> <SID>orig<S-Tab> ' .. maparg('<S-Tab>', 'i') inoremap <buffer> <expr> <S-Tab> <SID>handle_shifttab_expr() inoremap <buffer> <C-h> <Cmd>call <SID>handle_hiragana()<CR> inoremap <buffer> <C-k> <Cmd>call <SID>handle_katakana()<CR> |