Code Monkey home page Code Monkey logo

Comments (4)

srstevenson avatar srstevenson commented on April 29, 2024 1

I'm assuming the same is true of other non-OSX platforms

This isn't the case; open(1) is inherited from NextStep and not present on non-macOS platforms. The conventional behaviour is to check $VISUAL et cetera as @d6e suggests, falling back to vi if none of those variables are defined.

from lazygit.

jesseduffield avatar jesseduffield commented on April 29, 2024

Currently 'o: open' calls the open bash command which opens whatever editor would have opened if the file was opened in finder (I'm assuming the same is true of other non-OSX platforms). I'm having a look at man open and I can pass a -t flag to use the default text editor, but I like the idea of opening the editor that suits the filetype regardless of what the default is. @d6e Do you reckon it should just use $EDITOR or do it based on filetype, or should there be a command for each?

from lazygit.

jesseduffield avatar jesseduffield commented on April 29, 2024

@srstevenson thanks for the clarification. I've realised that opening vi isn't as clear cut as I thought it would be, because unlike standalone applications like sublime or vscode, it needs to be called as a subprocess in the current terminal. I've put up a PR (#18) that kind of does the job but after focus is returned to the app it gets very glitchy. Any contributions here would be greatly appreciated :)

from lazygit.

jesseduffield avatar jesseduffield commented on April 29, 2024

@d6e @srstevenson This behaviour is now implemented. The app tries the git editor, then VISUAL, then EDITOR, then vi. This is for the 'e' keybinding which is to edit the file.

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.