HNHacker News
TopNewBestAskShowJobs

drbaba

104 karma · joined April 19, 2023

submissionscomments
drbaba··on Vimcasts – Free screencasts about the text editor Vim
I’ve also used Vim as my main editor for 10+ years. After that, I spent a year or so with Emacs, and then a couple of years with Sublime Text 4 once I got tired of configuration. I never fully gave up on Vim though, I use it if I work remotely or have to do data transformation via macros.

I’m currently testing Helix [1], which is a terminal editor with Vim-like keybindings — but which requires no configuration or plugins (LSP works out of the box, sensible leader keybindings by default, multiple cursors is built in). It lacks some features like snippets and folding though. Vim -> Helix reminds me of when I switched Zsh -> Fish: I lost some power, but it did 80% of what I wanted from a custom config without any work. Remains to see whether I’ll stick with it long-term though.

[1]: https://helix-editor.com/

drbaba··on Vim Keybindings Everywhere – The Ultimate List
For me, the lack of incremental search with C-s/C-r is the big one — would love to jump around inside any text field using C-s pattern C-s C-s … CR (especially ergonomic if you use Caps as Ctrl). That’s a bit different than navigating with Cmd-F, which in most apps is (i) not incremental and (ii) often throws the cursor out of the text field.

It is also worth noting that macOS also uses Cmd+Opt as its Meta key (so Cmd-Opt-F and Cmd-Opt-B are the word-wise motions).

drbaba··on Vim Keybindings Everywhere – The Ultimate List
I also find Sublime Text to have the most well-designed non-Vim keybindings I’ve used. Having used Vim for a decade before trying Sublime, I initially underestimated how well it works even without a Vim plugin.

Two of my favorite tricks: (i) Search in file (Cmd-F), turn on regex mode if it’s not already on (Cmd-Opt-R), search for a pattern (with regex syntax highlighting!), and press Opt-Enter. This places one cursor / selection at every regexp match.(ii) Press Cmd-R to get a list of classes/functions in the file, and navigate with arrow keys (or type to search). Performs roughly the same function as I used code folding for in Vim or imenu for in Emacs. (Sublime also has code folding, but I don’t like the implementation much.)

drbaba··on Keyboard tricks from a macOS app dev
I agree, Readline is the reason they got so widespread. But note that except Bash, none of the shells and interpreters I listed actually use GNU Readline these days — and that Emacs and its keybindings predates Readline.
drbaba··on Keyboard tricks from a macOS app dev
The defaults can be changed (DefaultKeyBindings.dict). However, those keybindings are not just “yet another set of bad old combos”; the same keybindings are used by default in Emacs on any platform, and by most POSIX shells and interpreters (Bash, Zsh, Fish, IPython, etc.). On Mac, they’re inherited by most other GUI text editors (e.g. Sublime).
drbaba··on My Emacs eye candy
Well, it depends on your system. In my experience, Emacs without native-comp is way snappier on Linux than on Mac and Windows -- and getting native-comp working is also much easier on Linux, which has a big impact. Large numbers of pixels (high-DPI / Retina displays) can increase stuttering and flickering in the GUI version, in which case performance can improve by using `emacs -nw` in a GPU-accelerated terminal (Kitty/Alacritty), or maybe by switching to a different GUI frontend (e.g. the NS Port vs. Mac Port on MacOS, or the X11 vs. PGTK version on Linux).
← PreviousPage 3 of 3