On Fri, 11 Mar 2016, Ben Fritz wrote:

On Friday, March 11, 2016 at 12:32:15 PM UTC-6, Bram Moolenaar wrote:

Hmm. We usually have a count before the command to specify a number:

        :5messages

Then you can use eap->line2.

This is more important if we want to delete a number of messages:

        :5messages clear

However, I don't see a good reason for a user to type ":messages clear", it would perhaps be useful for a plugin (if it can't use :silent for some reason). But then we might be better off with a function to manipulate the list of messages. Perhaps you want to change a message, or delete one before the last one?

Perhaps msg_get() and msg_set()?


I think the purpose is simply that you want to be able to start with a "clean slate"
[...]
Plus, if you have a lot of messages, you need to page through a bunch of cruft before you get to what you're interested in.

This is almost exclusively what my problem is; a long Vim session means the :messages history has overgrown and almost everything that's older is irrelevant...

I don't see much use for editing message history. I just want to reset it, so that I can focus on my task at hand without sorting through a bunch of unrelated stuff.

I can imagine wanting to clear all but the most recent N messages, but mostly I just want to clear it all.

I don't see a use for functions to access or change the message history, though. Mostly script developers can already capture messages other ways that are more predictable (you don't have to worry that you're getting a message added to the history by something another script did, or the user did, etc.)

I do agree that the command needs to support The Vim Way, such as :Nmessages.

- Christian

--
       Stupidity, when maintained long enough, _is_ a form of malice.
-- Richard's corollary to Hanlon's Razor. Christian J. Robinson <[email protected]> http://christianrobinson.name/

Raspunde prin e-mail lui