zedapp / zed

Rethinking code editing.
http://zedapp.org
MIT License
2.22k stars 162 forks source link

Cycle through "open" documents... #122

Open ghost opened 10 years ago

ghost commented 10 years ago

Ok ok, I know we don't really have a concept of "open" documents, but what I want is a command that just immediately switches to whatever document is listed first in the Ctrl-E goto menu. Is there a way to do this? I recently wrote this cute little extension, and bound it to a key:

https://github.com/robru/.zedapp.d/blob/master/user/command/view_log.js

It's brilliant for debugging! But now I want a key that goes back, because, uh, Ctrl-E Enter isn't fast enough.

Preferrably when I invoke this command, it would cycle through the whole goto list one at a time, rather than just go back and forth between two documents (which would be the result of typing Ctrl-E Enter repeatedly).

zefhemel commented 10 years ago

There is currently no such command, but it sounds useful! The problem I see with your preferred approach (going through the list once a time, not toggling between two) is that the goto list reorders as you "visit" files: the most recently opened files always jump to the top.

That said, a singly key combo to do the equivalent of Ctrl-E Return definitely sounds good.