Coder Social home page Coder Social logo

custom EDITOR issue about lazygit HOT 4 CLOSED

peteringram0 avatar peteringram0 commented on June 17, 2024
custom EDITOR issue

from lazygit.

Comments (4)

stefanhaller avatar stefanhaller commented on June 17, 2024 1

It's a bit unusual to set the EDITOR variable to an absolute path, lazygit doesn't support that. My recommendation would be to do something like this instead:

export PATH="$HOME/code/helix/target/release:$PATH"
export EDITOR=hx

This should work.

from lazygit.

peteringram0 avatar peteringram0 commented on June 17, 2024

@stefanhaller This does work but only works if i remove helix from homebrew. Should the EDITOR variable not support both relative and local pathings?

from lazygit.

stefanhaller avatar stefanhaller commented on June 17, 2024

@stefanhaller This does work but only works if i remove helix from homebrew.

I don't understand, can you explain more?

Should the EDITOR variable not support both relative and local pathings?

It is only possible to support arbitrary paths for the edit command, but not for editAtLine (which is used when you press e in the staging view), because different editors have different command-line options for specifying the line number. That's why we decided to go with the editPreset approach that we are using now, which either defines all edit commands or none of them, since it would be confusing if pressing e in the files panel would open helix, but in the staging view it would open vim.

from lazygit.

peteringram0 avatar peteringram0 commented on June 17, 2024

@stefanhaller

I currently have helix installed via homebrew as well as having the source and a custom compiled version which i added to PATH as an ALIAS. This ALIAS seems to take pirority rather then items in PATH.

I didnt realise Lazygit does this, but after checking it only works for me using the lazygit config EDITOR override as per your comment suggests.

I think using this config is the best approach for me here and agree this is most likley unusual configuration from my side.

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.