Comments (4)
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.
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.
@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.
@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)
- [FR] Skip remotes list if there is only one remote HOT 6
- log.showSignature causes reword dialog to spill gpg info into the commit message HOT 1
- Remove local and remote branches in a single "Delete..." action HOT 4
- Excluding a file in a worktree does not work HOT 3
- Editing a gpg signed commit message via a Editor crashes HOT 1
- Better global error handling
- Unable to update lazygit - Invalid cross-device link
- Possible memory leak HOT 1
- Installing Lazygit with Go, dependency download failed HOT 4
- Jittering and laggy scrolling in the latest version HOT 1
- lazygit is not starting HOT 2
- crash if opened from a .git folder
- Additional reset shortcut HOT 3
- Lazygit crashed on adding github SSH remote HOT 1
- error "expected section name" HOT 3
- Emoji in commit log cause extra characters right after the emoji HOT 1
- Disable split when Staged/Unstaged is empty HOT 1
- externalDiffCommand doesn't work when diffing between 2 refs HOT 2
- PowerShell's limitation on 4bit basic 16 colours
- Nil pointer on *RemoteBranch.FullName
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lazygit.