2

The swapfile full path is available through swapname() which takes a buffer name. The current buffer name is available with bufname() with no arguments. So this prints the swapfile path of the current buffer echo swapname(bufname()) If you want just the filename you'd use fnamemodify() along with the filename modifier :t (for "tail"). And if you ...


Only top voted, non community-wiki answers of a minimum length are eligible