Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Command History #28

Closed
sotte opened this issue Jul 9, 2012 · 3 comments
Closed

Add Command History #28

sotte opened this issue Jul 9, 2012 · 3 comments
Labels

Comments

@sotte
Copy link
Contributor

sotte commented Jul 9, 2012

A nice command history would be nice as well. I already mapped "my common commands" to some shortcuts. But in general a command history would eliminate this workaround.

I'd like to help out here. Just let me know how.

@benmills
Copy link
Collaborator

I'm a little worried this would be bulky but if you want to put together an example of how it would work I would be on board.

@sotte
Copy link
Contributor Author

sotte commented Sep 27, 2012

Hm, I haven't thought about the details, but here are some ideas...

Step 1:

  • save every command you execute to a list (this is trivial)
  • when opening a prompt: up/down selects a command from the list. I guess vim's input() is not powerful enough for this. ctrl-p uses buffers that look like the input prompt to add additinal functionality. All in all, this is more work. Maybe vim offers already some built-in ways to do this.

Step 2:

  • save the list of commands on disk for permanent use.

Alternative sources for the commands:

  • use .bash_history (or similar files) as command history. But there is a lot of stuff in there that you'll never use from within vim.
  • let the user define a list of commands in his .vimrc.

In any case, the input() prompt needs to be replaced by something more powerful.

@benmills
Copy link
Collaborator

benmills commented Feb 1, 2013

I thought more about this feature and I'm worried that is going a little too far off the feature set that vimux needs. What might be a good idea is to add another vimux-specific plugin that implements this feature.

@benmills benmills closed this as completed Feb 1, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants