簡體   English   中英

編寫vim插件時,如何准備用戶的自定義映射?

[英]When writing a vim plugin, how to be prepared for the user's custom mappings?

我正在寫我的第一個vim插件。 在代碼中,我繼續使用諸如execute 'normal k3yy'類的東西,但是,使用該插件的人可能execute 'normal k3yy'不同的行為映射到例如kyy鍵,這可能導致我的插件以意外的方式執行。

如何避免這個問題? 謝謝。

使用normal! k3yy normal! k3yy!

來自幫助文檔:

If the [!] is given, mappings will not be used.

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM