4

Does it support following code?

More precisely, does it support defining function? invoking function system? and so on.

Following code is used to auto close my Chinese input method when quit from insert normal.

let g:input_toggle = 1
function! Fcitx2en()
let s:input_status = system("fcitx-remote")
if s:input_status == 2
    let g:input_toggle = 1
    let l:a = system("fcitx-remote -c")
endif
endfunction

function! Fcitx2zh()
let s:input_status = system("fcitx-remote")
if s:input_status != 2 && g:input_toggle == 1
    let l:a = system("fcitx-remote -o")
    let g:input_toggle = 0
endif
endfunction

set timeoutlen=150
autocmd InsertLeave * call Fcitx2en()
"autocmd InsertEnter * call Fcitx2zh()
Run
  • 876
  • 6
  • 21
  • IdeaVim doesn't emulate vimscript so no, you can't do that. – romainl Jan 23 '16 at 14:21
  • Also it doesn't even seem to have the ability call functions that you would expect to be built in. So basically it's almost impossible to get it to do anything useful. They could change it to use Neovim under that hood as a strategy for making it much more competent, but instead they make up random lies about the limitations of the Neovim API. – still_dreaming_1 May 10 '18 at 00:30

1 Answers1

2

No, IdeaVim understands only several configuration options in ~/.ideavimrc, the rest is ignored. See this feature request for details.

Andrey Vlasovskikh
  • 16,489
  • 7
  • 44
  • 62