News for hackers. Stuff that matters.
Re:Bram Moolenaar Discusses Developing Vim, How He Uses It, ... by greyman on Thursday December 22, 2016 @07:45AM (#13236890)
I don't know if I am too old or just think differently than vim enthusiasts, but I somehow couldn't bring myself to like vim. Of course that's might be since I can't find motivation to dig into it further. As a developer I use it almost daily when doing something on the server, like editing some config etc., but I somehow always prefer a software, where you do things intuitively without needing to first learn a shortcut for everything. I just prefer Visual Studio or Visual Studio Code from Microsoft when developing code, accepting that I must use mouse and the editing process might take slightly longer. Also, as awkward as it might sound, visually vim looks a bit ugly to me and I never could get fully over it. :-)
Re:Bram Moolenaar Discusses Developing Vim, How He Uses It, ... by executesorder66 on Thursday December 22, 2016 @08:13AM (#13237025)
> I don't know if I am too old or just think differently than vim enthusiasts

You make it sound like vim is a new thing. It's 25 years old. And vi is 40 years old. If you've been writing code for longer than that, then damn. I'm impressed.

> prefer a software, where you do things intuitively without needing to first learn a shortcut for everything.

Like what? ctrl + c or ctrl + v? I doubt anyone has every figured those out by themselves. They either read the documentation, or someone showed them. Or do you mean intuitive as in right click on selected text, and then click the copy option? to each their own, but I couldn't stand wasting that much time every time I want to copy or paste something.

> accepting that I must use mouse and the editing process might take slightly longer.

Kind of answers my previous question. But for me, it's not that using the mouse wastes an extra second here and there. But it breaks the constant flow of typing on the keyboard. I don't like that constant start/stop of switching between the keyboard and mouse. But you don't mind it, and that's fine. (I'm just explaining from my perspective, why people would prefer something like vim)

> visually vim looks a bit ugly to me

Everyone's tastes are different, but I don't understand this. It's just a cursor, the text you are working with, and a small bar at the bottom with some info. How is that ugly? I mean you can change the font to whatever you like.

Re:Bram Moolenaar Discusses Developing Vim, How He Uses It, ... by a3n on Thursday December 22, 2016 @12:28PM (#13238763)
> > prefer a software, where you do things intuitively without needing to first learn a shortcut for everything.

> Like what?

Like mouse-select, copy, paste. Once learned (however that happened, however long ago), it works across virtually all OS/gui combos (except gvim without knowing vim :), and you can immediately get something done. If you're dropped down into an environment, and have to get something done, using your slow but working general methods is pretty attractive, compared to having to learn a whole new way of merely copy/pasting before you've done a single thing.

Having used vi, and later vim, since the mid eighties, it can be painful for me to sit with someone as they mouse around cutting, copying and pasting. Watching someone reversing the order of two lines, or two characters, with a mouse is really frustrating. But they're getting something done, focusing on the task instead of the how, and beyond an offer to help them with vim if they like (they usually don't), I just sit there and accept.

I like my mouse, I'm just glad it's not all I have. But keep in mind, it's really frustrating for someone to have to listen to someone else telling them "you can do this a better way!". It's just meta distraction.

Re:Bram Moolenaar Discusses Developing Vim, How He Uses It, ... by pmoriarty on Thursday December 22, 2016 @08:11PM (#13242006)
Copy and paste? Reordering two lines or two characters?

If that's all that vim could do better than traditional editors, then sure, stick with the traditional editors. Learning the complexity of vim is not worth it.

But those are incredibly trivial examples. vim can do so much more than that, in a really efficient and powerful way.

It's like demanding why one should use a battleship when a tricycle can also turn left and right, and can go forward and backwards. Yes, both can do that, but the battleship does far, far more, and there are reasons for its complexity.

If all you need is a tricycle, stick with the tricycle by all means. It's much more intuitive than a battleship. But some of us need far, far more power than that.

Re:Bram Moolenaar Discusses Developing Vim, How He Uses It, ... by daxelrod on Friday December 23, 2016 @12:35PM (#13245972)
You can totally enable mouse selection if you like:

  set mouse=a
  set ttymouse=xterm2
You may have to enable your terminal's mouse support, if you're running Vim in a terminal.
Re:Bram Moolenaar Discusses Developing Vim, How He Uses It, ... by TeMPOraL on Thursday December 22, 2016 @08:41AM (#13237172)
> but I somehow always prefer a software, where you do things intuitively without needing to first learn a shortcut for everything.

As the quote goes, "The only "intuitive" interface is the nipple. After that it's all learned."

The word you're looking for is "different". Vim (and Emacs) have different shortcuts than what you're used to from Windows. That's because they're much older. Vi and Emacs actually predate those "intuitive" shortcuts of yours.

And like with many things our industry standardized on these days, just because it's popular, doesn't mean it's not utter shit.

Re:Bram Moolenaar Discusses Developing Vim, How He Uses It, ... by bxrxaxdx on Thursday December 22, 2016 @10:41AM (#13237949)
Everyone says that about nipples, but anyone whose had a kid knows that its not always easy for a baby to learn how to latch onto a nipple. It can take a day or two and all they while you are terrified your baby is going to starve.
Re:Bram Moolenaar Discusses Developing Vim, How He Uses It, ... by dorfsmay on Thursday December 22, 2016 @09:58AM (#13237599)
> "The only "intuitive" interface is the nipple. After that it's all learned."

I did not know this saying, thanks. This explains why I cannot work on a GUI without a track point!

Re:Bram Moolenaar Discusses Developing Vim, How He Uses It, ... by Tharkun on Thursday December 22, 2016 @10:48AM (#13238010)
I was thinking the same thing. The trackpoint is the only kind of pointer I enjoy using. Although at one point I had a keyboard with a built-in trackball, that wasn't too bad either.
Re:Bram Moolenaar Discusses Developing Vim, How He Uses It, ... by a3n on Thursday December 22, 2016 @12:32PM (#13238802)
I hate those things! I've never been able to get the desired effect, except almost by accident, just like everything else in life that looks like those things. Total mystery.
Re:Bram Moolenaar Discusses Developing Vim, How He Uses It, ... by TeMPOraL on Thursday December 22, 2016 @10:41PM (#13242654)
Like with everything worthwhile, it takes training :).

I used to scorn trackpoints until my friend told me he's very fond of them - that convinced me to give it a try. They're not bad. Play with one for 5 minutes (to the clock), and you'll be liking them more than touchpads :).

Re:Bram Moolenaar Discusses Developing Vim, How He Uses It, ... by JupiterMoon on Thursday December 22, 2016 @10:48AM (#13238013)
> As the quote goes, "The only "intuitive" interface is the nipple. After that it's all learned."

But many babies have trouble latching and the mother and baby need some assistance with the first few feeds - i.e. even nipples aren't totally intuitive.

Re:Bram Moolenaar Discusses Developing Vim, How He Uses It, ... by greyman on Thursday December 22, 2016 @10:25AM (#13237808)
> Vi and Emacs actually predate those "intuitive" shortcuts of yours.

Yes, but that is different, since in "normal" IDE, I dont need to use shortcuts for everything. In vim, you must learn how to select something, then how to copy it and how to paste it. In an IDE, I just select it with mouse, since in all other software I also select the exact same way, and shortcuts are only ctrl-c ctrl-v. Of course I also use other shortcuts, like F2 and ctrl-F2 for bookmarks, but normally I don't need them for everything.

Re:Bram Moolenaar Discusses Developing Vim, How He Uses It, ... by hxegon on Thursday December 22, 2016 @09:15AM (#13237339)
First off, there's a lot of good reasons to use V.S. OK, Now that that's out of the way...

The one thing I see people cite the most when they talk about not learning vim is "shortcuts". Vim's main editing interface is not "shortcuts". It's an editing language. There's a huge difference:

https://www.youtube.com/watch?v=ZdC2ysrP-XA

(not trying to flame or boast or anything, just trying to honestly communicate my feelings here, but) Anytime I use an editor that doesn't have a similar model, it feels like trying to carve wood with a coffee mug. If that simile sounds weird and doesn't make sense, that's how it feels.

The second argument I hear is plugin/ide functionality. You can get syntax highlighting, linting, VCS integration, anything from the shell, C-Tags, plugins, in vim but a lot of the refactor type IDE stuff isn't up to snuff. I have a theory about this. In a regular IDE, refactoring manually is a pain point. This means the auto-refactor tools are more polished in IDEs. I do as many refactors that could be automated as any other programmer, but its not a pain point because manually refactoring in vim takes only marginally more thought/input than automatically refactoring in an IDE.

Not saying that IDE refactoring isn't better (it is), but it isn't a big enough productivity improvement for me to fix that versus, say, refining my vim mappings, or practicing using the git plugin vs always using CLI git, or finally integrating the tmux plugin, etc.

Now... THAT said. The onboarding process for vim is pretty awful. You either start with an austere text editor and piece by piece build it into an amazing IDE/text editor, or you start with a premade blackbox config that you are unequiped to tweak.

Re:Bram Moolenaar Discusses Developing Vim, How He Uses It, ... by soperj on Thursday December 22, 2016 @01:16PM (#13239143)
Pretty sure that's not a simile.
Re:Bram Moolenaar Discusses Developing Vim, How He Uses It, ... by hxegon on Thursday December 22, 2016 @03:48PM (#13240262)
Analogy?
Re:Bram Moolenaar Discusses Developing Vim, How He Uses It, ... by owaislone on Thursday December 22, 2016 @09:58AM (#13237597)
IMO, the problem is that we've tried to use Vim as an IDE. Vim's power is modal editing and the composable grammar. I think Vim should be in competition with the text editor widget that sits inside VSCode, Atom, Xcode, Intellij or any other IDE instead of the IDE itself. Fortunately, with neovim this will be possible.

People can use IDEs of their choice but use real Vim for all text operations or just stick to vim like me :)

Re:Bram Moolenaar Discusses Developing Vim, How He Uses It, ... by tomku on Thursday December 22, 2016 @10:09AM (#13237677)
It was possible a long time ago (pre-VS 2003) to embed a real copy of gvim as an OLE widget inside Visual Studio. I'm looking forward to being able to do that in a less hacky way via neovim.
Re:Bram Moolenaar Discusses Developing Vim, How He Uses It, ... by rubenv on Thursday December 22, 2016 @08:00AM (#13236948)
> I somehow always prefer a software, where you do things intuitively without needing to first learn a shortcut for everything

That doesn't even apply for an IDE. As a vim user I always feel lost in those at first.

Any tool with a bit of power will require familiarization. You won't get the most out of that IDE unless you learn it.

Re:Bram Moolenaar Discusses Developing Vim, How He Uses It, ... by tokipin on Thursday December 22, 2016 @01:46PM (#13239364)
I'd argue Vim is actually the intuitive choice because its commands allow motion/editing across boundaries that make sense, without (in my opinion) awkward mouse/cursor motions. For example % at a function call will edit/select the whole call if the cursor is at the beginning of the function name.

Once you have the muscle memory, you use little thought on how to mechanically accomplish editing tasks, so the intent-to-accomplishment pathway is quite direct. In the end though this may not be the case for you, even if you earnestly dove into it.

I think the main difficulty with learning Vim is that its commands are like minimal "combinators" attached to arbitrary keys, and they take exploration/use to experientially bubble up these combinators to reach "comfort parity" with standard editors. In this way Vim is like the Lisp of editors.

About the ugliness, I agree. That's why I usually use a GUI version if I can. Plus it must be reiterated that Vim is more just a text editor, not an IDE like Visual Studio. If I could use VS+VsVim for everything, I would.

Re:Bram Moolenaar Discusses Developing Vim, How He Uses It, ... by pmoriarty on Thursday December 22, 2016 @08:45PM (#13242131)
"About the ugliness, I agree."

I understand how pleasant it is to use a tool that you spend a lot of time in day in and day out that is beautifully designed and just looks and feels nice. I remember slightly drooling at how some fonts in a competing editor seemed to have a subtle glow. I would have liked to have that in vim, and maybe it is possible. There are some other GUI improvements that could make it look/feel nicer.

However, as a power user give me function over form any day. It's like the choice between taking a long, beautiful path vs a short, ugly one. Or maybe the long beautiful path can't even go where the short ugly path goes.

Most of the time, I'm using my editor to get things done, and done as quickly and efficiently as possible. I'm not using it to admire how beautiful my editor looks or show its looks off to friends.

If I have a choice between getting my work done in 2 seconds vs 5 minutes, I'll choose the 2 seconds. There must have been hundreds of times in my life where I've done a really complex set of editing tasks in vim (or emacs) in a couple of minutes that I know would have taken me hours and driven me insane in a traditional editor.

After learning vim (and emacs) being forced to use a traditional editor is like cutting off my arms. It's like being forced to drive a car that can go only 5 miles an hour and only make 90 degree turns. Super painful and it may not even be capable of doing what you want, and certainly not quickly, efficiently, or pleasantly. Though certainly the more sophisticated traditional editors are far better than primitive traditional editors like notepad or nano (though some people still swear by those and will not even think of leaving them!).

It's really hard to get across to people only used to traditional editors the sheer power that vim and emacs have. It's something that you really have to be a veteran of these editors to fully appreciate -- and that usually takes years.

Re:Bram Moolenaar Discusses Developing Vim, How He Uses It, ... by ptero on Thursday December 22, 2016 @08:11AM (#13237012)
In terms of doing things intuitively -- I think (maybe incorrectly) that you mean seeing icons that you can click on to perform a certain action rather than the keyboard command that does the same. If so, that is easy to fix by adding buttons. The problem with this approach is that mouse-driven commands are almost never "mouse-only" -- you still need to move the hands back and forth between keyboard and the mouse (e.g., after you click "save as" you need to type the file name to save to) and this wastes quite a bit of time.

But people are different, some prefer it this way and some not. Even on the keyboard-driven side there is a clear divide between those who like single-mode interface of Emacs and those who love Vim and hate the pianist training of Emacs multi-finger actions.

Re:Bram Moolenaar Discusses Developing Vim, How He Uses It, ... by skuzye on Thursday December 22, 2016 @09:35AM (#13237453)
I've been using Emacs for years now but since I got introduced to PHPStorm I must say I won't ever use Emacs for PHP again. It's features are so addicting that I don't mind not having the shortcuts I'm used to.

I was never an IDE guy but PHPStorm is just too good, so much time saved.

Re:Bram Moolenaar Discusses Developing Vim, How He Uses It, ... by untoreh on Thursday December 22, 2016 @02:03PM (#13239495)
php in emacs is pretty lacking, I wanted to try the spacemacs layer with these additions https://github.com/syl20bnr/spacemacs/pull/3943/files but after using jetbrains ide for a while i am not really motivated :p, I wish they released an headless version to plug it in whatever editor like eclim does :(
Re:Bram Moolenaar Discusses Developing Vim, How He Uses It, ... by agumonkey on Thursday December 22, 2016 @08:03AM (#13236963)
It can vary with time and context. I had a long period where mangling text in high prowess was important to me. Because I was somehow in love with programs, and doing lots of things with my fingers felt good and worthy. Also because I was using Java, very verbose as everybody knows.

Some people will love Java and accept its verbosity, I cannot.

Now I found out about lisps, ml, or even ruby and suddenly verbosity decreased.. you need less text edition.

And even more than that, focusing on algorithms and conceptual structures makes you forget about editing, formatting, or even live check etc. You often think deep beforehand. Then type a few things, because the design is more balanced.

Re:Bram Moolenaar Discusses Developing Vim, How He Uses It, ... by weaksauce on Thursday December 22, 2016 @03:06PM (#13239946)
There are really good vim plugins for visual studio so it's not an either or proposition. Vim keybindings are simply a much faster way to edit code.

What's less intuitive? caw stands for change a word. This selects the word and deletes it leaving you in insert mode to type something new.

Or: ctrl left arrow, shift, ctrl right arrow, delete key.

cit stands for change inside tag (html tag) or ci" for change inside the double quotes. dit and di" work just the same and vim can be thought of as a language to work on text.

If you have a few min to spare to see why it's so powerful and not that hard to learn you can google "you don't grok vim" to get a good stackoverflow response on it.

Re:Bram Moolenaar Discusses Developing Vim, How He Uses It, ... by dominotw on Thursday December 22, 2016 @12:11PM (#13238634)
>where you do things intuitively without needing to first learn a shortcut for everything.

you can learn that intuition easily by learning 'vim language' , there are no shortcuts.

Re:Bram Moolenaar Discusses Developing Vim, How He Uses It, ... by neppo on Thursday December 22, 2016 @10:05AM (#13237651)
I use vsVim which is a vim plugin for visual studio, so I get the best of both worlds :)
Re:Bram Moolenaar Discusses Developing Vim, How He Uses It, ... by Slackwise on Thursday December 22, 2016 @10:21AM (#13237779)
Sadly, vsVim doesn't properly handle the undo history, so pressing `u` often ends up just deleting single characters instead of what was changed during an insert mode session.

ViEmu though, is fantastic.

Re:Bram Moolenaar Discusses Developing Vim, How He Uses It, ... by NegativeLatency on Thursday December 22, 2016 @10:39AM (#13237930)
Try the VSVim plugin, it's good software.
Re:Bram Moolenaar Discusses Developing Vim, How He Uses It, ... by proussea on Thursday December 22, 2016 @09:29AM (#13237420)
There is a vim plugin for VS ;)