【问题标题】:Does Intellij Ideavim plugin support complex function definition?Intellij Ideavim 插件是否支持复杂的函数定义?
【发布时间】: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


【解决方案1】:

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

【讨论】:

  • 谢谢你的回答!
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 2019-09-17
  • 2017-12-12
  • 1970-01-01
  • 2012-06-17
  • 1970-01-01
  • 2015-06-12
  • 1970-01-01
相关资源
最近更新 更多