0

After executing :Explore **/*.py to match *.py under the current directory tree, I cannot execute :Pexplore and :Nexplore using <s-up> an <s-down>.

I have tried both SHIFT+<up> and s+<up> etc., but nothing happens.

Why can't I use these key bindings to go to the previous/next match?

Edit: Starting Vim using a plain vimrc (:set nocompatible | runtime! plugin/**/*.vim) results in <s-up> just moving the cursor up (likewise for <s-down>).

Shuzheng
  • 1,235
  • 8
  • 21
  • Can you explain why you can't execute :Pexplore with <s-up>? You press the key and nothing happens, or you get an error message, if you do which one? What do you mean by you tried both SHIFT+<up> and s+<up>? Did you try to create a mapping with this syntax or how did you use these two things? Also as usual, is it possible it comes from your vimrc? Have you tried without a vimrc? And finally are you using vim/neovim/both, if you use both do you see a difference between each other regarding this issue? – statox Feb 24 '21 at 12:32
  • @statox - I use Vim 8.2 on macOS. Yes, I tried starting Vim using vim -u /dev/null, but in that case netrw isn't loaded, so can't test it in that case. Do you know which command is used to load netrw from ~/.vimrc`? – Shuzheng Feb 24 '21 at 12:47
  • You need to put filetype plugin on and runtime plugin/netrwPlugin.vim in a tmp.vimrc file and start vim with vim -u tmp.vimrc – statox Feb 24 '21 at 13:11
  • @statox - why isn't filetype plugin on sufficient? I tried execute that command after vim -u NONE, but :Explore was not there. I don't have runtime plugin/netrwPlugin.vim in my normal ~/.vimrc. – Shuzheng Feb 24 '21 at 13:13
  • @statox - Didn't work for me to put those two lines in a vimrc and load it using vim -u vimrc. – Shuzheng Feb 24 '21 at 13:14
  • Why runtime is necessary: Actually it would also work if you put set nocp in the temporary vimrc. I think that when you start vim with a custom vimrc (but without the -u flag) it automatically start in no compatible mode (which source stuff in runtime) when you use -u you either have to set nocompatible yourself or to source the runtime files by yourself. – statox Feb 24 '21 at 13:17
  • About the fact that it didn't work with the test vimrc: what didn't work? You didn't get netrw to work? You get it to work but <s-up> still doesn't work? Or is it something else? Also please edit your question to put all this information directly in the question so that people don't have to dig the comments to understand what's going on: You'll have better chances of getting a good answer this way :) – statox Feb 24 '21 at 13:17
  • @statox - netrw works now using a plain vimrc (:set nocompatible | runtime! plugin/**/*.vim), but <s-up> just moves the cursor up. – Shuzheng Feb 24 '21 at 13:51
  • @statox - I've edited the question – Shuzheng Feb 24 '21 at 13:52

0 Answers0