Hacker News new | ask | show | jobs
by briancarper 5772 days ago
> I often have to navigate the project folder structure to look for stuff, I need to compare files, work with the source control and so on.. all of this I feel I can do pretty efficiently from within Eclipse.

For Vim, there are a lot of plugins to deal with source trees, but I get along fine with Vim's built-in wildmenu and tab completion. Both options are nicely configurable. For emacs, I like ido-mode. I find it much faster to browse a directory and open a file with the keyboard and tab-completed filenames than to use a mouse.

There are also commands to jump to other files to find the definitions of functions and such. It depends which programming language you're using. Vim has `gd` and friends to do the same. And then there's ctags, which integrates with Vim wonderfully. Editing Lisp code in Emacs with SLIME (for example), `M-.` will jump you to a function definition in another file.

For comparing files, it'd be hard to beat vimdiff, which provides built-in, cross-platform colored diffs of buffers. Emacs has a diff mode as well.

For source control, Vim and Emacs both integrate well with Git and others. You can stage and commit files and such via a keystroke or two. But personally I use the command line for git. (Of course you can embed a shell right in Emacs too.)

Vim and Emacs let you use "windows" (panes) instead of tabs for editing multiple files; don't overlook how awesome this is. You can view files side-by-side without having to close or hide one to open another. It frees short-term memory for other things. Once you set up keybindings for opening, closing, resizing and moving between windows, you're set. I haven't found anything faster or easier to use. Finding and viewing a buffer that isn't currently visible again uses tab-completion and is very fast.

So yes, a lot of typing. But typing is more efficient than mousing, I find. That's part of the point of Vim and Emacs to begin with.

I often work on Ruby on Rails projects in Vim with 2 dozen files open, or more, and have a very easy time.

1 comments

One quick, small tip about Vim's panes(/windows) that most people don't notice right away: not only can you view two parts of the same file at the same time, but you can fold/unfold the code in them independently.