0

Steps to reproduce (all in the same window):

  1. Edit some-dir/file-1
  2. Run :Ex to see some-dir
  3. Open some-dir/file-2
  4. Press Ctrl+O

I'm sent to some-dir/file-1, instead of to some-dir.

I know I can use :Rex, but that's less convenient. Is there something I can add to my .vimrc maybe?

0
:Rex

is the way to go.

That said, <C-o> works as you want, here. I'm not sure why it doesn't for you. Netrw may purposely hide itself from the jumplist but I don't remember an option that governs that behavior. Read :h netrw just in case.

You could create your own mapping, of course, to work around what looks a lot like a bug or possibly a mapping overlap but that doesn't really sound right to me.

What is the output of :verbose map <C-o>?

  • Output is "No mapping found". I'm using Vim 7.4 on OS X (installed via Homebrew) – scribu Nov 11 '13 at 15:29
  • Try without your ~/.vimrc: $ vim -u NONE – romainl Nov 11 '13 at 15:34
  • If I do that, netrw is disabled altogether. However, if I run /usr/bin/vim (i.e. the native Vim 7.3), <C-o> works as expected (although the cursor is set to the last file). – scribu Nov 11 '13 at 16:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.