1995eaton / chromium-vim

Vim bindings for Google Chrome.
https://chrome.google.com/webstore/detail/cvim/ihlenndgcmojhcghmfjfneahoeklbjjh
MIT License
2.25k stars 326 forks source link

How to pass argument to custom command? #748

Open colossatr0n opened 2 years ago

colossatr0n commented 2 years ago

I'm trying to call a codeblock function and pass an argument to it after mapping it to a command:

popup(word) -> {{
    alert(word)
}}

command show call popup(thePassedInArg)

which I'd like to call like this:

:show my-awesome-message

but I don't know how to reference an argument passed into a command, e.g., thePassedInArg.