[英]When writing a vim plugin, how to be prepared for the user's custom mappings?
我正在寫我的第一個vim插件。 在代碼中,我繼續使用諸如execute 'normal k3yy'
類的東西,但是,使用該插件的人可能execute 'normal k3yy'
不同的行為映射到例如k
和yy
鍵,這可能導致我的插件以意外的方式執行。
如何避免這個問題? 謝謝。
使用normal! k3yy
normal! k3yy
與!
來自幫助文檔:
If the [!] is given, mappings will not be used.
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.