Skip to content

[Feat] Command: LazygitToggle #106

Open
@Dimfred

Description

@Dimfred

Is your feature request related to a problem? Please describe.

In my lazygit config I am using:

os:
  editPreset: 'nvim-remote'
  edit: "nvr --remote-send '<C-space>:q<CR><Esc>:lua vim.cmd(\"e \" .. {{filename}})<CR>'"
  editAtLine: "nvr --remote-send '<C-space>:q<CR><Esc>:lua vim.cmd(\"e \" .. {{filename}})<CR>{{line}}G'"

This allows me to open the file from lazygit inside my main window and not in lazygit. As you can see for that before opening the file, I am closing lazygit with q, what would be nice if I could just toggle then window away. Then way I could resume lazygit at the same spot I closed it.

Describe the solution you'd like

A LazygitToggle command, which allows to toggle the Lazygit window, so an extension of the currrent command.

That would be awesome :) Thx for the plugin btw, appreciate it.

EDIT:

Meanwhile I found how to better make use of <CMD> so this is the updated version, I'll leave the old one for reference. Then you also won't get annoying cmd popups n stuff.

os:
  editPreset: 'nvim-remote'
  edit: "nvr --remote-send '<CMD>q<CR><CMD>lua vim.cmd(\"e \" .. {{filename}})<CR>'"
  editAtLine: "nvr --remote-send '<CMD>q<CR><CMD>lua vim.cmd(\"e \" .. {{filename}})<CR>{{line}}G'"

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions