简体   繁体   English

如何从vimrc中执行menu.vim函数?

[英]How to execute a menu.vim function from within vimrc?

I know that it is possible to call a vimrc function from menu.vim 我知道可以从menu.vim调用vimrc函数
but is it also possible the other way around? 但是反过来也可能吗?

pe Writing this in vimrc does't work: pe在vimrc中写这个不起作用:

nmap <F4> :call <SID>MyFunction_in_menuvim()<CR>

What did I wrong? 我错了什么?

<SID> is used for local functions. <SID>用于本地功能。 If your function is not local, you do not need to add this. 如果您的功能不是本地功能,则无需添加此功能。 <SID> will be replace by a string like: <SNR>23_ <SID>将被替换为如下字符串: <SNR>23_

See vim documentation on map for more information 有关更多信息,请参阅地图上的vim文档

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何在vim函数中执行普通模式命令? - How to execute a normal mode command in a vim function? vimrc的语法是什么,如何在vimrc中使用变量,函数? - What's the grammar of vimrc, how to use variable, function in vimrc? 如何在上下文菜单中触发全局功能 - How to trigger global function within a context menu 如何从我的.vimrc文件中调用插件? - How to call a plugin from my .vimrc file? 如何在函数内执行Python函数而不是停止执行 - How to execute a Python function within a function and not stop the execution 如何从python代码退出vim函数? - How to exit a vim function from python code? 我有一个 function 或要执行的查询。 查询是字符串形式(单引号内)。现在,如何从字符串形式中取消屏蔽查询并执行 - I have a function or query to execute. The query is in form of a string(within single quotes).Now, how to unmask the query from string form & execute 如何让我的公式在我的 function 中执行? - How do I get my formula to execute within my function? Javascript:如何在 function 中执行 function 而不会延迟? - Javascript: how to execute a function within a function without delay? 如何使用 Javascript 从弹出窗口本身的源页面在 html 弹出窗口中实时执行创建/打印的函数()? - How to execute a function() created/printed real-time in a html pop-up using Javascript from the source page within the popup itself?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM