Live data from Hacker News

One with Vim

invisibletheory.com

51–60 of 129 posts

Re: One with Vim

#51
post #39

Earlier quoted context omitted.

Your comments about Vim's learning curve are spot on, and I don't think any vimmer will disagree with you, but the argument they make (which I agree with) is that the cost/benefit ratio is worth it. If you only code every now and then, so you've got a lot of time between sessions to forget things, and not a whole lot of time in total, then something like Visual Studio which has good 'discoverability' is going to be b…

Is there anyone out there that has given eclipse/intellij idea a fair chance and decided Vim was better for coding java? It's difficult for me to imagine coding without the built in refactorings it provides and shortcuts like ctrl+n and ctrl+alt+h.

I'm learning Vim because of my three years using Eclipse. Built in refactoring is pretty awesome and the Eclipse debugger is the best debugger there is.

However, over and over, on each of my projects that used Eclipse, inevitably multiple team members would have Eclipse crash and throw their entire workspace into disarray. Sure Eclipse might give you a 20% boost of productivity day to day, but that once every six months catastrophic disaster it would cause negated a lot of it.

Sometimes Eclipse would have trouble talking to the database, sometimes it would screw up its project file, other times it would outright corrupt files, cache things wrong, etc. This wasn't just for me, it was the experience many of our programmers had at various companies.

Now I'm working on my own project, and it's not near as large so I haven't felt the pain of not having magic-refactor. I've been forced to hack on a script to provide step-through debugging capability, and probably once a day I'll google to find the right keystrokes to do something, but I feel in the end, the effort is more than worth it.

Re: One with Vim

#52
post #11

Vim is my primary editor but I think the only really good part of vim is the keyboard navigation. The rest could be much better. For example, to this day I haven't figured out an easy, built-in way to copy from one vim window to another. I'd love to have some features of other editors have but the key bindings always hold me back.

You're not really supposed to run vim in multiple windows. Use your system pasteboard if you need to copy between them. There's probably some plugin that would make it work with yank registers though.

> You're not really supposed to run vim in multiple windows

huh? I run in 3+ windows (terminal shells) all the time and have done so for 5+ years. To cut and paste between windows I use filesystems copy and paste (select and middle click in X)

Vim is flexible and you are suppose to run it however works for you.

Re: One with Vim

#53

Am I foolish for not believing the vi/vim hype? I understand that it's been around for as long as rocks, and that it's quite handy since it's available everywhere. I use it daily, in fact, but rarely for more than basic editing. I'll just come out and say it: my favorite editor is Visual Studio. Sure, it's slow to load and rather fat now, but I'm talking solely about the editing functionality. With vim, I have to cli…

Your comments about Vim's learning curve are spot on, and I don't think any vimmer will disagree with you, but the argument they make (which I agree with) is that the cost/benefit ratio is worth it. If you only code every now and then, so you've got a lot of time between sessions to forget things, and not a whole lot of time in total, then something like Visual Studio which has good 'discoverability' is going to be b…

Visual Studio which has good 'discoverability'.

Not my experience at all. It's a sea of confusion and pain.

Re: One with Vim

#54
post #39

Earlier quoted context omitted.

Is there anyone out there that has given eclipse/intellij idea a fair chance and decided Vim was better for coding java? It's difficult for me to imagine coding without the built in refactorings it provides and shortcuts like ctrl+n and ctrl+alt+h.

I've heard from lots of vim people that do actually use Eclipse to make up for Java's inadequacies, yes.

Assuming that that java bash was in context, I have to say that the IDE features I mentioned would be useful for almost any language:

Refactorings: I can rename a method in one location and it will change all the calling code. This would be dangerous to do by hand: Best case scenario, there would be a compiler error for all the broken code. Worst case, that method name was already overloaded and you just introduced a bug.

ctrl+n: Open any file that's in your project. It can find the file by camel case or pattern matching and it only includes files in your project.

