Questions tagged «plugin-development»

2
如何保存和还原映射?
我正在为Vim开发一个插件,我想定义一个仅在“执行插件”时可用的映射。 到目前为止,插件的(简化)工作流程如下: 用户调用插件命令 该命令调用预处理功能: function! s:PreTreatmentFunction(function, ...) " Do some pretreatment stuff " Create a mapping to call the TearDown nnoremap <C-c> :call TeardDown()<CR> " Call a function depending on the parameter passed to this one if function == "foo" call Foo() else call Bar() endif endfunction 调用另一个函数来更改缓冲区的状态(Foo()或Bar()在上一个函数的最后一行中) 用户使用映射来调用拆解函数 拆卸功能删除创建的映射: …
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.