【发布时间】:2016-04-30 01:20:27
【问题描述】:
是否支持以下代码?
更准确地说,它是否支持定义函数?调用函数system?等等。
以下代码用于在正常退出插入时自动关闭我的中文输入法。
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()
【问题讨论】:
-
IdeaVim 不模拟 vimscript 所以不,你不能那样做。
-
此外,它似乎甚至没有你期望内置的调用函数的能力。所以基本上几乎不可能让它做任何有用的事情。他们可以将其更改为在该引擎下使用 Neovim 作为使其更胜任的策略,但他们会随机编造关于 Neovim API 局限性的谎言。
标签: vim plugins intellij-idea ideavim