Readit News logoReadit News
qyron commented on Edamagit: Magit for VSCode   github.com/kahole/edamagi... · Posted by u/tosh
iLemming · 3 months ago
> When I see comments like "Magit is the only thing that keeps me from leaving Emacs," I honestly wonder what they're going to miss.

The "killer feature" is how it makes git feel like a natural extension of text editing rather than a separate tool. Other git UIs exist, but none integrate the "edit-review-commit" cycle as seamlessly. It's less about any single feature and more about how it transforms git from something you "switch to" into something that's just... there.

A huge part of what makes Magit special - it's not just a UI, it's a complete git API for Emacs - Magit is a library, not only I can easily extend Magit's own functionality, I can just call its functions, advice them, etc.

For example: If I want in my tab (there's tab-bar-mode in Emacs) some git-based info, I can easily do it. Or I can hook into magit-post-commit-hook to trigger custom actions. This composability is impossible with standalone git clients. You're not just using a git interface - you're programming with git as a first-class citizen in your editor. Other tools give you a UI; Magit gives you building blocks.

There are integrations in Emacs that Magit author and maintainers never even thought about initially. Like for example in Dired, where you'd be listing directories, you can mark some files and dirs, and stage those files or show the git log pertaining only marked items.

But again, it's not so much about features that already exist in Magit, but the way how one can easily extend things to add features that are not there - and there are tons of examples - note-taking workflows (where using Org-roam/Denote one can stage specific thoughts from their daily notes, creating atomic commits of ideas); literate devops (where you keep tf/ansible scripts in Org-mode src blocks and commit directly from the same document); academic writing (e.g., with LLM integration); time tracking (where people hook to magit-post-comit to automatically log time entries); config management (where you use magit's cherry-pick to selectively sync specific configs between work/personal machines), etc., etc.

qyron · 3 months ago
So I see that Magit provides not just the git GUI client but also API functions which can be used in other plugins and user config. However I'd like to dig a bit deeper into the real value of this for a user of "stays with Emacs only Magit"-type. So forgive me for being too picky.

Putting all Org-mode related features aside, since obviously Org-mode is much more Emacs-exclusive feature than Git support, here's what I see from your comments.

