How do I store the current file path in a named Vim register?
:let @a = expand('%:p')
Named registers are not only for yanked text.
registers #registers #command-line #filename-modifiers #editing
:let @a = expand('%:p')
Named registers are not only for yanked text.
registers #registers #command-line #filename-modifiers #editing
%:S
When you build shell commands from Vim, file paths with spaces or special characters can break the command unless properly escaped.
command-line #command-line #filename-modifiers #shell #expansion