5 ms·
I'm using the following to expand "%%" in command mode to the full path of the current open file's directory: cabbr <expr> %% expand('%:p:h') You could also
by alphard 13y ago
I'm using the following to expand "%%" in command mode to the full path of the current open file's directory:
cabbr <expr> %% expand('%:p:h')
You could also use :. instead of :p to get the relative path, see :help c_% and :help filename_modifiers
- wahnfrieden 13y agoWow, elegant. Thank you!