2016-01-23 46 views
2

它支持以下代码吗?Intellij Ideavim插件是否支持复杂的函数定义?

更确切地说,它支持定义功能吗?调用函数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() 
+0

IdeaVim不模仿vimscript所以不,你不能这样做。 – romainl

+0

是的,谢谢! – Run

回答

1

不,IdeaVim只能理解〜/ .ideavimrc中的几个配置选项,其余的被忽略。详情请参阅this feature request

+0

谢谢你回答我! – Run