Earlier quoted context omitted.
Most people that use vim also don't use graphical debuggers. I use the "print" statement.
Someday, you'll get to work in a language that has a good REPL, and you'll never want to go back to printing. :)
Reasons To Give The Vim Text Editor A Chance
41–50 of 68 posts
Re: Reasons To Give The Vim Text Editor A Chance
#42It's not surprising to see that the logo isn't amongst the list :) I use a mix of Elvis and Vim as I'm training up on vi-likes, and I'm not sure which I prefer yet. Vim has more-intuitive-to-me stuff like character-by character deleting (ie characters are removed when you delete, not when you leave Insert mode), but elvis has things like pressing = twice to reflow paragraphs. Vim may win in the end as Elvis is hard t…
Re: Reasons To Give The Vim Text Editor A Chance
#43My reason for using vi/vim is that it's the lowest common denominator text editor. You'll find it by default on most any Linux or BSD system.
Re: Reasons To Give The Vim Text Editor A Chance
#44It's not surprising to see that the logo isn't amongst the list :) I use a mix of Elvis and Vim as I'm training up on vi-likes, and I'm not sure which I prefer yet. Vim has more-intuitive-to-me stuff like character-by character deleting (ie characters are removed when you delete, not when you leave Insert mode), but elvis has things like pressing = twice to reflow paragraphs. Vim may win in the end as Elvis is hard t…
Vim can reflow too, but I will admit that 'gwap' is a bit unintuitive...
Re: Reasons To Give The Vim Text Editor A Chance
#45Earlier quoted context omitted.
What about project-wide find and replace? I have been looking to switch to vim, but I do this fairly often and don't see anything that compares to what a good ide can do in vim (without bash command madness).
Try bufdo, argdo, windo, and tabdo depending on the subset of files you'd like to modify. E.g., to replace "foo" with "bar" in all open buffers: :bufdo %s/foo/bar/g | update Although I wouldn't knock `bash command madness' for this sort of task. :) The Unix shell is pretty much designed for advanced text manipulation across files. E.g., to replace all instances of foo with bar in HTML files, recursively: $ find . -na…
$ deep replace "foo" "bar" "*.html"
Re: Reasons To Give The Vim Text Editor A Chance
#46Earlier quoted context omitted.
Spewing print statements all over a piece of code is as bad as any other shotgun debugging technique. The reason breakpoints and watches were invented were to reduce reliance on bad ways of doing things.
What's good about print statements is that they don't require me to do anything more than once. When you run code in a debugger, there is a lot of manual interaction involved. continue, break, see where you are, think about that, poke around, repeat. With print statements, you run your test, analyze the output, and make the changes. It's all automated except for the analysis step, which is all the human should be doi…
Couple live autopsy with live edit-and-continue and you've got a recipe for a considerably more effective way of debugging code.
And "your code is too complicated and unmaintainable if you need a debugger" is preposterous on its face if you've ever...oh, I don't know...written a driver? Or any other remotely complex (you're conflating complicated and complex) task with a significant number of interlocking parts? (Hell, one could just as easily say that your code is too complicated and unmaintainable if you're barfing print statements all over the place.)
Re: Reasons To Give The Vim Text Editor A Chance
#47Earlier quoted context omitted.
What's good about print statements is that they don't require me to do anything more than once. When you run code in a debugger, there is a lot of manual interaction involved. continue, break, see where you are, think about that, poke around, repeat. With print statements, you run your test, analyze the output, and make the changes. It's all automated except for the analysis step, which is all the human should be doi…
I like logging for this, but the concept is basically the same. Being able to switch on debug logging on a running system has saved the day more than once for me.
Re: Reasons To Give The Vim Text Editor A Chance
#48My reasons for being a vim user a lot more practical than those I see on these "top 10 reasons for trying X": - In the long run, it's faster to learn and use an "efficiency" editor, so I need to learn one of vim, emacs, notepad++, etc. The differences between these are probably negligible for a proficient user. - Of these, only vim will be installed (or vi, which has a big enough overlap that it won't matter to me) o…
Re: Reasons To Give The Vim Text Editor A Chance
#49Earlier quoted context omitted.
Someday, you'll get to work in a language that has a good REPL, and you'll never want to go back to printing. :)
Someday, you'll want to run your code more than once, and you'll write tests instead of typing them into the REPL.
Re: Reasons To Give The Vim Text Editor A Chance
#50Earlier quoted context omitted.
Most people that use vim also don't use graphical debuggers. I use the "print" statement.
Spewing print statements all over a piece of code is as bad as any other shotgun debugging technique. The reason breakpoints and watches were invented were to reduce reliance on bad ways of doing things.