r/programming • • Sep 24 '15

Vim Creep

http://www.norfolkwinters.com/vim-creep/
1.2k Upvotes

844 comments sorted by

View all comments

Show parent comments

42

u/superPwnzorMegaMan Sep 25 '15

So you install a vim plugin for your IDE. Best of both worlds.

35

u/net_goblin Sep 25 '15

Sadly, most vim plugins are inadequate. Most of those I tried miss the command mode. I don’t want Ctrl+F or Ctrl+H for search and replace, I want “:%s/foo/bar/g”, and all the nice stuff that comes with it.

13

u/sososojacques Sep 25 '15

IntelliJ's vim plugin has this. It's not perfect, but that's the best middleground I found to get stuff done so far. A real IDE, and a good vim support.

2

u/net_goblin Sep 25 '15

Sounds nice, but I’m not a Java guy so I usually don’t use it. I’ve heard good things about CLion, but have not yet used it.

→ More replies (3)

1

u/OnlyDeanCanLayEggs Sep 25 '15

I found IntelliJ's vim plugin vastly inferior to Eclipse's. It was the main reason I went back to Eclipse after my trial expired.

→ More replies (1)

3

u/MereInterest Sep 25 '15

Yeah, I have the same problem with the emacs plugins. I don't just want the standard shortcuts remapped. I want my environment, complete with all the bells and whistles that I am used to.

1

u/[deleted] Sep 25 '15

You can install an OS as a plugin? Cool!

→ More replies (1)
→ More replies (3)

13

u/cowinabadplace Sep 25 '15

Absolutely. I don't think I could write code without IdeaVim. Shifting between parens in Clojure would be a nightmare.

→ More replies (1)

19

u/TheMerovius Sep 25 '15

I literally never saw a vim plugin for an IDE that was worth the trouble. My favorite example is always visual block mode: IDEs don't have a concept of that, so IDE plugins can't have a concept of that either. I never have seen a vim plugin that can do visual block mode… :( And it's one of the most important features of vim.

4

u/sihat Sep 25 '15

for intellij idea, ideavim has visual mode. (though it might not work exactly like vims visual mode, the issue i am talking about is after selecting a text with vm, using [I] inserting text & using backspace )

8

u/TheMerovius Sep 25 '15

ideavim has visual mode

"visual mode" ≠ "visual block mode"

3

u/quicknir Sep 25 '15

IdeaVim, Vrapper both support visual block mode. And most IDEs have their own version of visual block mode. I don't think you looked very hard.

→ More replies (2)
→ More replies (1)

2

u/Me00011001 Sep 25 '15

VsVim for Visual Studio does it.

2

u/SnappyTWC Sep 25 '15

ViEmu for Visual Studio does it quite well.

1

u/[deleted] Sep 25 '15 edited Sep 25 '15

Qt Creator is very good.

You just press Alt+V Alt+V to switch Vim mode on/off.

Edited: I wrote Ctrl+V Ctrl+V. I was wrong.

2

u/TheMerovius Sep 25 '15

QtCreator doesn't have visual block mode, as far as I remember. And the vim -mode didn't play well at all with the tab-completion (at least that's what I assume is the reason why the first keystroke of every identifier I tried to type was swallowed in vim-mode).

Just… no.

→ More replies (1)

2

u/TheMerovius Sep 25 '15

You just press Ctrl+V Ctrl+V to switch Vim mode on/off.

This pretty much confirms that it has no visual block mode. Ctrl+V is how you enable visual block mode.

1

u/argv_minus_one Sep 25 '15 edited Sep 25 '15

Every modern IDE supports that natively, but it's usually called “rectangular selection”.

Tip: Rectangular selections can have a zero width. If you make a zero-width rectangular selection, text you type will be inserted at that position. If your rectangular selection has a non-zero width, text you type will instead replace what's selected.

2

u/TheMerovius Sep 25 '15

Every modern IDE supports that natively, but it's usually called “rectangular selection”.

Then I have either never used a modern IDE, or a non-sucky vim-plugin of a modern IDE. Because as I said, I have never seen a vim-plugin that does visual block mode (I simply assumed that's because IDEs don't support the concept, I might have been wrong in this assumption)

→ More replies (2)

2

u/kqr Sep 25 '15

And if you do an insert command with a zero-width block selection, it will do the insertion at every point in that selection.

If it doesn't, it's definitely not as good as visual block mode.

2

u/argv_minus_one Sep 25 '15

Yes, that's exactly what it does.

1

u/kqr Sep 25 '15

Evil mode for Emacs does very well. And supports visual block mode!

→ More replies (1)

1

u/sfultong Sep 25 '15

What do you use visual block mode for? Are you hand-making tables or something?

→ More replies (2)

1

u/javajunkie314 Sep 25 '15

Check out Vrapper for Eclipse, which does actually do command mode and block selection (you just have to unmap ^V in Eclipse of you want to use that key combo).

2

u/arvinsim Sep 25 '15

Yup. I have moved from Vim to Intellij + Ideavim. I could never go back to non-modal editing without feeling clumsy.