News for hackers. Stuff that matters.
Re:Vim Anywhere by ulkesh on Friday February 16, 2018 @10:39PM (#16398819)
Maybe I'm just not _getting it_ and am too old for this, but why would I ever want to have my computer open a completely different program simply to input text into a text box when it already has focus and I can simply type at that point?

I understand using vim for development, or editing files while already at a command prompt; I just don't see the point in this use case other than to feel clever.

I am willing to be enlightened if I'm missing something.

Re:Vim Anywhere by eadmund on Friday February 16, 2018 @11:16PM (#16398962)
I don't know if it's as applicable for a vim user, but as an emacs user I really appreciate having access to the same tools I use to edit all of my other text: the same search, the same dictionary, the same completion engine, the same Org-mode keybindings (so that I can save myself a note or TODO as I'm in the middle of writing), the same … everything.

Honestly, every programme other than emacs is a distraction.

Re:Vim Anywhere by Lio on Saturday February 17, 2018 @05:10AM (#16400003)
I’m a Vim user but this exactly nails the point. I mostly use the terminal for everything I can because I know the shortcuts and they’re consistent across operating systems.

For all its faults, readline is a godsend for Vi users.

Re:Vim Anywhere by gschier on Saturday February 17, 2018 @12:30AM (#16399233)
If you're not a heavy Vim user you may not understand but the only way I can describe it is that Vim is different enough that it makes you forget how to edit text the "normal" way. One example is that Vim doesn't require arrow keys, so having to use arrows to navigate text in a normal editor is a huge pain.
Re:Vim Anywhere by lucb1e on Saturday February 17, 2018 @07:23AM (#16400377)
And hjkl is not the arrow keys' replacement, as many non-users think.

There are a hundred other ways to move around a file, each of which are more efficient than hitting a button ten times. Those kinds of things are what makes Vim convenient (though not having to move your hand to the arrow keys for going one line down is pretty convenient, too).

Re:Vim Anywhere by MaxBarraclough on Saturday February 17, 2018 @04:06PM (#16402697)
I'm a Vim fan, but that's a little disingenuous.

Ordinary text editors have ctrl-left and ctrl-right, which are equivalent to Vim's w and b. They also have Home/End and ctrl-f.

Re:Vim Anywhere by ibotty on Sunday February 18, 2018 @05:38AM (#16405393)
But w and b are not the end of vi's (let alone vim's/neovim's + plugins') motions.
Re:Vim Anywhere by MaxBarraclough on Sunday February 18, 2018 @06:16AM (#16405517)
Sure, but it's not often I win big by using Vim's advanced movement commands.
Re:Vim Anywhere by zweicoder on Monday February 19, 2018 @04:01AM (#16411653)
One of the most useful Vim motions for me has been repeating j / k for n times, e.g using 12j to jump down 12 lines.

Combined with relative line numbers (to show how many lines to jump up / down) this has been a really big win for me to navigate around text.

Re:Vim Anywhere by jsjohnst on Sunday February 18, 2018 @12:41PM (#16407140)
Shift-G / gg are “big” wins for me on a fairly regular basis.
Re:Vim Anywhere by MaxBarraclough on Sunday February 18, 2018 @01:20PM (#16407323)
That's a good example, but I suspect most editors/IDEs have their own equivalent shortcuts.

Apparently in Visual Studio it's SHIFT+CTRL+HOME.

Re:Vim Anywhere by jsjohnst on Sunday February 18, 2018 @01:48PM (#16407471)
Not all keyboards have a home key and the vast majority have a shift/g key, but yes, i agree.
Re:Vim Anywhere by ibotty on Monday February 19, 2018 @05:30AM (#16412008)
you don't use `)` or any other object motion? You should (consider)! `:help object-motions`
Re:Vim Anywhere by djsumdog on Saturday February 17, 2018 @02:02AM (#16399456)
I probably wouldn't use this either, but I can see how it can be helpful. If you do a lot of posts on Stackoverflow, you can get some markdown+code highlighting. People use to Vim can use all it's fancy searching and jumping to specific points of text. You can do regex replaces.

Basically if you want a powerful editor just in case when you're filling out a form or something else, here you go?

Re:Vim Anywhere by tempay on Saturday February 17, 2018 @01:59AM (#16399450)
I'm a sublime user but I find myself accidentally using keyboard shortcuts when doing things such as:

- Writing emails in gmail

- Replying to instant messages

- Writing answers on stack overflow

- Filling out web forms

This is mostly for multiple cursors which are now ingrained in how I type. I'll often copy text to sublime and then copy it back so having a automated way of doing this doesn't seem crazy to me anymore (it would have done 5 years ago).

Re:Vim Anywhere by gkya on Saturday February 17, 2018 @05:32AM (#16400064)
Some keybindings are ingrained. I use Quail and Electric quotes all the time in Emacs (modes which modify the letters you input), and I write lots of prose in Emacs, so using Ctrl-q <char> to "quote" a character to input it literally is something I frequently do. It happens that sometimes I do that out of muscle memory in Firefox, and Ctrl-q quits in Firefox. Or you press Ctrl-n for next line a couple times but you get some new blank windows instead. I confuse Ctrl-f and Ctrl-s all the time. Many other bindings are easily confusable.

I'd actually like Firefox to be customisable instead of a hack like this. I'll probably just switch to the Next browser [1] in the future though.

[1] https://github.com/nEXT-Browser/nEXT

Re:Vim Anywhere by danilocesar on Saturday February 17, 2018 @02:38AM (#16399561)
It makes a lot of sense for big pieces of text. Heavy vim users are super fast navigating trough text.

I can easily see the benefits of using this to write a long blog/fb post.

Re:Vim Anywhere by bo1024 on Saturday February 17, 2018 @08:18AM (#16400541)
The reason I don't see the benefit is that, if a piece of text is long enough that I prefer using vim over just typing in the text box, then I probably want to actually save a copy to disk in case clicking "submit" doesn't go through. So I might as well actually use vim at that point.
Re:Vim Anywhere by dozzie on Saturday February 17, 2018 @09:31AM (#16400797)
That's how it works (worked) with It's All Text! extension for Firefox: you set an editor (`gvim -f' in my case) and on a keybinding it's started with a file as its argument. Text area gets updated on write to the file.

Normally you don't need to see or worry about the intermediate files, but in case anything goes awry, you still have the option.

Re:Vim Anywhere by jacobmoe on Saturday February 17, 2018 @08:43AM (#16400623)
I'm looking forward to using this for writing JIRA tickets. Their text boxes override some mac key bindings that are deep in my muscle memory. Want move back a space? Oops, ctrl-b in this text box makes text bold. Jump to the start of the line, well ctrl-a now inserts a link. There's something just so annoying about that, it makes me bristle at using jira in general.
Re:Vim Anywhere by rasengan0 on Saturday February 17, 2018 @10:44PM (#16404329)
>... simply to input text into a text box ...

Vim (and other editors) offer powerful editing macros that ease bulk text operations. Simple things like text substitution across hundreds of lines save so much time. I still use https://github.com/docwhat/itsalltext running on https://www.waterfoxproject.org/ which allows textarea editing from the terminal.