Short Question:
What is netrw function for up one level, how can I call it in my own function?
Context:
After installing a new ruby I had to reinstall vim to get it working again. But now netrw has some issue where if I press - to go up one level, it goes up a level and then starts visual mode such that I can't just make it go up another level without Esc every time.
I have an idea for a hacky solution, but I don't know what the function netrw uses to go up a level is, and I don't want to emulate it by searching for line .. and pressing enter, since then netrw won't remember my place I think. Incidentally I have a shortcut for opening Rex, but undoing it doesn't fix the problem. vim -u NONE then :se nocp :so $VIMRUNTIME/plugin/netrwPlugin.vim then :E will make it behave, but I don't have any clue where in my vimrc or plugins something could be going wrong. For now I think if I know the uponelevel function I could use it as a good band aid to the problem.
augroup netrw_mapping
autocmd!
autocmd filetype netrw call NetrwMapping()
augroup END
function! NetrwMapping()
noremap <buffer> - -
endfunction
fu! OpenExplorer()
" if &ft ==# "netrw"
" exe "-"
" endif
try
:Rex
catch
:Ex
endtry
endfu
" Like :Ex, but put curson on file you opened from.
nno - :call OpenExplorer()<CR>
This is going to be a hard one to find the root cause of, because it occurred after brew install vim, not after changing my vim files, so if it's in my vim files it's because something in my vimfiles relied on some quirk in my last installation of vim. Although I have updated vim in the past with no issues, and I'm still on the same version of vim. Just new ruby.
– Wumbo Oct 04 '19 at 17:16