Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
I know that you can print the changelist by running :changes. Is there a way to get this information in vimscript? Even by parsing the print somehow?
You can use the :redir command to redirect command-line output to a register, a file, or a variable. To capture the output of :changes in register a, execute the following.
You can capture the raw output of any Ex command with :redir:
redir => mychanges
mychanges is a string that you manipulate like any other string.
Required, but never shown