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

Show parent comments

1

u/MediumRay Oct 06 '13

Haha, I don't think you can outright say it's 'definitely' faster, but whatever. I can't say that I have ever refactored code that wasn't mostly my own, but I don't generally have a problem with medium-sized code. I can say 'jump to function definition', even if it's in another file, it opens that for me etc., or, copy a function a few times, then do regex substitute on the variables inside it (I wouldn't want to use an IDE that doesn't support regexes). I have heard, though, that you really do need an IDE for huge codebases (not something I have or probably will work with), so yeah.

I don't know if I agree with the 10-90% split. I am currently doing a lot of data processing which would be much more difficult without vim, or at least some perl scripts. I usually create a file full of 10,000 lines, and then start to remove all lines that contain or don't contain strings, and inspect/jump to next string etc. Doesn't require much thinking, requires a lot of text processing, via vim/perl.

I wouldn't know if using a scroll wheel is faster, I use terminal vim exclusively because I am working on a cluster and that's the best option (vs gvim). Usually use keys that do something similar to the page up/page down keys. That, or jump to top/bottom of file, which I use a lot and is certainly faster for me than a mouse would be.

I have never used IDE editor shortcuts, except for save, find, zoom in/out, and compile I think. For one, I don't use any other shortcuts frequently enough (that I notice) to remember them, for two, they aren't particularly easy to remember. F5 is compile and run you say? Cool. It would be nice to rebind that to :cc if I had the choice.

Overall, I don't think I will be convinced that an IDE can help me (or most vimmers) edit code faster. I mean, it's not like I haven't used them. I think, if you are writing a lot of different languages, or even just editing text files of data, especially sequentially (edit makefile -> edit shell script -> edit perl file -> run make -> edit makefile -> run make -> edit output file), then vim is your friend. If you want to write a large commercial program possibly not. Debugging? Probably not. Viewing waveforms? Certainly not.

1

u/mirhagk Oct 06 '13

Yeah as I mentioned, vim is good for languages not supported by the IDE. Also if you haven't used shortcuts in IDEs you really haven't used them much (or a good one, I'll take vim over eclipse any day of the week).

Visual studio is VERY extendable. You can remap F5 to :cc if you want. You can even install vi commands for it if you really want. It if course supports regex, and 2013 had the coolest feature. You can view the definition of a function in a little popup preview window, without leaving the current code.

Integrated debugging (including edit and continue) is the best benefit by far.

I feel like any task that's trivial enough you don't need debugging, or aren't thinking/reading code most of time can and should be automated. Maybe you're language is too verbose, try Haskell, where notepad is sufficient for majority of projects

1

u/MediumRay Oct 06 '13

What's a good IDE/shortcuts?

I have heard that visual studio is extendable... But unless it can read from a .vimrc file and do the same sort of magic I'm not that enthused.

Naturally I need to debug my code. In fact, the general consensus is that more verbose languages require more degugging. Mainly I am using perl as I mentioned, I feel that's a pretty non-verbose language, if you know of it. But when I say IDE debugging, I mean set breakpoints and look at your stack. Naturally, I am automating what I am doing (makefile), but when it gets down to it, only a human can analyse the output, go back, change things or output graphs, etc.

Interestingly, I am learning Haskell so I can use it with xmonad to further increase my productivity. Two of my colleages are maintainers for Haskell and Ocaml, both of them are heavy vim users, and one guy has an xmonad + vim setup that makes me jealous.

1

u/mirhagk Oct 07 '13

Actually Visual studio is pretty awesome, configuration can be tied to an account, and move with you across computers, it has an extension manager that's pretty darn good, and the best part is developing extensions in it.

It'll actually launch a new visual studio instance when you run your extension, and you can debug, including breakpoints and everything when you are building it. With Roslyn you can also tie into language specific constructs.

Good IDE shortcuts are things like F12 (go to definition) Shift+F12 (find all definitions), F2 to rename.