From 7e8cb3d873e6004a7fa678da1dfa90538acc56cf Mon Sep 17 00:00:00 2001 From: Joe Lencioni Date: Sun, 21 Feb 2016 08:55:18 -0800 Subject: [PATCH] Vim: make go to last file, not to netrw It has long annoyed me that once I've started to explore the directory of a file using vim-vinegar's `-` mapping, I can't easily get back to the file with `` (ie. ``) or ``. Thanks to @wincent [0], I have found a workaround: https://github.com/tpope/vim-vinegar/issues/25 Unfortunately, this doesn't fix my other annoyance of netrw polluting the jumplist. Looking at `:help netrw` it looks like `g:netrw_keepj` intends to do this and it is defaulted to "keepj" (on), but it isn't quite as good as I would like. [0]: https://github.com/wincent/wincent/commit/337792ff --- .vim/plugin/netrw.vim | 1 + 1 file changed, 1 insertion(+) create mode 100644 .vim/plugin/netrw.vim diff --git a/.vim/plugin/netrw.vim b/.vim/plugin/netrw.vim new file mode 100644 index 0000000..8994d5a --- /dev/null +++ b/.vim/plugin/netrw.vim @@ -0,0 +1 @@ +let g:netrw_altfile = 1 " Make go to the last file, not to netrw