To change the default IME behavior in Vim, insert the ~ / .vimrc file
set iminsert=0
set imsearch=-1
Using -1for imsearchlocks the search key card in the same way as insert mode.
You can enable and disable the IME parameter with <ctrl>+^. To automatically disable Japanese IME when exiting insert mode, you can use
inoremap <ESC> <ESC>:set iminsert=0<CR>
More about these
:h iminsert
:h imsearch
:h i_CTRL-^
Addition: It may be convenient to change the color of your cursor depending on the IME settings.
if has('multi_byte_ime')
highlight Cursor guifg=NONE guibg=Green
highlight CursorIM guifg=NONE guibg=Purple
endif
I found him in
:h CursorIM
source
share