fox0430 / moe

A command line based editor inspired by Vim. Written in Nim.
https://editor.moe
GNU General Public License v3.0
659 stars 34 forks source link

[Question] Command History: Maximum Count of Entries? #1659

Closed kevinmatthes closed 1 year ago

kevinmatthes commented 1 year ago

@fox0430

The command history is a useful feature, especially in order to reproduce custom project builds executed from Moe's terminal line (:!). Many systems, like GNU Bash, GNU Octave or the interactive mode of The Glorious Glasgow Haskell Compilation System (ghci) save the executed commands, as well, but limit the number of entries by subsequently removing the oldest commands for each new one entered. I am not sure whether Moe has a similar feature; if so, what is the limit?

The question arose because I had to research a certain build instruction in the history and noticed that the entire history was shown with every command I ran since I started contributing and therefore installed the editor. I admit that the commands are usually rather short, e.g. :W, :WQ, and so on, but the future memory demand should not be underestimated if there is really no limit.

fox0430 commented 1 year ago

@kevinmatthes

Currently, there is no limit on the command history. It will continue to be added forever unless it is intentionally deleted. We may need to add a limit to it.

kevinmatthes commented 1 year ago

@fox0430

I agree with you that a limit would be a good idea. I would like to suggest a limit of 1,000 entries as an initially hard coded limit, like GNU Octave uses it, by default.

fox0430 commented 1 year ago

@kevinmatthes

I will add a limit of 1,000 entries to the command history and search history. And add settings for changing limits.

fox0430 commented 1 year ago

@kevinmatthes

I noticed in the process of adding this feature, I cannot use ex command histories... I usually enter everything from the suggestion, so I didn't notice.

Are you able to use it in the recent build?

kevinmatthes commented 1 year ago

@fox0430

Now that you mention it: no, I cannot call previous commands, too. When I got the notification about your message, I freshly installed the latest repository state and it did not work, there.

fox0430 commented 1 year ago

@kevinmatthes

This is a bug. Thank you.