Does anyone know if it's possible to change the window title for nvim to this pattern:

{cwd}/{current-file} - vim


my_project_dir/README.md - vim

I'm using nvim-qt with i3wm (I'm not sure if it matters for this).

1 Answer 1


You can set the 'titlestring' option to an expression that returns statusline expandos that will be evaluated by Vim and displayed in the title. E.g. use something like this:

:set title titlestring=%(%{expand(\"%:~:.:h\")}%)/%t\ -\ Vim

Read the help at :h 'statusline' and :h 'statusline' for the meaning of those items.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.