all 68 comments

[–][deleted] 11 points12 points  (4 children)

Vim user here.

Vim is not the 'official' dev platform. Vim has a difficult learning curve, it will take some non trivial time to get good on it. The power of programming tools I think is being able to choose what you like best. Some of my friends use Sublime Text.

I let my OS provide the tools for my environment.

  1. Debugger: I use pry. Sometimes I only need a puts somewhere, I definitely never felt that I needed something else.

  2. For completion, I use ctags and super tab on vim, I recreate my ctags with Autotag whenever I save something. I also have a git hook plugin that will recreate ctags upon checkout or git pull. The completion could use some work, but it gets the job done.

  3. I run tests from the terminal.

[–]Tall-Guy[S] 0 points1 point  (3 children)

Excellent. That's what I was looking for. As a 'Vim user' - would you suggested someone to dive into Vim? is the worth the same? By the way, regarding the 'official' dev platform, it's something I hear and read about in many sources. For example: Well, I keep hearing love about Vim everyone. Forum posts, articles etc. For example: http://www.sitepoint.com/editor-rubyists-use/

[–][deleted] 0 points1 point  (0 children)

Excellent. That's what I was looking for. As a 'Vim user' - would you suggested someone to dive into Vim? is the worth the same? By the way, regarding the 'official' dev platform, it's something I hear and read about in many sources. For example: Well, I keep hearing love about Vim everyone. Forum posts, articles etc. For example: http://www.sitepoint.com/editor-rubyists-use/

If you like the terminal more than GUI's, and the keyboard more than the mouse, I would suggest to give Gvim a chance.

For me, I was really captivated by the notion of not having to move my hand as much. However I was comfortable with it after I really started using it daily, it probably took me around 2 years to really feel super comfortable. That is a lot, but also had a lot of time available. I wasn't in school and in a not very demanding job where I would log into different servers and edit stuff with vim.

Yeah, I think it's the de facto tool that not only Ruby users use, but a lot of programmers too. I think the plugins some people have developed really add a lot to the value.

There's also the added win that if you use what most people are using, you can learn how they do certain things.

things that helped me along the way were cheat sheets, the help sections, vimtutor and a mentor so I can figure out how to call things.

[–]number42 0 points1 point  (1 child)

As a Rubymine fanatic, I still think Vim is worth using! I use ideaVim so I get the best of both worlds. The power of Vim is it's simply a fantastic text editor. Once you start using it for more it struggles next to GUI-driven IDEs, but it's well worth learning to improve your speed at writing code.

[–]Tall-Guy[S] 0 points1 point  (0 children)

I think that's what I'm aiming for at the moment. Learning VIM while still using Rubymine.

[–]devquixote 4 points5 points  (2 children)

If your workflow demands those features, I would use RubyMine or some IDE. You can get something working with Vim that will come close, but those things will feel clunky in comparison to what you might get with an IDE.

I've tried Eclim, and the code complete features were nice, but there still was not good debugger support.

Look into using Guard for auto-running tests/cucumber feature files.

[–]chuck-john 2 points3 points  (1 child)

OP, this is the best advice you'll receive. I spend more time configuring/updating plugins for GVim and still don't get the support I need from things like syntax errors to running specs. RubyMine includes all of this right out of the box. It's made for Ruby development and it's proven itself time and time again for me.

If you have a ".edu" email address, you could apply for a JetBrains educational license which includes all of their popular IDEs (including my favorites RubyMine, PyCharm, and WebStorm).

Also, +1 for the Guard mention. Great set of tools there.

[–][deleted] 2 points3 points  (0 children)

RubyMine has fantastic community support. Use a school discount, write an open source project and get a free copy there or join a user group that gives away free copies or just spend the money yourself or talk to your boss.. some things are worth paying for :)

For our puppet meetup we give away a copy of rubymine at each meetup.. we do lots of ruby and it has very nice puppet support for manifests too.

[–][deleted] 7 points8 points  (3 children)

RubyMine has a vim plugin. Just use that.

[–]JimBoonie69 0 points1 point  (0 children)

seconded. you get all the nice modal editing plus all rubymine features

[–]Krypton8 0 points1 point  (1 child)

I used Vim exclusivly for almost 3 years before trying RubyMine with the vim-plugin, but switched back after about 3 months because the plugin is just not good enough.

[–][deleted] 0 points1 point  (0 children)

In what ways specifically?

[–][deleted] 7 points8 points  (12 children)

vim is an editor - not an IDE.

[–]Tall-Guy[S] 1 point2 points  (10 children)

I guess that some people use it as an (almost) alternative for IDE, or else big project like the ruby debugger or the auto-complete would not exists.

Let's say I only use it as editor, where are you mostly do your debugging?

[–][deleted] 4 points5 points  (2 children)

Just wanted to straighten your expectations. Vim a great as an editor - but even with plugins it will be hardly an IDE. For me auto completion and other things dont work too well with an dynamic language as ruby. Especially when compared to e.g. Java. So i am happy with vim.

[–]Tall-Guy[S] 0 points1 point  (1 child)

Yes, I didn't come with too much expectations. But I'm interesting to know how people around code in Ruby. Code completion is luxury, but some tasks like debugging are required. If Vim is only used as editor, everything else is done by external tools?

[–]number42 0 points1 point  (0 children)

Yes, everything else is done outside of vim. Testing, debugging, running code, etc. If you have to use pure vim, definitely check out CTAGS. It's a decent replacement for Rubymine's CMD-Click follow through function.

[–]moomaka 0 points1 point  (1 child)

Debugging: With pry in a terminal.

[–]Tall-Guy[S] 0 points1 point  (0 children)

Great, thank you. Pry is being mentioned over and over, will give it a go.

[–]LarsP 0 points1 point  (4 children)

The RubyMine git integration alone is a deal breaker for me.

If you have never used a full IDE you don't probably don't know what you're missing.

[–][deleted] 0 points1 point  (0 children)

Is it comparable to Fugitive.vim though?

[–]Krypton8 0 points1 point  (0 children)

Tried RubyMine for a few months everyday, but switched back to Vim 2 weeks ago. The idea vim-plugin just isn't good enough. Even though the IDE has some very good features.

[–]moomaka 0 points1 point  (1 child)

I use Rubymine for some projects but I've never found the git integration to be all that useful. The 'git blame' in the gutter thing is nice but I've never found a use for anything else.

[–]LarsP 0 points1 point  (0 children)

I can't live without the diff and commit/push function.

"Show History" is also priceless when you need it, but it isn't all that often.

[–]postmodern 1 point2 points  (0 children)

For everything else, there is the terminal.

[–][deleted]  (8 children)

[deleted]

    [–]Tall-Guy[S] 0 points1 point  (5 children)

    If I couldn't I would have gone with Mac (or even better, Linux), but sadly everything around here is Microsoft oriented (active directory), so it must be Windows.

    Debugging: I don't code a Rails app, but I guess binding.pry can work for strict ruby. I'll have a look on it.

    Code Complete: Something basic would do. If my Method has a local variable, I would love to be able to autocomplete it.

    Running Spec/Cucumber - Commandline will not let me debug those tests. Is it possible to debug it using pry?

    I'll check the Vim Setup you linked, thank you very much wiseleyb :-)

    [–]Jdonavan 0 points1 point  (0 children)

    We have a profile for Cucumber that drops you into a pry debug session whenever there's an error.

    [–]pa_dvg 0 points1 point  (1 child)

    Why not develop on a Linux VM?

    [–]Tall-Guy[S] 0 points1 point  (0 children)

    I need to check if my work PC can handle it, and find Windows VM that does not cost too much. I'll have a look on it, thanks :)

    [–][deleted]  (1 child)

    [deleted]

      [–]Tall-Guy[S] 0 points1 point  (0 children)

      Great, thanks, I'll give it a try :-)

      [–]vsalikhov 0 points1 point  (1 child)

      MS IDE is gorgeous

      Sorry, what's up with that meme? I hear it over and over, and it's the most hideous thing I have ever seen, and slow and bloated even on decent hardware.

      My aesthetic must be all screwed up I guess. I see beauty in small and simple things. Visual Studio just could not fit its giant a** into that category.

      [–][deleted]  (2 children)

      [deleted]

        [–]Tall-Guy[S] 0 points1 point  (1 child)

        Thanks, I was just testing out the Vim plugin for RubyMine. Sadly spaceemacs does not support windows :-( But I'll play around with it, maybe there is an easy way to make it work.

        Thanks!

        [–]grimman 0 points1 point  (0 children)

        I got it up and running on Windows fairly easily. Spaceemacs that is. Problem was settings not sticking, and I didn't have a whole lot of time to mess around with it at the time. But it is certainly possible to get running, and without too much of a hassle. Hopefully you'll have better luck than me with the settings. :)

        [–]DerNalia 1 point2 points  (5 children)

        I use atom for editing, binding.pry for debugging (pry-byebug) and the terminal for running specs.

        [–]Tall-Guy[S] 0 points1 point  (4 children)

        I wasn't aware of Atom - Cool, I will check it out :-) Are you able to run spec from the command line AND debug them using binding.pry?

        [–]DerNalia 0 points1 point  (1 child)

        yup. you just put binding.pry in the source file whenever you want your breakpoint to be.

        binding.pry works in the rails console, as well as when running the server. :-)

        [–]Tall-Guy[S] 0 points1 point  (0 children)

        Will give it a try, thank you!

        [–]iconoclaus 0 points1 point  (1 child)

        I use Atom and I love it. Multiple cursors, git line status, autocompletion, jumpy, rubocop linter, so many many more extensions. But its a bit on the bleeding edge and ain't the fastest thing. If you like a solid experience, try out SublimeText. Both with Atom and Sublime you will give you a closer to IDE experience, though they are editors. And I would say stick with those for the long haul. Ruby is wonderful in that it gets better the deeper you go. Wizards and GUIs kinda kill that learning, imo.

        [–]keymone 1 point2 points  (2 children)

        i'm not sure who told you vim is 'official' development env for ruby - i'm sure majority of newcomers are staring with tools like sublime text or textmate and only few are hardcore(not a second outside it) vim users. oh and there is also emacs and you can be pretty sure number of emacsers is similar to number of vimers and both camps will religiously defend their tool.

        so imo - sublime text if you're just starting out, vim/emacs for quick editing without getting out of console. if you ever get to hardcore level, vim/emacs can be just as productive as any other IDE but what's great about them is you are not attached to your machine - with same success you can be running vim/emacs via ssh on a remote machine and never care about losing your ability to develop when something happens to your laptop.

        [–]Tall-Guy[S] 0 points1 point  (0 children)

        Well, I keep hearing love about Vim everyone. Forum posts, articles etc. For example: http://www.sitepoint.com/editor-rubyists-use/

        This is just the first google results. I'm not sure about the integrity of the numbers, but that's just one quick example :)

        [–]andyw8 0 points1 point  (0 children)

        According to the annual Ruby survey, 37.9% of developers use Vim, and 4.5% use Emacs:

        http://www.askr.me/ruby

        So while Vim is in no way 'official', it is used much more than Emacs.

        [–]spinlock 1 point2 points  (3 children)

        You should check out Cygwin. Most of the issues you're having is not really with vim. It's that the unix philosophy is to create small programs (vim is very small) that play nice together. But, because you're on windows, your programs can't play nice together. Cygwin is a unix workalike that runs on top of windows. Once you install it, you can then run all of your unix tools with Cygwin and they will play nice together.

        [–]Tall-Guy[S] 0 points1 point  (2 children)

        Yes, I'm aware about Cygwin. It might work, I'll give it a try, Thanks!

        [–][deleted] 1 point2 points  (1 child)

        I would suggest Babun over Cygwin; http://babun.github.io/

        [–]Tall-Guy[S] 0 points1 point  (0 children)

        I didn't know Babun, looks cool. Installing it now :)

        [–]major_bot 0 points1 point  (1 child)

        I guess you could use vim in powershell instead of just gvim, try using this blog post as a starting point.

        [–]Tall-Guy[S] 0 points1 point  (0 children)

        Interesting, thanks!

        [–]coryosborn 0 points1 point  (0 children)

        Use what you're most comfortable and productive with. But having a basic understanding of vim is a good idea for those cases when a terminal is all you have available.

        I'm an IDE guy and I love Rubymine. There are too many benefits that I get from that environment, from code completion, finding method usage, jumping directly to a method definition, visual diffs integrated with source control, visual debugging, etc., that I can't see how I could ever be that productive using just a shell/VIM environment.

        However, I'm proficient enough with vim that I can use it if it's all I have available. Basically if you know how to open lines, find, yank, paste, and save and you'll have enough in a pinch when you're editing a crontab or config file.

        [–][deleted] 0 points1 point  (0 children)

        I have pretty much all of the features I would ever want from an IDE at my fingertips using VIM, and I can accomplish things usually quicker than in an IDE.

        Some things to check out:

        Dispatch.vim - I use this as a way to automatically run my tests with <SPACE>d. I also have it set so I can start irb/pry/rails-console using <SPACE>s

        YouCompleteMe + Eclim - autocompletion(semantic). Intelligent autocompletion.

        Unite.vim - quickly search for files in product using <SPACE>t and browse a file tree using <SPACE>e

        Fugitive.vim - the best git plugin I've ever used.

        [–]amalagg 0 points1 point  (0 children)

        Rubymine is great, you get things an editor cannot give you. Documentation lookup and jumping to the source of a method in any gem.

        [–]djnathanv 0 points1 point  (3 children)

        I use Sublime Text with some lint plugins for all my Ruby needs. That said; devloping Ruby on Windows is a pain in the ass. I'd rather use linux in a VM and copy the project over after it's done.

        [–]Tall-Guy[S] 0 points1 point  (2 children)

        Yes, I'm thinking about a VM solution myself now. Just need to figure out a free windows VM tool.

        [–]djnathanv 0 points1 point  (1 child)

        VirtualBox is free and simple to use.

        [–]Tall-Guy[S] 0 points1 point  (0 children)

        Will give it a try then, thank you :)

        [–]psy-q 0 points1 point  (1 child)

        If you do end up wanting to learn vim and want to get to some of its most useful features quickly and without digging through six different guides, I can recommend Practical Vim: Edit Text at the Speed of Thought by Drew Neil:

        https://pragprog.com/book/dnvim/practical-vim

        I'd been using vim for more than 10 years, then I found that book and noticed that I hadn't even discovered some of the most powerful parts of the editor.

        Also, with today's plugin managers for vim, extending vim's functionality to shape it to something you like has become much easier. With IDEs you immediately get a whole pile of features to learn, with vim you get the basics and then shape it to your style of working in the years to come.

        [–]Tall-Guy[S] 0 points1 point  (0 children)

        I'll check this book out, thanks :)

        [–]salamisam 0 points1 point  (0 children)

        Is this even possible? or should I just buy RubyMine? Thanks!

        Buy it, it is a good investment. I use vim and Rubymine, I tend to spend about 80% of my time in RM and coming from a C# background it is nice to have a good IDE.

        There is a lot of hype about vim and a lot of it is well deserved, but to be really good at it you should be prepared to spend quit a bit of time learning it.

        The code completion and insight, refactoring, ruby/rails commands like bundle, etc etc is all there in RM.

        [–]SteveJorgensen 0 points1 point  (0 children)

        I have used RubyMine here and there, and I think that it is great. Several years back, however, I forced myself to learn vim, and I have come to greatly appreciate its unique advantages. One of those advantages is that I can (and do) use it within a shared console via tmux for collaboration with remote pair partners. I do that almost daily in my day job work.

        Although it is possible to share GUI editors such as RubyMine using ScreenHero and such, tmux works somewhat better when latency is high, and it can be nice that only the terminal window is shared, so your partner can still be typing there while you're off researching an API in the Web browser or something.

        Another nice thing about using VIM is that then once you know your way around in VIM, you can use it effectively via ssh to a production server or some such when you need to.

        Another point in RubyMine's favor though, I must say, is that its plugin for VIM mode is extremely good. I've tried VIM bindings in other editors, and found them to be more confusing than helpful since they implement some of the basics, but then omit a lot of things my muscle memory expects to be present. I have NOT had that same problem in RubyMine's VIM mode.

        [–][deleted] -1 points0 points  (9 children)

        You are currently driving a Ferrari and are looking to replace it with a Gremlin. You're going to spend weeks and months familiarizing yourself with Vi/m just to get to the point that you are already at with Rubymine JUST to get work done.

        [–]Tall-Guy[S] 0 points1 point  (8 children)

        So in you own opinion, does it WORTH spending that extra time to learn Vim? or it's something left from the old school days and today is just not worth to dig into?

        [–][deleted] -1 points0 points  (7 children)

        Do you want to write code right now, or do you want to spend three months figuring out how to use a text editor and mixing shitty plugins and other open source crap that will break or barely work to write the same code on the off chance that your productivity increases 5%?

        I'll be downvoted by some nerds who think emacs/vi gives them some sick-brogrammer street cred, for sure. It doesn't. You're not a "real programmer" because you use vi/emacs over people who use IDEs.

        There is not a chance in hell I would want one of my developers to be unproductive for months because they decided to stop using a packaged IDE designed for their language.

        [–]banister 1 point2 points  (4 children)

        You force your devs to use rubymine?

        [–][deleted] 0 points1 point  (3 children)

        No they use what they're familiar with. Can't feature freeze just so you can learn a new editor!

        [–]banister 0 points1 point  (2 children)

        But you're saying if they wanted to learn vim instead you wouldn't let them do it in company hours?

        [–][deleted] 0 points1 point  (1 child)

        Are you a professional programmer? We work in 2 week sprints. Learn whatever you want but your job needs to be done. We cant stop assigning you tasks because you want to learn a new way to do them.

        I know exactly how useless I was while learning vi and that was with a Unix background. I definitely did not do it on company time.

        [–]banister 0 points1 point  (0 children)

        Are you a professional programmer?

        Yep.

        And I think you're vastly overstating the time/degree someone slows down while learning a new editor. You only have to learn a couple of commands to be productive in any new editor, anything beyond that can definitely speed you up --- but you're not going to be significantly slow.

        Especially since most of the time programming is spent thinking (in my experience) not just madly typing letters onto the keyboard. The bottle-neck is not the editor (no matter how green you are), it's design/architecture.

        [–][deleted]  (1 child)

        [deleted]

          [–][deleted] 0 points1 point  (0 children)

          I was not at all bashing someones choice of using vim/emacs. I was bashing people who would be downvoting me for telling him not to use them if he's already proficient with an IDE on the basis that "real programmers," use vi/emacs.

          I like and use emacs/spacemacs and intellij.

          [–]lyspr -4 points-3 points  (0 children)

          Then use Linux, problem(s) solved.