Closed JonathanReeve closed 5 months ago
c-o
is bound to evil-jump-backwards
. If you think the behavior is wrong you should open an issue with emacs-evil/evil.
@JonathanReeve If you open the ex command line, in either Vim or Spacemacs, by pressing :
, typing jumps
, and pressing RET
, then you'll see the list of locations that C-o
jumps through.
It doesn't just jump between buffers, but there can be several locations in the same buffer. I'm not completely sure when a jump location is recorded.
If you want to jump forwards with C-i
in Spacemacs, like it does in Vim, then you have to set the dotspacemacs-distinguish-gui-tab
variable to t
, in .spacemacs
. It's nil
by default, and that makes it behave like TAB
.
The problem is that neither C-o nor :jumps
access an actual list of visited locations. They only access the list of locations that evil mode remembers. So @CeleritasCelery, it's not a matter of evil-jump-backwards
misbehaving, but rather that spacemacs doesn't implement C-o keybindings or evil-jump-backwards
universally, and the jumps list doesn't contain lots of types of buffers. In Vim, C-o is universal, but in spacemacs, it only seems to work in certain contexts. Here are some concrete examples:
:jumps
shows a list of locations from org files I've opened, but neither the mu4e-headers buffer nor anywhere in the mu4e-view buffer. :jumps
doesn't show anything relating to the org-agenda view, so even if it were a keybinding issue, it couldn't properly handle going back. *spacemacs*
buffer, I can go to a recent file, but then when I try to C-o to go back to the *spacemacs*
buffer, it takes me to a completely different buffer, not *spacemacs*
which was the last buffer I was on. I can do SPC TAB
to go back to it, but not C-o
. Basically C-o works so inconsistently, I have to try to forget about using it and find some more reliable method (SPC b b
) of switching between buffers.
@JonathanReeve buffers where C-o
doesn't work, are they all evilified buffers by any chance? We don't bind C-o
for evilified buffers, so it remains at whatever it used to be. For example, in agenda buffer C-o
calls open-line
.
In the home buffer (*spacemacs*
), going to a recent file doesn't add the buffer to the jump list. This can be a separate bug report.
Are there any other contexts?
(also, please add a description of your system - SPC h d s
)
I just noticed that the Helm Mark Ring SPC r m
, lists buffers that don't have files associated to them, that might also be an option.
@bmag, I don't know what an evilified buffer is, but don't you think certain keybindings should be universal across types of buffers? I mean, SPC TAB
works in every type of buffer, as far as I can tell. Why can't C-o
work the same way? It's like if I want to switch between buffers I have to remember what kind of buffer I'm in.
Here's my system info:
(csv shell-scripts javascript yaml html helm haskell
(auto-completion :variables spacemacs-default-company-backends
'(company-files company-capf ein:company-backend))
emacs-lisp google-calendar bibtex ipython-notebook
(mu4e :variables mu4e-account-alist t)
git markdown python pdf-tools org
(shell :variables shell-default-height 30 shell-default-position 'bottom)
themes-megapack spell-checking syntax-checking vinegar)
@JonathanReeve Of course certain keys should be universal. I don't know why C-o
isn't part of those. It may have come up in an older discussion, or maybe it wasn't discussed at all. Currently we don't bind it, but we can change it. (following discussion, if there are any objectives)
You are welcome to open doc/DOCUMENTATION.org
and read about evilified buffers.
SPC TAB
and C-o
work differently because they are different features and rely on different mechanisms behind the scenes.
I'm trying to understand if all the contexts you referred to in the original post are covered by evilified buffers and that *Spacemacs*
part. Are there other contexts?
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Please let us know if this issue is still valid!
I think this issue should not be closed. I think C-o
should be universal like @JonathanReeve suggests. However it seems that it should't be labeled as a bug, but an improvement, since we still have some discussion to do on how exactly it should behave.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Please let us know if this issue is still valid!
In Vim, I use C-o all the time to go back to a previous buffer, but in spacemacs, it only works a fraction of the time. Somtimes SPC-Tab works when C-o doesn't. I expect to be able to use C-o in a variety of contexts, but it seems that depending on the buffer (org-agenda, mu4e-view, etc, etc.) C-o doesn't work.