News for hackers. Stuff that matters.
Re:Why Should You Learn Vim in 2020 by yodsanklai on Wednesday August 05, 2020 @05:18PM (#24065713)
> Because every editor worth its salt has an option to use vim keybindings.

I'm not sure about this. For instance, I'm typing this message in a text box in my browser and I don't have access to vim keybindings. There are many cases where this happens (other example: google docs).

I do use vim whenever I can, but I'd say the most useful keybindings that one can learn are the ones from the OS.

Re:Why Should You Learn Vim in 2020 by justinator on Wednesday August 05, 2020 @05:22PM (#24065757)
Both Chrome and FF have plugins to add vim key bindings - at least for navigating around the UI and the page. Which would support the argument to learn them. I guess your argument would be stronger if there were other $editor_of_choice key bindings for browser textboxes?
Re:Why Should You Learn Vim in 2020 by oblio on Wednesday August 05, 2020 @05:27PM (#24065808)
There are key bindings for other editors, they're called CUA :-)

I can Ctrl-C/Ctrl-X/Ctrl-V to copy/cut/paste, Ctrl-arrows to move around one word at a time, Ctrl-shift-arrows to select words, Home and End to go to the start and end of the line, etc, Ctrl-Home/Ctrl-End to move to the start and end of the text input, etc.

Re:Why Should You Learn Vim in 2020 by vmladenov on Wednesday August 05, 2020 @05:32PM (#24065855)
On macOS a majority of UI text fields support readline bindings (^A, ^E, etc) which is really nice
Re:Why Should You Learn Vim in 2020 by jolmg on Wednesday August 05, 2020 @07:03PM (#24066569)
> support readline bindings (^A, ^E, etc.)

Those are emacs bindings. Readline uses emacs bindings by default, but it can also use vi bindings.

Unless you mean that it uses readline and so configuring it (i.e. ~/.inputrc) allows you to change the keybindings of macOS UI text fields. That'd be cool if it's the case.

Re:Why Should You Learn Vim in 2020 by yodsanklai on Wednesday August 05, 2020 @06:04PM (#24066124)
I have a big issue with these bindings: there is no "right" ctrl on my MBP keyboard. If you touch type, I find ^A very cumbersome to type. I find it easier to use mac os default (cmd + arrow) which also opens variants such as option + arrow, shift + option + arrow. The only readline binding I do use is ^K (not as bad as ^A because k is on the right side of the keyboard, and there is no alternative anyway).
Re:Why Should You Learn Vim in 2020 by LeonB on Wednesday August 05, 2020 @06:03PM (#24066112)
I read this comment 20 minutes ago and tweeted about it. I came back here to provide a link to a browser plugin for vi keybindings and found many other people had also commented with examples- only different ones.

Here’s another:

https://github.com/akahuku/wasavi

Re:Why Should You Learn Vim in 2020 by ybbond on Thursday August 06, 2020 @11:24AM (#24071751)
I checked the comment before commenting, and turns out someone already mentioned wasavi.

Very useful tool, too bad it does not support key mapping. I'd like to `nmap gj <ESC>` or the essential `nmap j gj`, because writing on small `<textbox/>` tends to wrap the content.

Re:Why Should You Learn Vim in 2020 by jjav on Wednesday August 05, 2020 @05:44PM (#24065970)
> I'm not sure about this. For instance, I'm typing this message in a text box in my browser and I don't have access to vim keybindings. There are many cases where this happens (other example: google docs).

But both in this box and in google docs (and so many more places) you have access to the basic emacs C-* cursor movement and line manipulation bindings.

One should really know both vi and emacs style basic movement bindings. Both work in many places, sometimes it's one or the other.

Re:Why Should You Learn Vim in 2020 by m3at on Wednesday August 05, 2020 @06:01PM (#24066095)
Here, that will let you greatly expand where you can use vim:

> Sometimes, you edit text outside of Vim. These are sad times. Enter vim-anywhere!

https://github.com/cknadler/vim-anywhere

Re:Why Should You Learn Vim in 2020 by dbalatero on Thursday August 06, 2020 @09:00AM (#24070482)
I'm working slowly on a Vim mode also that works in all text areas without kicking people into Vim: https://github.com/dbalatero/VimMode.spoon
Re:Why Should You Learn Vim in 2020 by m3at on Thursday August 06, 2020 @10:16AM (#24071062)
Very interesting! I will give it a go.
Re:Why Should You Learn Vim in 2020 by Onawa on Wednesday August 05, 2020 @10:36PM (#24067647)
Oh my god thank you so much for posting this!
Re:Why Should You Learn Vim in 2020 by randompwd on Wednesday August 05, 2020 @05:52PM (#24066039)
> I'm typing this message in a text box in my browser and I don't have access to vim

https://github.com/GhostText/GhostText

GhostText extension for chrome/FF and listed $plugin for $editor means you can live edit a browser textarea in $editor with text sent in real time to browser.

Unfortunately, Google Suite(docs etc.) does not play nice and does not work.

Worth checking out.

Also for a more embedded vim experience: https://github.com/glacambre/firenvim

Re:Why Should You Learn Vim in 2020 by jbpnoy6fifty on Wednesday August 05, 2020 @05:21PM (#24065743)
I believe he meant code editors. Examples of which I have used Vim bindings

- google chrome

- sql server management studio

- jupyter notebook

- jupyter lab

- visual studio code

- ms visual studio

- dbeaver

- eclipse

- sublime text 2

- hackerank, iirc

Re:Why Should You Learn Vim in 2020 by youerbt on Wednesday August 05, 2020 @05:46PM (#24065983)
For me, writing short prose like emails or internet comments doesn't really require vim keybindings. It mostly requires keyboard for what it was designed for - inserting text.

Editing source code, on the other hand, benefits much more from vim, because inserting text is only part of it.

Re:Why Should You Learn Vim in 2020 by m463 on Wednesday August 05, 2020 @07:32PM (#24066758)
I use macos and linux and the keybindings are compatible with emacs.
Re:Why Should You Learn Vim in 2020 by apta on Wednesday August 05, 2020 @11:18PM (#24067832)