It is quite often that you need to pass data from to Vim to shell[e.g. bash]. Here is the command. We want to pass the full file name in current buffer to an Environment variable, e.g pp
:let $pp=expand('%:p')
: => Ex mode in Vim, nothing fancy let => Set the internal variable to the result of right handside $ => It indicates the 'Environment' variable expand('%:p') => It is just an expression How to use $pp in shell? e.g. :sh => drop into your shell >find ./ -iname $pp -print Note: $pp is only available in your current session.