You can use the m flag in 'statusline' to add the [+] file if the file has been modified. Please note that in order to see the status line, you need to set 'laststatus' more than 0 (1-Only shows the status bar if there are two or more windows, 2-Always).
If you are using a GUI version such as MacVim, you can set a 'titlestring' that uses the same syntax but changes the window name in your window manager.
Example:
:set laststatus=2 :set statusline=[%n]\ %<%f%h%m
This will display:
[ : literal%n : buffer number] : literal\<Space> : space%< : crop the field at the beginning if it is too long%f : path to the file in the buffer, both typed and relative to the current directory.%h : help buffer flag, text "[help]".%m : Changed flag, text "[+]"; "[-]" if "modifiable" is turned off.
For more information see
source share