Giter VIP home page Giter VIP logo

Comments (5)

stefanhaller avatar stefanhaller commented on July 28, 2024

You should be able to do this already using a config like this:

customCommands:
  - key: "q"
    command: 'nvim --remote --send-keys "close"'
    context: "global"
    description: "Quit"
keybinding:
  universal:
    quit: <disabled>

Let me know if this works!

from lazygit.

xzbdmw avatar xzbdmw commented on July 28, 2024

But esc to return at top level will have to close lazygit, so can we permit a way to specify a custom command be triggered at that time?

from lazygit.

stefanhaller avatar stefanhaller commented on July 28, 2024

When quitOnTopLevelReturn is true, you mean? Hm, I very much dislike that option, so it's off for me and I don't have this problem. Maybe you can just train yourself to hit q instead of esc? 😄

If not, then yes, we'll have to add a new config key to support this. I was trying to avoid this if possible...

(For a moment I was considering changing the top-level esc handler to send a q keystroke down the event queue, so that it goes through the normal keybinding dispatching and the above solution would work, but that's probably too hacky.)

from lazygit.

xzbdmw avatar xzbdmw commented on July 28, 2024

I very much dislike that option

Yeah if it accidentally closes lazygit that's bad, but quitOnTopLevelReturn would be convenient to hide lazygit, kinda like customCommandOnTopLevelReturn. Maybe the usecase is too special, feel free to close this.

from lazygit.

xzbdmw avatar xzbdmw commented on July 28, 2024

closing as I'm now only use q to close

from lazygit.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.