Get the path to the current buffer in VIM
In VIM, you can get the path to the current buffer with the keybinding Ctrl+g
. This will print that path to your statusline.
You can also get the path by using the %
register:
:echo @%
Super helpful if you need to quickly copy/pasta that path for a coworker
https://www.tutorialspoint.com/vim/vim_registers.htm
Tweet