Quantcast
Channel: Active questions tagged user-commands - Vi and Vim Stack Exchange
Viewing all articles
Browse latest Browse all 60

How to use variables in a user defined command? [duplicate]

$
0
0

I have this user defined command:

command! PS silent! w | PlugSnapshot! ~/.vim/plugins/plugins.lock

How could I change it to take the filepath from a variable, something like this:

let PathToPluginsFolder =  ~/.vim/pluginscommand! PS silent! w | PlugSnapshot! %%%PathToPluginsFolder%%%/plugins.lock

Viewing all articles
Browse latest Browse all 60

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>