ctrl+alt+h: See a tree of all the callers of a method. Extremely useful when you're considering a refactoring. You can instantly answer the questions, "Is anyone calling this method?", "Is anyone calling the methods that are calling this method?...", "What will be affected by this change?", and so on.

Re: One with Vim

#55
post #9

Vim is easier on the hands, but Emacs (with ido-mode) still feels better for working with multiple files: (length (remove-if (lambda (b) (not (buffer-file-name b))) (buffer-list))) 42

After I swiched to vi, I stopped feeling the need to work with multiple files; Just pop in and out of the shell.

Re: One with Vim

#56
post #42
post #11

Vim is my primary editor but I think the only really good part of vim is the keyboard navigation. The rest could be much better. For example, to this day I haven't figured out an easy, built-in way to copy from one vim window to another. I'd love to have some features of other editors have but the key bindings always hold me back.

you can copy and paste from the system clipboard as the + register - use "+y to yank to the system clipboard and "+p to paste from it (depending on OS, you may need to use * instead of +). This allows cutting and pasting between vim and other applications (including other instances of vim). For editing multiple docs with vim, I find it's easier to use multiple buffers in the same window. Use :b to jump back and forth…

I never really liked using :b ... for quickly switching back and forth between files, so I bound ^hjkl to move among buffers. Perhaps the best part of my vim experience.

    " Use ctrl + movement keys to move around windows
    map  h_
    map  j_
    map  k_
    map  l_

Re: One with Vim

#57
post #54

Earlier quoted context omitted.

I've heard from lots of vim people that do actually use Eclipse to make up for Java's inadequacies, yes.

Assuming that that java bash was in context, I have to say that the IDE features I mentioned would be useful for almost any language: Refactorings: I can rename a method in one location and it will change all the calling code. This would be dangerous to do by hand: Best case scenario, there would be a compiler error for all the broken code. Worst case, that method name was already overloaded and you just introduced a…

Although not as comprehensive as the eclipse refactorings, ctags go some way towards giving you similar functionality in vim.

Re: One with Vim

#58

Am I foolish for not believing the vi/vim hype? I understand that it's been around for as long as rocks, and that it's quite handy since it's available everywhere. I use it daily, in fact, but rarely for more than basic editing. I'll just come out and say it: my favorite editor is Visual Studio. Sure, it's slow to load and rather fat now, but I'm talking solely about the editing functionality. With vim, I have to cli…

Actually I had the same argument about 15 years ago when I started using vim. Actually vim was forced on me on my first week of uni. We had to use "unix" (woooah)... anyhoo, the first 2 weeks were a total pain as we didnt have (or I couldnt find) alternatives... yes there was emacs but I couldnt be bothered go to another non-UI editor... but after that there was no looking back.. I think it is after that initial two week period that most vimmers remember and appreciate.

I know it is hard to justify plonking down 2 weeks when your current methods work. For me it is the ability to type what I am thinking without having to reach for the mouse (I know in VS you could customize keyboard shortcuts exactly the way you want but somehow it seemed a lot more obvious in vim for me).

Re: One with Vim

#59

Am I foolish for not believing the vi/vim hype? I understand that it's been around for as long as rocks, and that it's quite handy since it's available everywhere. I use it daily, in fact, but rarely for more than basic editing. I'll just come out and say it: my favorite editor is Visual Studio. Sure, it's slow to load and rather fat now, but I'm talking solely about the editing functionality. With vim, I have to cli…

[deleted]

Re: One with Vim

#60

Am I foolish for not believing the vi/vim hype? I understand that it's been around for as long as rocks, and that it's quite handy since it's available everywhere. I use it daily, in fact, but rarely for more than basic editing. I'll just come out and say it: my favorite editor is Visual Studio. Sure, it's slow to load and rather fat now, but I'm talking solely about the editing functionality. With vim, I have to cli…

[deleted]
Post reply on HN