News for hackers. Stuff that matters.
Re:Vim 7.4 is released by gaving on Saturday August 10, 2013 @03:37PM (#6192360)
I love vim, but:-

http://www.vim.org/

http://www.sublimetext.com/

Which one would you want to use?

Re:Vim 7.4 is released by dsrguru on Sunday August 11, 2013 @12:35AM (#6193847)
Without a question, the one with text objects. Productivity is far greater with vim. Actually to be fair, Sublime's vim emulation mode implements a few text objects, but the proprietary source means no adding our own.
Re:Vim 7.4 is released by venus on Sunday August 11, 2013 @01:29AM (#6193967)
> Productivity is far greater with vim

I don't agree with that at all. Vim is useful, perhaps, for a few text matching tricks but typing speed is rarely the bottleneck in programming. It's optimising for the wrong thing.

The only people advocating for vim are those who have already gone through the pointless pain of 5 years learning to use the thing. It's basically a cult, or at least a club. And frankly, watching these vim "power users" is usually quite frustrating - they struggle to do trivial tasks which can be accomplished in sublime with a simple right mouse click.

It is important to know the basic vim commands for when you are editing text via ssh but for everyday use sublime text is, IMO, superior in every way.

Re:Vim 7.4 is released by dsrguru on Sunday August 11, 2013 @03:52PM (#6196067)
It takes several days, not 5 years, to train your muscle memory to the point where the vim editing model is much faster for raw edits than the default editor in Sublime [1].

> typing speed is rarely the bottleneck in programming

You're right, especially if you're using a language that doesn't require a lot of boilerplate. But between the UNIX shell and the normal vim add-ons, even higher-level editing tasks, i.e. those that aren't strictly about raw editing, shouldn't give vim users trouble.

As with negatmx, I'm convinced you haven't met people who use vim properly. Name a task on which you've either seen or you'd imagine a ST user to outperform a vim "power user". I'll let you know the logical way to do it in vim.

[1] To obtain solid proficiency with the vim editing model, just work through the interactive vimtutor, read up on text objects, and spend a couple hours acclimating yourself to using the following motions and commands in place of hjkl (sort of but not necessarily in order of usefullness):

/ ? n N f F t T # *

gg G <n>G (e.g. 42G)

H M L

^ 0 $ { } ( ) w W b B e E

C-f C-b C-d C-u

zt zz zb

Re:Vim 7.4 is released by venus on Tuesday August 13, 2013 @08:40AM (#6205294)
> Name a task on which you've either seen or you'd imagine a ST user to outperform a vim "power user". I'll let you know the logical way to do it in vim.

Selecting code and copy and pasting it into a chat client for discussion.

Grabbing someone else's code from a chat client and editing it, then copy and pasting it back to show them my interpretation.

Copying an error message and pasting it into a web browser.

Installing or updating any kind of plugin or package.

Doing anything out of the ordinary (vim users will be googling for the arcane sequence of commands and don't try the "no true scotsman" defence for that - they all do)

Scrolling smoothly through a large file looking for a certain method you will know by shape.

Quickly navigating a tree of files at the side of the window.

Changing the font to something post-1980.

Make it look good (this willl take infinite time)

I could go on, and on, and on.

Anyway, I have no doubt that for some tasks it's possible to train yourself to be very fast in vim, and if you find that measurably speeds up some aspect of your productivity you care about, then more power to you. However, I haven't really observed this being the case.

It's sort of like Linux vs MacOSX on the desktop. Linux people can and do customise their machines to an amazing extent, all sorts of crazy window managers and weird shell extensions, all promising great improvements in window management and shell completion, etc. But at the end of the day, I don't notice linux-using programmers as being any more productive, as a rule, than mac users, who tend to not fetishize the tool so much and just want to get on with the job. If anything, it's the opposite. I admit I'm biased against vim because of how ugly it is, which is sort of why the linux vs mac analogy works for me. I love linux by the way and use it on the server, and I also edit on the server with vim : P

Anyway, I'm making much bigger a deal about the matter in this thread than I actually feel! I just don't think vim is a slam dunk, is all.

Re:Vim 7.4 is released by dsrguru on Thursday August 15, 2013 @04:43PM (#6220466)
> Selecting code and copy and pasting it into a chat client for discussion.

Note, due to HN's treatment of asterisks as formatting characters, I'm going to represent a literal asterisk as [asterisk].

In gvim, selecting code to copy into the system clipboard is as easy as "[asterisk]y plus the motion or text object (e.g. `"[asterisk]y3}' for the next three paragraphs or `"[asterisk]yat' for the current HTML/XML tag). You can even configure console vim to copy into the X clipboard: http://vim.wikia.com/wiki/Accessing_the_system_clipboard

> Grabbing someone else's code from a chat client and editing it, then copy and pasting it back to show them my interpretation.

I run vim and irssi from inside GNU screen, so it's as simple as `C-o [' (my screen prefix is `C-o') to access the scrollback buffer, spacebar to start selection, use screen's vim-like selection commands, spacebar again to yank the selection, switch screens, and then `C-o ]' to paste. The whole process is instinctive and takes no more than five seconds.

> Copying an error message and pasting it into a web browser.

See the above two answers.

> Installing or updating any kind of plugin or package.

The vundle package manager takes care of that.

> Doing anything out of the ordinary (vim users will be googling for the arcane sequence of commands and don't try the "no true scotsman" defence for that - they all do)

No, they'd most likely use some combination of the brilliantly orthogonal editing language that is Vim and the brilliantly orthogonal computing environment that is UNIX to reach a solution in time that would amaze a Windows user. In fairness, most Sublime users I know would do the same.

> Scrolling smoothly through a large file looking for a certain method you will know by shape.

How would Vim and Sublime differ on this one?

> Quickly navigating a tree of files at the side of the window.

Vim users do the same. It's called the NERD tree plugin. I personally find it faster to navigate with autojump from the command-line and then open files in vim from the command-line, but many Vim users like the tree approach.

> Changing the font to something post-1980.

You add a line to your ~/.Xdefaults or ~/.Xresources for console vim or to ~/.gvimrc for gvim. It's no harder than changing fonts in Sublime. I personally like 14-pt Bitstream Vera Sans Mono. It looks similar to Sublime's default iirc.

> Make it look good (this willl take infinite time)

I don't know if by "it" you mean the font or the colorscheme, but as with Sublime, some fonts and colorschemes are really nice and some aren't. It sounds like your criticism here, as with virtually all of your points, is that vim's default settings, unlike Sublime's, are not optimized for use as an IDE. That is correct. However, instead of bashing vim for this use case with uninformed, antagonistic statements like making it look good will take infinite time, all you have to do is ask or google how to configure vim for such a use case. A lot of vim plugin writers are ex-Sublime users, so it should be pretty easy to make vim simulate the default Sublime feature set, if you really wanted to. If you're more comfortable with Sublime, it makes total sense to stick with it. Perhaps Sublime Text's greatest strength is that its default configuration is excellent for software development. As you pointed out, typing isn't normally the bulk of development time, so if you're already happy with an editor, you really don't need to switch to a faster one. Just don't tell others who do use one that's said to be faster that you, someone who has only used their editor in a console/ssh capacity (and from the sound of it, a casual capacity at that), knows their editor's shortcomings for development better than they do.

> It's sort of like Linux vs MacOSX on the desktop. Linux people can and do customise their machines to an amazing extent, all sorts of crazy window managers and weird shell extensions, all promising great improvements in window management and shell completion, etc. But at the end of the day, I don't notice linux-using programmers as being any more productive, as a rule, than mac users, who tend to not fetishize the tool so much and just want to get on with the job.

I know quite a few Mac OS X users who care very much about their programming environment/toolset, and I do think they're more productive than those who don't.

> I admit I'm biased against vim because of how ugly it is

But it's not! If you're running it on ssh and if your console font is ugly, then yes, it will be ugly. But that's like saying that ST is ugly if you set it to use whatever ugly font your shell is set to. Vim is configurable, and a sane vim/gvim set-up looks clean and beautiful. Since you're a Linux server user, you should know the power of configuration!

Re:Vim 7.4 is released by nXqd on Sunday August 11, 2013 @04:49PM (#6196270)
+1. So true, Vim just cannot be beat.

If you want to meet the real vim hacker, try to do some task in vimgolf.com. We will see ;)

Re:Vim 7.4 is released by negatmx on Sunday August 11, 2013 @04:09AM (#6194283)
I'm curious... What trivial tasks are vim power users struggling with?
Re:Vim 7.4 is released by chris_wot on Sunday August 11, 2013 @04:44AM (#6194362)
None. He's talking out of his hat!
Re:Vim 7.4 is released by venus on Tuesday August 13, 2013 @08:07AM (#6205186)
Expose the current file in the side bar so you get a picture of its location in the dir tree? Install a package? Change the window size?

I'm not talking out my hat at all. I notice no productivity improvements from using vim. Maybe some appear in different lines of work, but I'm not saying it just to annoy you.

I don't notice Gentoo users being all that much more productive than Ubuntu users, either. It's basically a hobby to endlessly tweak your environment, and so is vim, IMO.

Re:Vim 7.4 is released by negatmx on Sunday August 18, 2013 @05:35PM (#6234335)
1.-NERDTreeFind (Have it mapped to ,nf)

2.-Adding the package name to a file and typing BundleInstall

3.-Basic window management... (Have it mapped to Alt+hjkl)

I know how to do all of these very easily from first week of serious usage. I'm using vim for less than a year and wouldn't call myself a "vim power user".

I think it's a little bit adventurous to judge an editor that popular for that long time based on seemingly (seeing the use cases you said) limited personal experience.

Re:Vim 7.4 is released by dsrguru on Tuesday August 20, 2013 @03:22PM (#6245956)
Yup, see my reply to venus's more lengthy set of concerns. Oh well, I hope venus learns the Truth some day. ;)
Re:Vim 7.4 is released by chris_wot on Tuesday August 13, 2013 @11:18AM (#6206233)
You don't notice any improvements... Great! But don't equate your lack of understanding with the fact that plenty of people are extremely productive with vim, and can do quite extraordinary things with it!
Re:Vim 7.4 is released by venus on Wednesday August 14, 2013 @03:12AM (#6210253)
Plenty of people are extremely productive using any number of tools. I like to think I am a rather productive programmer myself, despite my general dislike of vim.

However, in the general case, I don't think it is much of an advantage in and of itself, which is why I disagreed with the poster above matter-of-fact stating:

> Productivity is far greater with vim

as if that was an indisputable fact. It is not. That was the thrust of my argument.

And regardless of typing prowess, knowledge of sound, elegant design is the essence of good programming. How fast you can edit text is almost irrelevant in the long term. I know excellent programmers who basically type with two fingers, and shitty copy and paste hack programmers who do their damage at an amazing rate with vim. The two-finger typists make more than the vim wizards, and for good reason. Don't confuse the tools with the craft itself.

Re:Vim 7.4 is released by chris_wot on Wednesday August 14, 2013 @08:49AM (#6211160)
In that case I apologise, I didn't understand what you were saying. Ironically, I totally agree with you! Sorry about that.
Re:Vim 7.4 is released by venus on Thursday August 15, 2013 @05:55AM (#6216937)
No worries, glad we agree :)
Re:Vim 7.4 is released by sigzero on Sunday August 11, 2013 @01:35PM (#6195518)
How is ST at working on Solaris in a terminal?
Re:Vim 7.4 is released by venus on Tuesday August 13, 2013 @08:48AM (#6205335)
I wouldn't know, thank god.
Re:Vim 7.4 is released by zmmmmm on Saturday August 10, 2013 @10:31PM (#6193580)
The one that is installed by default for free on every computer I ever use (except Windows, where it gets installed 5 mins after I start using it).

For me, given that Vim is easily powerful enough to compete with any other editor, the benefits of ubiquity override anything else.

Re:Vim 7.4 is released by chris_wot on Sunday August 11, 2013 @04:47AM (#6194368)
The one that you can modify the source and provide patches to, and that you can run in a terminal. And that doesn't cost anything.
Re:Vim 7.4 is released by sigzero on Saturday August 10, 2013 @07:02PM (#6193002)
Vim and its siblings have been around for YEARS and I can install it everywhere I work.
Re:Vim 7.4 is released by jlgreco on Sunday August 11, 2013 @01:43AM (#6194001)
The one that is future proof. I go to large lengths to only rely on software that is future proof, and a text editor is something that I naturally come to rely on.
Re:Vim 7.4 is released by noir_lord on Saturday August 10, 2013 @05:12PM (#6192686)
Neither.

I use an IDE for code, FocusWriter for just about everything else involving text and nano for server work (I'm can use vim if needed but I prefer nano for quick config file edits and after using it for a decade muscle memory isn't worth fighting).

Re:Vim 7.4 is released by pearjuice on Saturday August 10, 2013 @03:41PM (#6192376)
The one offering the best product. Or are you saying you are judging by appearance?
Re:Vim 7.4 is released by michaelbarton on Saturday August 10, 2013 @04:00PM (#6192438)
I think it's a fair point, judging by appearances may be instinctual if not conscious. The current git website (http://git-scm.com/) looks the way it does because of an effort to replace the old one (http://web.archive.org/web/20120101013850/http://git-scm.com... and https://github.com/blog/1125-new-git-homepage).
Re:Vim 7.4 is released by Watabou on Saturday August 10, 2013 @08:25PM (#6193209)
You know, I actually like the old git website. It's less cluttered and looks cleaner. Maybe it's just me? The new git website does look modern but with all the logos and unneeded images, it's sort of disorienting.
Re:Vim 7.4 is released by ics on Saturday August 10, 2013 @09:47PM (#6193446)
I completely agree. It's polished, but by no means "homely" if you know what I mean. Usually when I have a question about git I end up on StackOverflow, but once in a while I click a link to git-scm.com and about halfway through finding my answer I start wondering to myself where the "Buy Now" button is.
Re:Vim 7.4 is released by tiziano88 on Saturday August 10, 2013 @04:23PM (#6192535)
The one that is pre-installed pretty much everywhere and can run in a terminal
Re:Vim 7.4 is released by farslan on Saturday August 10, 2013 @04:24PM (#6192542)
Look at my project subvim: https://github.com/fatih/subvim It's sublime features include into vim. Give it a try and maybe you'll like it :)
Re:Vim 7.4 is released by digipaper on Saturday August 10, 2013 @03:49PM (#6192405)
The free one?
Re:Vim 7.4 is released by pkj on Sunday August 11, 2013 @02:20PM (#6195645)
Have been a vi user for a long time. For c/c++ it is awesome and good enough. Sublime is fine too. Surprised no one mentioned Source Insight though ( unfortunately only windows ), was used in pretty big projects I was involved in. Speedy with auto-completion, caller/callee functions, beautiful syntax highlighting etc..

For large web programs ( html/js etc), once you use Sublime, no going back to VI. The plugin ecosystem for js fwks are awesome.

Re:Vim 7.4 is released by ceol on Saturday August 10, 2013 @10:20PM (#6193551)
The one that doesn't require months of training to get at a productive level.

/ducks

All editor-fanboyism aside, who cares? I spent $59 on ST2 and it was, by far, the best $59 I've ever spent. But if someone is more comfortable with vim or emacs or nano or gedit, I don't care. It doesn't bother me, as long as you're making something.

Re:Vim 7.4 is released by briancurtin on Saturday August 10, 2013 @06:39PM (#6192936)
Vim.
Re:Vim 7.4 is released by Watabou on Saturday August 10, 2013 @06:44PM (#6192950)
The one that saves me $70.
Re:Vim 7.4 is released by elithrar on Saturday August 10, 2013 @08:53PM (#6193276)
Both.

I adore Sublime Text, and use it where I can, but there are instances where I need to work on something remotely. Bug fixes, git rebasing, etc; and that's where I lean on Vim.

Re:Vim 7.4 is released by rhizome31 on Sunday August 11, 2013 @06:26AM (#6194614)
I love that picture on the Vim homepage.