0
有谁知道为什么从来不工作:这个(vimscript)代码有什么问题?
if !exists("g:removenumbchar")
if a:type == "remove"
let g:removenumbchar = "How many characters do you want remove at the end?"
elseif a:type == "add"
let g:removenumbchar = "How many characters do you want add at the end?"
endif
endif
let c = inputdialog(g:removenumbchar)
即使“一:类型”值是正确的,有时它有时显示的第一句话第二个。 我从来没有明白这是怎么来的。
是的,可以是正确的。你知道如何避免持久性? – Reman 2011-03-22 11:19:40
你为什么要使用全局? – 2011-03-22 12:01:17
好问题。始终使用全局变量。我何时必须使用全局变量,何时不使用全局变量? – Reman 2011-03-22 13:28:30