-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
VCS/git support #227
Comments
magit is interesting but it hides a lot of useful feature. |
I am usingt gitui |
There is also nice Neovim plugin which shows what have been changed in the source tree, https://github.com/lewis6991/gitsigns.nvim |
Ah, yes, I searched I'll add votes for:
|
I just renamed it, so no worries :P |
One great thing is that we could reuse all our editor knowledge when providing a fugitive or magit feature, like searching, diff etc. Using another tool is a total different experience. |
Being able to use |
Just adding links to the git gutter symbols PR and the file comparison issue: |
I think much of the fugitive/magit/lazygit/gitui functionality belongs outside the core as plugin(s) but I think some read-only VCS information could belong in the core. In particular diff signs (whether VCS based or not - already being implemented) but also I think it isn't a stretch to have a gutter in the core for git's blame information. |
I can see the vcs implementation living in a plugin, but I think magit in unparalleled. It is much more discoverable than some may realize. Fugitive is great but magit with the blame, time machine, and difftool integration in magit is the thing that will keep me using emacs for the foreseeable future. I'd love to work on such a plugin. |
The way how |
Just following up with a bit of supporting data from /r/emacs. I thought it was worth noting just how high the proportion is of people who consider magit a core part of their emacs life. It is for this reason, that I have come to believe no matter the outcome of the plugin-system-or-not conversation ongoing in #122, tight and powerful git integration should be part of the core distribution of helix. Maybe @extrawurst, the creator of gitui would be interested in joining such a cause. |
I also think git integration is also as fundamental as LSP, grep and fuzzy finder and should be part of the core distribution of helix. |
The simplest and most unixy way to go would be to add a keybind that saves all files and launches https://github.com/extrawurst/gitui |
Maybe that would be the most simple to implement, but I'm not convinced it would be the most simple to use, which is also important. I think there is some benefit to unifying the experience, so the interface and behavior are consistent. In addition, the time machine and blame interfaces within the editor is really a nice quality of life tool, that just wouldn't work if the git tool were completely isolated from the editor. |
Also, I saw that @extrawurst just starred helix, so maybe they'll want to get involved or offer some suggestions on how tightly they could / should be coupled. 🤞 |
+ diffs with editor-quality syntax highlighting and the ability to do final cleanups / small fixes right in the side-by-side diff are solid productivity boosts. |
I really want to try helix but not having first class git integration is the one and only blocker for me. Since it already implements LSP it should be clear it's aimed at source code editing, and therefore I'd rather have core support than plug-in support. |
My Rust is sadly far too weak to take a stab at this myself, but the ability to hit something like |
This is the best keyboard based Git integration for an editor (Sublime) I came across. |
@vkoskiv If you are using WezTerm, the current file name and line number can be parsed from the status line by using something like this: status_line=$(wezterm cli get-text | rg -e "(?:NORMAL|INSERT|SELECT)\s+[\x{2800}-\x{28FF}]*\s+(\S*)\s[^│]* (\d+):*.*" -o --replace '$1 $2')
filename=$(echo $status_line | awk '{ print $1}')
line_number=$(echo $status_line | awk '{ print $2}') then it can be passed to tig: case "$1" in
"blame")
split_pane_down
echo "tig blame $filename +$line_number" | $send_to_wezterm_pane
;; split_pane_down() {
pane_id=$(wezterm cli get-pane-direction down)
if [ -z "${pane_id}" ]; then
pane_id=$(wezterm cli split-pane)
fi
wezterm cli activate-pane-direction --pane-id $pane_id down
send_to_wezterm_pane="wezterm cli send-text --pane-id $pane_id --no-paste"
} and finally, you can create a new minor mode bound to [keys.normal.";"]
b = ":sh hx-wezterm.sh blame" |
I agree that version control is something that's really fundamental, and based on the approach of helix so far seems like it belongs in the core. I also think it would be better to integrate it into helix itself in situations where you want to select, yank or edit text. (rather than delegating to something like gitui). So things like browsing diffs, blame, looking at previous versions of files, etc... The rest of the stuff (staging, commits, remotes, git log) is maybe less important to do inside the editor itself, and could be delegated to a plugin or a separate tool? I really enjoy using fugitive, but I do think that it's not quite helix-y from the point of view of discoverability. I've been using it for like 20 years and I still only use a really small subset of what I know it's capable of, since I forget how to activate the fancier features and never bother to look them up, resorting to the git cli or web UI instead. |
Just adding myself to the list of people interested in this issue. The one killer feature I'm really missing from This is really the only thing missing in my workflow that prevents me from fully leaving |
I am willing to work on |
If I've understood correctly, the problem is that Helix uses gix for git integration and gix (to my knowledge) doesn't have |
@jpaju you are right it currently does not support blame but there is some convo around implementing it, let’s make sure to not duplicate efforts here. You can find more context here: GitoxideLabs/gitoxide#1078 (comment) |
As a plugin for
git
to begin with.Prior Art:
fugitive.vim
emacs
The text was updated successfully, but these errors were encountered: