News for hackers. Stuff that matters.
Re:VIM Destroys All Other Rails Editors by dylanz on Wednesday December 30, 2009 @11:32PM (#1023810)
Ugh. Not sure about you, but I think HN should be a IDE/Editor blog post restricted site.

There was recently a thread on erlang-general that was almost 100 replies long. It started out as "Is Erlang a Good First Language?"... then slowly dissolved into "IDE Bashing". I had to switch my mailing list options to digest I was getting so many emails each day with personal rants.

The thing is, Emacs and Vim are awesome, and they are "huge" programs. Also, they are "extremely" flexible, so one persons preferences might be way different than the others. For example, the blog post here uses MacVim and GVim? That's crazy talk (IMHO).

RTFM!

Re:VIM Destroys All Other Rails Editors by adam_lowe on Saturday January 02, 2010 @02:29PM (#1027542)
The reason MacVim and GVim were both mentioned was b/c the setup mentioned would work with either. Never messed with setting up Vim on Windows and wanted to be explicit as to not lead people down a painful path or to get troubleshooting requests.

The other intent was to show people how they could easily set up Vim as a robust Rails editor without needing to learn a ton about how to install Vim plugins which normally assume a strong understanding of Vim to install and get started with.

Re:VIM Destroys All Other Rails Editors by blasdel on Thursday December 31, 2009 @12:44AM (#1023907)
That's horrible! No one should ever have to use digest mode, especially since it makes the list even worse for everyone else. Maybe you should get a better email client? I know some people that use Gmail as a mailing list client independently from their normal mail.
Re:VIM Destroys All Other Rails Editors by jamesbritt on Thursday December 31, 2009 @03:09AM (#1024024)
"Maybe you should get a better email client? "

I hear Emacs is an E-mail client ...

Re:VIM Destroys All Other Rails Editors by jrockway on Thursday December 31, 2009 @08:05AM (#1024218)
And it manages mailing lists quite well.
Re:VIM Destroys All Other Rails Editors by stanley on Thursday December 31, 2009 @12:23AM (#1023885)
Poor article in the sense that it does little more than list out the plugins, rather than providing some commentary on how each plugin improves productivity.
Re:VIM Destroys All Other Rails Editors by samdk on Thursday December 31, 2009 @02:52AM (#1024017)
I was disappointed as well.

I do recommend the articles listed on the Rails wiki's 'Text Editors' page for Vim, though: http://wiki.rubyonrails.org/text-editors

(Listed here in case that page is changed: http://weblog.jamisbuck.org/2008/10/10/coming-home-to-vim, http://weblog.jamisbuck.org/2008/11/17/vim-follow-up, http://biodegradablegeek.com/2007/12/using-vim-as-a-complete...)

Re:VIM Destroys All Other Rails Editors by Semiapies on Wednesday December 30, 2009 @10:09PM (#1023734)
The headline is cheerful, ironic attention-grabbing; the writer acknowledges text editor choice is a preference, then lays out briefly how to set up vim for RoR development.
Re:VIM Destroys All Other Rails Editors by sjs on Thursday December 31, 2009 @12:34AM (#1023894)
I was hoping to see some awesome new features that we could use in other editors. Kind of a let down.
Re:VIM Destroys All Other Rails Editors by mailanay on Wednesday December 30, 2009 @11:27PM (#1023802)
No offence, but this comment sounds more like a one generated by a bot of some kind.
Re:VIM Destroys All Other Rails Editors by J_McQuade on Wednesday December 30, 2009 @11:45PM (#1023838)
I'd love to see the code for such a bot! Well, me and a thousand NLP researchers, I'm sure.

[edit] NLP being Natural Language Processing, rather than Neuro-Linguistic Programming ;)

Re:VIM Destroys All Other Rails Editors by mdemare on Thursday December 31, 2009 @12:39AM (#1023900)
Please tell me more about bots of this kind.
Re:VIM Destroys All Other Rails Editors by Semiapies on Thursday December 31, 2009 @11:42AM (#1024493)
shrug I almost didn't read the link because I halfway expected lame editor advocacy. There's a non-RTFAing comment or two already that assumes it is.
Re:VIM Destroys All Other Rails Editors by staunch on Thursday December 31, 2009 @01:50AM (#1023968)
More like JokeExplainer from Reddit.
Re:VIM Destroys All Other Rails Editors by grandalf on Thursday December 31, 2009 @12:01PM (#1024527)
Translation: The author uses a flame to bait people into reading his opinion.
Re:VIM Destroys All Other Rails Editors by rufugee on Thursday December 31, 2009 @10:29AM (#1024390)
The thing that always gets me when trying to use either vim and emacs for IDE-like programming (and don't get me wrong...I have used vim for regular editing for years), is that someone says, "yeah, (vim|emacs) destroys all other editors and IDEs. You just need to install this list of 400 plugins, write some elisp to configure it, learn each of these 200 keystrokes, understand where the plugins overlap and contradict, and you're golden".

Versus, download Eclipse/Netbeans, open, and start coding.

I want to use vim as an IDE...I just don't have the time.

Re:VIM Destroys All Other Rails Editors by Semiapies on Thursday December 31, 2009 @11:45AM (#1024500)
When I tried Eclipse, I found it as foreign as emacs, just GUIer. IDEs and editors require learning and configuration once you get much past notepad or pico.
Re:VIM Destroys All Other Rails Editors by makecheck on Thursday December 31, 2009 @12:10PM (#1024544)
It sounds like the challenge is similar to that of a Linux distribution: where it's not just a matter of "installing Linux", but choosing one that has most of what you want already.

Perhaps there's a need to have "vim distributions" and "emacs distributions" that come pre-installed and preconfigured according to certain needs, such as this one.

Re:VIM Destroys All Other Rails Editors by 10ren on Wednesday December 30, 2009 @11:02PM (#1023781)
I too use tabstop=2

But `cat` uglifies it, so I added this to ~/.bashrc:

    alias tab='sed "s/\t/  /g" '
You needn't say "cat myfile | tab"; you can just use it exactly like cat: "tab myfile" (I'm not saying that you'd not instantly realize that - but that I didn't).
Re:VIM Destroys All Other Rails Editors by xiaomai on Wednesday December 30, 2009 @11:12PM (#1023788)
unless you prefer tabs, you can add:

set expandtab

to your .vimrc and then vim will magically insert spaces (according to your tabstop/shiftwidth) instead of real tabs.

:retab will turn all tabs into spaces for a file that already has tabs in it.

Re:VIM Destroys All Other Rails Editors by 10ren on Thursday December 31, 2009 @03:34AM (#1024043)
thanks! "Vim contains every features you could possibly imagine, and then some. Even when taking this law into account" - 10ren's Law
Re:VIM Destroys All Other Rails Editors by barrkel on Wednesday December 30, 2009 @11:51PM (#1023850)
I generally use something like:

    expand -t "$tabWidth" "${files[@]}" | nl -b a | fold -s -w 108 | $PAGER
when I want to view files that use tabs; this is the final one-liner in a script I call 'view'. It gives me tabs expanded to width I specify (defaults 4), numbered lines, and long lines wrapped at word breaks but such that they don't break line numbering.
Re:VIM Destroys All Other Rails Editors by blasdel on Thursday December 31, 2009 @12:54AM (#1023914)
You needn't ever say "cat myfile | ..." period!

The shell has stdin redirection built in via '<'

Re:VIM Destroys All Other Rails Editors by jrockway on Thursday December 31, 2009 @08:06AM (#1024220)
Unless you want to read your pipeline from left to right, like everything else you read.
Re:VIM Destroys All Other Rails Editors by blasdel on Thursday December 31, 2009 @12:39PM (#1024591)
What if you want the subject on the right, like all non-pipeline commands you read?

  foo myfile
  bar < myfile
  (bar | baz) < myfile
Re:VIM Destroys All Other Rails Editors by throw_away on Thursday December 31, 2009 @06:19PM (#1025175)
you can also say

  $ < file executable
Re:VIM Destroys All Other Rails Editors by TomasSedovic on Thursday December 31, 2009 @03:54AM (#1024054)
What happened to TIMTOWTDI? :-)
Re:VIM Destroys All Other Rails Editors by lallysingh on Thursday December 31, 2009 @06:18AM (#1024139)
What's TIMTOW? And why would you want a turbo diesel, fuel injected version of it?
Re:VIM Destroys All Other Rails Editors by steveklabnik on Thursday December 31, 2009 @09:03AM (#1024276)
"There's More Than One Way To Do It" is a Perl philosophy.
Re:VIM Destroys All Other Rails Editors by adam_lowe on Saturday January 02, 2010 @02:15PM (#1027525)
The main reason for the post was that at Hashrocket we benefit from real-time streaming Vim plugins courtesy of Tim Pope and wanted to share how awesome it can be as a Rails editor. I plan to follow up with more on the individual plugins themselves. It would've been a small novel to try and cover each of the plugins themselves in any detail. Most have a solid README on the project page for starters.
Re:VIM Destroys All Other Rails Editors by gruntruk on Thursday December 31, 2009 @07:04AM (#1024172)
I thought the article was worth while if only for pointing me at various plugins I wasn't aware of. If you're a vim hardcore then this is probably nothing new... but for others who are not it seemed useful. I agree that having some more info on why these plugins are useful would be nice, but following the links was easy enough to see if the plugin was interesting.
Re:VIM Destroys All Other Rails Editors by timmorgan on Wednesday December 30, 2009 @11:22PM (#1023797)
I expected to see a bit more of how to use all those plugins. But I suppose a list of them is better than nothing.
Re:VIM Destroys All Other Rails Editors by graywh on Wednesday December 30, 2009 @10:41PM (#1023760)
+ for mentioning all tpope's plugins/bundles.

- for some poor suggestions.

Re:VIM Destroys All Other Rails Editors by gry on Wednesday December 30, 2009 @10:52PM (#1023769)
Pray tell, what are your suggestions and criticisms? A friend of mine after a horrible computer bitswap, bit into vim after TextMate. I wanted to follow, just to learn. This is actually fantastic for me -- there are various . configs I knew nothing of, but now can grep/google for info.

Please advise.

Re:VIM Destroys All Other Rails Editors by graywh on Thursday December 31, 2009 @05:39PM (#1025121)
He had some things incorrect that have been mostly fixed now. Don't worry too much about it.

FYI, I suggest leaving tabstop=8 if you indent with spaces like a good boy.

Re:VIM Destroys All Other Rails Editors by adam_lowe on Saturday January 02, 2010 @02:09PM (#1027522)
Thanks for the good feedback to the post. I responded to the latest feedback from you and discussed with the Pope.
Re:VIM Destroys All Other Rails Editors by bprater on Wednesday December 30, 2009 @10:15PM (#1023739)
Cream is a good VIM editor on Windows.
Re:VIM Destroys All Other Rails Editors by Dobbs on Thursday December 31, 2009 @01:26AM (#1023942)
I never seemed to understand cream.

The idea is to take vim and basically castrate it by getting rid of the standard keybindings and ways of doing things to make it 'easier' for non-vim users. It even appears they got rid of modal-editing.

The issue with this then they don't learn how to do things the vim way which defeats the purpose of using vim, just go use notepad++ or any other gui editor you get the same experience.

Re:VIM Destroys All Other Rails Editors by bmj on Thursday December 31, 2009 @09:21AM (#1024298)
Agreed. You can go into "expert" mode and use it with the normal vim bindings, though. Used in this manner, it does provide a bit of a better introduction to vim, as you learn the various modes and keybindings, but still get a reasonable UI for configuration and whatnot.
Re:VIM Destroys All Other Rails Editors by jamesbritt on Wednesday December 30, 2009 @11:00PM (#1023775)
I tried cream for a bit, and decided that I would be much better off juts learning to use vim qua vi, rather than trying to make it more like the typical win32 editor.
Re:VIM Destroys All Other Rails Editors by brianherman on Wednesday December 30, 2009 @10:45PM (#1023763)
VIM DESTROYS ALL EDITORS PERIOD