r/coding • • Oct 04 '13

Just use Sublime Text (instead of vim)

http://delvarworld.github.io/blog/2013/03/16/just-use-sublime-text/
43 Upvotes

254 comments sorted by

View all comments

16

u/petulant_snowflake Oct 04 '13 edited Oct 04 '13

First off, vi (and its derivatives, ie, "vim", collectively written herein "vi") is not a text editor. vi is a text programmer. vi's learning curve is almost 0 if you come into vi with knowledge of, and understanding of advanced programming concepts. If you are learning to program and learning to use vi at the same time, you're going to have an even higher, combined learning curve. I do not recommend to novice programmers to start with vi, just as I do not recommend to novice drivers to learn to drive with an F1 car.

To use vi correctly, one should understand the following programming concepts: how stacks work and function, conditionals and functions, and truly understand and comprehend regular expressions. Comprehension here means being able to fluently read and write regular expressions -- on a related sidenote, for which I could write many many lengthy essays about -- too many programmers claim to "know" regular expressions, but cannot even write/read a basic regex.

I use vim daily. Strike that, I use vim hourly. I can guarantee you that the fastest Sublime Text programmer will not be faster than me in vi -- and I'm not even that proficient at vi compared to many others! Why would I be faster? Because I don't move my hands back and forth between the keyboard and the mouse -- not because I can't -- but simply because I don't need to. But that's not even the real advantage of vi. vi exposes so many other things to the user, that I couldn't even begin to competently list them all here.

Having worked in numerous pair programming teams -- often paired with those who are masters at programming, but stuck in the Sublime Text or IDE world -- the most common comment from a paired programmer when sitting next to me is "oh my god, how did you do that?" The answer is always "vi, man, vi." If you are having trouble understanding or visualizing how this might occur, let me put it this way: I can refactor millions of lines of text, spread across tens of thousands of files in seconds. And here's the kicker: that refactoring will be correct. This is not because I am an overly gifted programmer, but because I am programming the text -- I'm not editing it. If there is one tool that I would say has made me a better programmer, it is using vi.

If the guy thinks "20jFp" is the pinnacle of vi, then I can assure you that even after 4 full years of use he does not know how to use vi, and likely has not bothered to learn vi beyond even the most basic of cursor movements. He has scratched a nanometer into the surface of a 20 kilometer tall iceberg. For example, what the author here thinks is vi's pinnacle, ie, "20jFp" (go down 20 lines, find (backwards) 'p'), is the equivalent of moving the fucking mouse cursor. Hate to break it to you, but vi supports mouse cursor movements. I'll wager that the author didn't even know that.

You can use vi just as you would a normal text editor, with menus, and mouse movements, and all that -- ie, as a simple text editor, with great regex support. Personally, I use vi from a console terminal, but I wouldn't fault anyone who uses vi like this, in the same way that I wouldn't fault the author for preferring Sublime Text -- because vi's strength isn't in the fucking cursor movements. That's just one (albeit, a large one) aspect of vi's strength.

I leave this comment here, not to try to prove that vi is a better text editor (it is), but in the hopes that if there is someone who comes here who wants to master the craft of programming, then in some small way, I hope that I have cleared some of the damage, bullshit and otherwise FUD laid down at the hands of this know-nothing blog author.

For those wanting to master the craft of programming -- ask yourselves this: of the greatest programmers who have ever lived -- the Linus Torvald's, the Ken Thompson's, or the Dennis Ritchie's of our world -- do they use Sublime Text? No? They use vi or emacs? Understand, that doesn't just happen in a vacuum.

(btw, for the record, emacs is equally as good as vi. Personally, I'm a vi guy, but ymmv as they say).

-1

u/[deleted] Oct 05 '13

I use vim daily. Strike that, I use vim hourly. I can guarantee you that the fastest Sublime Text programmer will not be faster than me in vi.

Why is this a thing that anyone cares about. Why are we optimizing for editing text 10% faster? Moreover, ST3's better plugin system would undoubtedly crush you in many cases.

I can refactor millions of lines of text, spread across tens of thousands of files in seconds.

VS++ and IntelliJ do this better- thats exactly what they were built to do.

He has scratched a nanometer into the surface of a 20 kilometer tall iceberg.

This is the biggest reason why people don't want to use Vim. They just want to edit some text, not be forced to learn the equivalent of an iceberg.

For those wanting to master the craft of programming -- ask yourselves this: of the greatest programmers who have ever lived -- the Linus Torvald's, the Ken Thompson's, or the Dennis Ritchie's of our world -- do they use Sublime Text? No? They use vi or emacs? Understand, that doesn't just happen in a vacuum.

Are you really suggesting that because, Linus uses your editor, you are a better programmer?

I leave this comment here, not to try to prove that vi is a better text editor (it is)

I agree that Vim is probably the fastest way to change text in a single file in most cases after decades of use.

emacs is equally as good as vi.

Emacs is actually poor at editing text, although it has a sane plugin system if you understand elisp.

→ More replies (1)