问题描述
根据 Vim 文档,可以使用 strpart
函数获取光标下的字符。尽管在堆栈溢出上缺少对此的讨论。以下配方是否有任何警告,特别是考虑到答案 there。另外,v:true
是什么?它记录的 id 在哪里?
:h strpart
返回:
strpart({src},{start} [,{len} [,{chars}]]) *strpart()
.
.
Note: To get the first character,{start} must be 0. For
example,to get the character under the cursor: >
strpart(getline("."),col(".") - 1,1,v:true)
.
.
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)