Is your feature request related to a problem? Please describe.
I've recently been using Neogit more and more in favor of LazyGit. Most of the time I'm editing files on [WIP] branch with lots of changes which won't make to other branches or aren't commited yet.
I'm launching Neogit with this keymap:
{ "<leader>gg", '<cmd>Neogit<CR>', desc = "Neogit" },
But after launching Neogit I'm lost for a while and have to think for couple of seconds name of the file I was editing and I'd like to commit.
I've came up with this crude solution:
{
"<leader>gn",
function()
local file = vim.fn.expand("%:t") -- just the filename
require("neogit").open({ cwd = vim.fn.expand("%:p:h") })
vim.defer_fn(function()
vim.fn.search(file, "w")
end, 200)
end,
desc = "Neogit (focus current file)"
}
Describe the solution you'd like
I'd like to propose additional Neogit subcommand like :Neogit focus name doesn't matter really. But I think it would streamline working with Neogit.
Thanks a lot for your work and your passion. Neogit is growing on me every day!
Is your feature request related to a problem? Please describe.
I've recently been using Neogit more and more in favor of LazyGit. Most of the time I'm editing files on [WIP] branch with lots of changes which won't make to other branches or aren't commited yet.
I'm launching Neogit with this keymap:
{ "<leader>gg", '<cmd>Neogit<CR>', desc = "Neogit" },But after launching Neogit I'm lost for a while and have to think for couple of seconds name of the file I was editing and I'd like to commit.
I've came up with this crude solution:
{ "<leader>gn", function() local file = vim.fn.expand("%:t") -- just the filename require("neogit").open({ cwd = vim.fn.expand("%:p:h") }) vim.defer_fn(function() vim.fn.search(file, "w") end, 200) end, desc = "Neogit (focus current file)" }Describe the solution you'd like
I'd like to propose additional Neogit subcommand like
:Neogit focusname doesn't matter really. But I think it would streamline working with Neogit.Thanks a lot for your work and your passion. Neogit is growing on me every day!