vim-vinegar icon indicating copy to clipboard operation
vim-vinegar copied to clipboard

Feature Request: go to the project root

Open last5bits opened this issue 7 years ago • 1 comments

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.

last5bits avatar Dec 21 '18 18:12 last5bits

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.

tpope avatar Dec 21 '18 19:12 tpope