Live data from Hacker News

One with Vim

invisibletheory.com

41–50 of 129 posts

Re: One with Vim

#41

Earlier quoted context omitted.

:e . or :NERDTree

I use NERDTree and it's not even remotely close to Command-T (or PeepOpen, which is pretty much the same thing). NERDTree is great for browsing your project and managing your files, but for opening files (when you know their names) you really can't beat the speed of Command-T/PeepOpen. They're in another league. I don't know how people work without it.

I use vim project. I load all my files in the side pane, and I search with / the file I want to open.

http://www.vim.org/scripts/script.php?script_id=69

Re: One with Vim

#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.

Re: One with Vim

#43

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…

I'll just come out and say it: my favorite editor is Visual Studio

Not to be overly pedantic, but your favorite IDE is Visual Studio, and you just happen to use whatever crappy editor component comes bundled with it.

If we could have full-blown Vim embedded inside IDEs instead of good-but-incomplete plugins which merely give you some of the key mappings, I'd be elated and couldn't see why anyone would stick with the Notepad-style editor which is the default.

Re: One with Vim

#44
One of the features that really got me into Vim was the macros feature. I actually ran into in accidentally several times when I was first learning the basics (and couldn't get out of recording mode). But macros, and especially the temporary nature of macros, have saved me (collectively) many hours:

q ; then q to stop recording. Then @ to kick off the macro. Splendid.

Re: One with Vim

#45
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.

There are Vim emulation plugins for Eclipse, if you want the best of both worlds.

Re: One with Vim

#46
post #37

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…

>any command I don't recall is readily available through the menus. Any full featured editor has so many commands, menus are not practical to display them. VS included. So you're either using just using a subset of VS' functionality, or use hotkeys in VS too.

That's true, I misspoke. A wide variety of commands are available through the menus, and the rest are pretty readily discoverable through the Tools | Options | Keyboard.

I'm definitely using hotkeys very heavily in Visual Studio.

Re: One with Vim

#47
post #43

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…

I'll just come out and say it: my favorite editor is Visual Studio Not to be overly pedantic, but your favorite IDE is Visual Studio, and you just happen to use whatever crappy editor component comes bundled with it. If we could have full-blown Vim embedded inside IDEs instead of good-but-incomplete plugins which merely give you some of the key mappings, I'd be elated and couldn't see why anyone would stick with the…

I never tried to make it work, but the vim distribution for Windows used to include a COM object which could be used as your Visual Studio editor.

Re: One with Vim

#48

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…

Visual Studio? Sure, as long as you're only going to be coding on Windows.

I'm curious, does anyone use Visual Studio for non-code editing? For example, I'm typing this in Vim right now. I use Vim for lots of meant-for-human-readers text.

Re: One with Vim

#49

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…

Visual Studio is a great IDE for writing .NET code and is very good at C and C++ on Windows. When I started with PHP on Linux after 7 years of C++ and C# in VS, I quickly realized there was nothing comparable to VS and decided to scale the Vim learning cliff.

I've found Vim's text editing to be better than VS. For example, it's extremely to change a string - ci" - where in VS it's ctrl-leftarrow a few times then ctrl-shift-rightarrow a few times. In Vim it's much harder to compile things, no Intellisense, no refactoring, no decent equivalent to the Solution Explorer, and tons of other missing things. There's no doubt about it. A lot of these things are less useful when working in PHP, so Vim makes sense there.

Not believing the Vim hype is like wondering how anybody could be a Dallas Cowboys fan, which makes a lot of sense to people who grew up or live in Dallas. To people writing code where VS isn't available, there's more focus on editing letters which Vim lets you do more efficiently.

Re: One with Vim

#50
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 need to learn about registers. You can copy between windows and even use your OS's clipboard via Vim.

Normally y is used to yank. However, you can prefix it with "x to yank in to register x. Then you can "xp to paste from register x. You have registers 0-9 and a-z for regular use. They work within a single window.

If you use register *, the register corresponds to your OS clipboard.

Read :help registers to learn more.

Post reply on HN