> If I want in my tab (there's tab-bar-mode in Emacs) some git-based info, I can easily do it.

I understand tab-bar is similar to tab bar in modern GUI editors - just a list of open files. Modern editors already mark dirty/staged files in the tab bar. Can you give an example of another information that one might want to add to each file?

> Like for example in Dired, where you'd be listing directories, you can mark some files and dirs, and stage those files

I assume Dired is some kind of file browser. While I appreciate the ability to integrate Magit with any file browser plugin, staging/unstaging files from the file tree sidebar is basic functionality of any editor with Git support. It's hard for me to imagine any life-changing improvement in this area.

> or show the git log pertaining only marked items.

Yes, that's neat. But IMO it's a very advanced feature that's used pretty rarely. Most of the time one wants to see either git log for current file or select some file in file tree in sidebar and see its log.

> Or I can hook into magit-post-commit-hook to trigger custom actions

You provided some examples for integration of Magit with note-taking. Advanced note-taking in emacs is a whole different world and I assume that person wanting to leave Emacs (but staying for Magit ;) will be ok with using some more mainstream note-taking software (like Obsidian etc.). So when using a code editor/IDE for its' original purpose - editing source code in some programming language, what would be a popular example of Magit hook that is not achievable with the existing Git hooks mechanism?

To clarify again my doubts, I think that someone who has mastered Elisp, maintains his own Emacs config and heavily customizes Emacs to his liking, would never consider moving to VScode or Jetbrains. However, all those Doom users evaluating to move to "mainstream" editors, who do only minor adjustments (like options, keybindings), do they get something substantial from Magit that they can't achieve in those editors?

qyron commented on Edamagit: Magit for VSCode   github.com/kahole/edamagi... · Posted by u/tosh
iLemming · 3 months ago
There's no such thing as "Magit for VSCode", it could be "Magit-like" or "Magit inspired", but never can replace Magit, simply because Magit is not an extension, it's an Emacs package.

Emacs doesn't have "extensions", because every package can be used as a library or radically change the behavior not only Emacs itself but other packages too. Magit's parts been used in other packages - transient.el has evolved into a separate package; magit-section is used in packages like code-review.el, forge, notmuch; magit-git - low-level git interface functions used by packages like diff-hl, git-gutter, etc.; process handling abstraction used by packages that need async process management; etc.

VSCode extensions run in isolation, you can't directly call functions of one extension from another, you can only use what an extension explicitly exposes via its public API (if any). In comparison, Emacs users can freely incorporate Magit's internal commands into their configs, extend them and combine multiple packages seamlessly.

In Emacs, one could write a 5-line function that checks Magit's current branch, queries Projectile for project type, and then calls different Magit commands based on context. In VSCode, something like that would require formal APIs, message passing between extensions, and cooperation from all involved extension authors. In Emacs, you wouldn't even have to save the function on disk before trying it out.

qyron · 3 months ago
Seeing all the praise for Magit in these and numerous other threads, could someone please elaborate on its standout features that are missing from other editors/IDEs (VSCode+extensions or JetBrains)?

For example, in my current VSCode + GitLens setup (must admit that I have a corporate license for GitKraken, which enables full GitLens functionality). I use these features 99% of the time.

1. Convenient diff/merge with character-level diffs and visual indication of moved code.

2. A graphical commit tree with filtering, searching, numerous hovers with lots of information, and buttons to quickly jump to all sorts of diffs.

3. Interactive rebase (GUI for selecting those pick/squash/reword etc.)

4. Editing new and existing commit messages in vscode, which allows me to use better commit message formatters, LanguageTool and LLM extensions for rewriting/paraphrasing.

When I see comments like "Magit is the only thing that keeps me from leaving Emacs," I honestly wonder what they're going to miss.

qyron commented on Microsoft has not stopped forcing Edge on Windows 11 users   ctrl.blog/entry/windows-s... · Posted by u/extr0pian
SadTrombone · 2 years ago
Have you tried Vivaldi's vertical tabs? They seem quite powerful and I like the implementation more than Edge's.
qyron · 2 years ago
More powerful does not necessarily means better. Vivaldi indeed allows much more customization, but for my tab-heavy browsing pattern Edge's (and now Brave's) way suits much more. For example some things I don't like in Vivaldi:

- No colors. In Edge/Brave new color is auto-assigned when creating new tab group and can be overridden at any time.

- When tab group is expanded, the group name/header is not shown. When you have many groups with similar tabs they are much less visually distinct from each other.

- Moving new tab to one of previous collapsed groups can be easily done via context menu in Edge. In Vivaldi you'll have to expand the group and drag the tab.

These are all minor inconveniences but together they make a big difference.

qyron commented on Microsoft has not stopped forcing Edge on Windows 11 users   ctrl.blog/entry/windows-s... · Posted by u/extr0pian
qyron · 2 years ago
I share all criticism on the subject but I must admit there is a killer feature that alone converted me to use Edge on MacOS - native vertical tab bar with tab grouping. It worked much better for me than all Chrome and Firefox extensions I tried before.

I know Brave implemented it recently too so Edge is not the only player in town now, but it was the first! Hopefully the rest of browsers will follow the trend.

qyron commented on Wayland Protocol Finally Ready for Fractional Scaling   phoronix.com/news/Wayland... · Posted by u/edward
chrismorgan · 3 years ago
On the specific topic here, fractional scaling, macOS gets it disastrously wrong, only supporting downscaling, which means that it’s impossible to get pixel-perfect output on fractional scales, which are the norm on most of their devices. I seriously can’t comprehend how they ended up going that way, given that they were the ones in a position to force developers to get things right, far more than Windows, but no, they just didn’t even try. On the contrary, Windows has worked with fractional scaling from the start of its high-DPI story, and although it did take a while to get it right in all circumstances (I think the last pieces came in 2017, with DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE_V2 and also incidentally GDI scaling to automatically improve most older, DPI-unaware apps), it’s been robust since on all but a few badly-made apps that claim DPI-awareness but actually lack it (and you can forcibly change how they behave if necessary).
qyron · 3 years ago
I don't really know how HiDPI is implemented on Windows, but I do know some very popular VST plugins (music production software, which usually uses its own GUI and scaling integration) which still doesn't scale properly in popular plugin hosts, so you can't really talk about "getting it right in all circumstances".

