Closed last5bits closed 5 years ago
That's a pretty limited definition, but if that's what you want, it's a one liner with Fugitive:
autocmd FileType netrw nnoremap <buffer> g~ :Gedit :/<CR>
Personally my needs are more elaborate than that and I'd rather have something Projectionist based:
autocmd FileType netrw nnoremap <buffer> g~ :edit `=projectionist#path()`<CR>
At any rate, I consider "project root" to be outside the scope of Vinegar.
I absolutely love the "~" mapping that opens the home directory. What about having a similar mapping that opens the root of the current project? This can be defined as the closest parent directory that has
.git
inside of it.