after some tinkering with xprop and window resizing, I'm almost certain it's (neo)vim, not the terminal emulator or the window manager that's shortening the x11 window title name (one of these x11 window attributes _NET_WM_ICON_NAME, _NET_WM_NAME, WM_ICON_NAME, WM_NAME)

specifically it's shortening anything before " - NVIM"

EDIT: I just remembered that useful window names with file name and current directory path is not default behavior, and is enabled with set title

1 Answer 1


it looks like there's no option to configure that, but you can set the title by setting titlestring (for more info see :help titlestring).

you can set titlestring on each buffer enter with:

autocmd bufenter * let &titlestring = expand('%:p').' - NVIM'

You use autocmd bufenter * to run something on each buffer enter, the asterisk means the file extension doesn't matter,

and use let with Vim options by prefixing the option name with a & (see :help :let-option) [1]

and use expand('%:p') to get the full path of the file opened in current buffer [2]

  • 1
    Prefer putting autocmds in augroups
    – D. Ben Knoble
    Commented Jan 18, 2020 at 9:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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