This problem doesn't exist on Mac where the OS is kind of responsible for all the scaling. So, between MacOS's approach which may be not pixel-perfect but "just works" and Windows's one which usually works perfectly but still has problems in certain categories of software, I'll probably choose the former.

qyron commented on Next-generation AI models   tabnine.com/blog/announci... · Posted by u/BrandonJung
BrandonJung · 3 years ago
Appreciate the feedback and looks like you are clearly in the developer group that wants very fast small useful completions. Can you share the modifications that you made and perhaps a few more details on what they were?
qyron · 3 years ago
Both are related to limitations of vscode completion engine, so Tabnine can't really blamed for them in any way.

1. Initially Tabnine's auto-completion was triggered on any character, which best leveraged Tabnine's power but also had inherent problem: when Tabnine was triggered on non-letter character it sometimes prevented Vscode from showing suggestions from other completion sources (LSPs, snippets). There is a discussion in https://github.com/codota/tabnine-vscode/issues/6 with me explaining that the only viable solution is to reduce set of trigger characters to letters only. In the end a fix was pushed that reduced the set of trigger characters, which made the problem less likely but still not solved. The are numerous duplicates of this issue on Github.

2. Another problem is when Vscode has auto-completion suggestions from Tabnine and other sources (LSP, snippets), it frequently puts Tabnine's at the top of list. This is a big no-go for me because most of the time just want to complete the identifier (class field, method etc.). Modifying just the extension code didn't help so in the end I had add a small patch to Vscode itself, which gives lowest score to Tabnine's candidates: https://github.com/sergei-dyshel/vscode/commit/ee73034b9ec6c....

I must admit that both problems can be practically solved by new "inline auto-completion" mechanism in vscode which looks very promising for AI-based completion in general. I'm looking forward to evaluate it.

qyron commented on Next-generation AI models   tabnine.com/blog/announci... · Posted by u/BrandonJung
qyron · 3 years ago
I consider myself pretty advanced user of Tabnine, having purchased the first version from Jacob just when it appeared. I haven't used (and don't plan to) its full-function code completion and only briefly evaluated Copilot. Some thoughts:

- Tabnine's local per-repository model shines best when used on big monolithic repos with lots of similar or boilerplate code. By learning on the same code it's used for it IMO does much better job at detecting local patterns. Also local-model means pretty "safe" from security POV for corporate use (I can't imagine big corps like Google and Amazon allowing use of Copilot for proprietary code).

- Back in they free tier of Tabnine was pretty useless compared to Pro because it severely limited model size. If it's still the case now I hope they have a long evaluation period.

- From usability POV, unfortunately it doesn't provide non-intrusive experience out of the box, which is very annoying and I believe is a reason for many users abandoning it pretty quickly. I had to modify both VSCode extension and VSCode itself (!) so that Tabnine's completion suggestions won't interfere with others.

qyron commented on Ask HN: How is your experience with a mechanical keyboard?    · Posted by u/samrohn777
qyron · 4 years ago
Using Ergodox and Moonlander on daily basis. I think most of gain in my case comes from the the keyboard being split, staggered layout, programmable etc.

Mechanical switches are just nice bonus. Of course it's fun to try different switches, keycaps, o-ring and pimp the keyboard in some way but I don't think it boosts my productivity in any way or helps with RSI....

qyron commented on Kitty – a fast, featureful, GPU based terminal emulator   sw.kovidgoyal.net/kitty/... · Posted by u/Ayey_
qyron · 7 years ago
About a year ago I was deciding between Kitty and Alacritty and I chose Kitty because of 2 important features it had over Alacritty: proper underline rendering (Alacritty just draws underscores) and text selection with Shift+Mouse. Kitty also compiles instantly as it's written in plain old C. The author is also very responsive on GitHub and addresses each issue quickly.

u/qyron

KarmaCake day6May 5, 2017View Original