Vim: use the path of the current file

Answered at https://stackoverflow.com/questions/2233905/howto-get-full-path-of-current-file-in-vim

% is the actual file

%:p:h

is the dirname of the file

%:p

is the full path of the file. Use what you prefer.

In order to save files, just

:w %:p:h/something