Live data from Hacker News

Two weeks with Vim

soledadpenades.com

21–30 of 37 posts

Re: Two weeks with Vim

#21
post #3

I am a wordstar guy, I started with CP/M... For years I enjoyed Borland products, they used Wordstar key bindings. And then one day it stopped working. I simply had to use the mouse. I was shocked. It took me years to recover. I hated it. Call me a masochist, a few years ago I tried Emacs, it was the only editor with syntax enlighting for Ruby at the time. Except it was not working, or at least it was not working for…

Mice are an ergonomic nightmare.

I wonder if some smart lawyers could team with some physical therapists to create some massive lawsuits- force companies to offer mouse-alternatives for all their programs or something. The law's done much worse.

-- And I think I once cleaned-up some code based on the "one big file" principle...

Re: Two weeks with Vim

#22
post #6
post #4

Earlier quoted context omitted.

Uh? I thought the purpose of splitting code between different files was simplicity .

It's a lie. The true reason is purely historical. Editor where just TOO SLOW to handle big files (on DOS they often were limited to 64kb, if not less) Please note that I love "modular code", hence the notion of "sections" in my big file. To clarify: I love to edit one big file, but for other purposes I definitely need small ones. What I am basically proposing is that it is easier to edit multiple files from within a…

Not quite true though, but again it's speed related (and this is very apparent in C++ projects). It has benefits when compiling a changed file. The smaller your file and the fewer things you include, the faster you can compile it and link it with the other (unchanged) objects.

Re: Two weeks with Vim

#23
post #3

I am a wordstar guy, I started with CP/M... For years I enjoyed Borland products, they used Wordstar key bindings. And then one day it stopped working. I simply had to use the mouse. I was shocked. It took me years to recover. I hated it. Call me a masochist, a few years ago I tried Emacs, it was the only editor with syntax enlighting for Ruby at the time. Except it was not working, or at least it was not working for…

A few years ago I was chatting with some fellow geeks, and, as often happens, we got on to ridiculing PHP developers.

Ha ha! Every PHP app is one big file! What losers. Yeah, we were having blast with these digs. But then I realized that, at least in some ways, this was an epic win. Have to go dig into some alien app? No worries; everything you need (or probably care about) is in the one big file. Need to deploy? FTP that one big file.

Seriously, maybe it's not as crazy as it seems.

The better approach might be for your editor to behave as if all code were one big file, when needed, and behave as if all code were nicely split out, when needed.

And have multiple files makes life easier when you're on a team and several people are touching different parts of an app.

But before rejecting something like this out of hand, consider what your needs really are, and if how you're doing things is really what's going to work best for you.

Re: Two weeks with Vim

#24
post #9
post #8

Earlier quoted context omitted.

I can see how that would be useful, but I have a question. If you do edits in both windows, how do you save them? Do you just save in one window and reload the other?

In vim, when you have the same file open in different windows any changes immediately appear in the other window. They are the same buffer, there are just two windows to it. You can see this by opening a file, and hitting " " to split the window. Do some editing and you'll see it in both places. ":ls" will show only one buffer. And if you have display of the buffer state visible, when you ":w" all the windows will up…

Wow, I did not know that. I've always just assumed they'd be different buffers. I'll probably be using this a lot in future. Thanks!

Re: Two weeks with Vim

#26
I use vim, but not vim exclusively. Every single day, I use gedit, scite, scribes and an IDE - some times in the vi mode.

There is a cognitive load to switching between many editors. That is something Emacs users who always exist in Emacs do away with.

Re: Two weeks with Vim

#27
post #6
post #4

Earlier quoted context omitted.

Uh? I thought the purpose of splitting code between different files was simplicity .

It's a lie. The true reason is purely historical. Editor where just TOO SLOW to handle big files (on DOS they often were limited to 64kb, if not less) Please note that I love "modular code", hence the notion of "sections" in my big file. To clarify: I love to edit one big file, but for other purposes I definitely need small ones. What I am basically proposing is that it is easier to edit multiple files from within a…

What about source control, concurrent team work, external libraries, etc.?

Re: Two weeks with Vim

#28

I just got TM-style command-T working on my vim setup thanks to wincent, it is a nice implementation: http://wincent.com/products/command-t It was really one of the only things about TM that made me jealous :) Also it taught me about which I'd never even heard of before! Great way to keep your personal commands namespaced from stock vim.

For anyone interested I'd suggest to also look at FuzzyFinder. It does the same thing but is a little more advanced (real fuzzy search, also works on buffers, etc.):

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

Re: Two weeks with Vim

#29

I love VIM. It's my go to editor for everything. And as much as I love it I hate to admit that I was more productive using Eclipse when it came to a large-ish web project. I tried using gVIM tabs, an buffers, and minibufexplorer, and Project, and ctags. Either I was doing it wrong or they just didn't want to work how I thought and worked. So I'll lust after VIM and use it when I can, but I'll default to Eclipse when…

I've been doing some ruby and php stuff at home and I mostly use vim. But when I go back into work it's back to java and eclipse.

I would love to use vim on my java work but I'd really miss eclipses background compilation and server integration.

Re: Two weeks with Vim

#30
post #29

I love VIM. It's my go to editor for everything. And as much as I love it I hate to admit that I was more productive using Eclipse when it came to a large-ish web project. I tried using gVIM tabs, an buffers, and minibufexplorer, and Project, and ctags. Either I was doing it wrong or they just didn't want to work how I thought and worked. So I'll lust after VIM and use it when I can, but I'll default to Eclipse when…

I've been doing some ruby and php stuff at home and I mostly use vim. But when I go back into work it's back to java and eclipse. I would love to use vim on my java work but I'd really miss eclipses background compilation and server integration.

Try Eclim for your java work. It's a set of vim plugins which run and communicate with a headless Eclipse instance in the background. This allows you use Vim as your editor and pull many of Eclipse's fancy features forward.
Post reply on HN