Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I dont do that much text editing. I use notepad++ . Is vim super amazing or something? ps. I usually work on a windows machine but vim is available for windows.

EDIT: Also emacs is available for windows, isnt emacs meant to be the ultimate text editor type thing? I dont really have any need to these, I'm just curious really. When Ive had to do perform some weird operation on a load of text or source code for example I've just written a script to do it.



Yes, vim is amazing.

1. It's installed on basically every server you SSH into, which means you can edit text on remote servers instead of having to download, edit, and re-upload

2. Keyboard-only interface is big. Not only does it mean that you don't have to break flow with mouse usage, but it also means that you can record and play-back a series of edits and movements.

3. Vim is built on composition of count, action, and movement. This means that you can do lots of things with learning a few things. For example, you can diw to delete the word your cursor is inside, or di" to delete the text inside the pair of quotes, or di( to delete inside the parentheses. And when you learn daw to delete around a word, you get access to da" and da( for free.


I don't really have experience with notepad++ at all, but I did try sublime text 2 for a while. It really wasn't my cup of tea. Vim is really useful to me because it's easy to use in terminals and it has a lot of powerful, time-saving keystrokes once you get past the learning curve. Need to comment out lines 52-58? ":52,58s/^/#/", which comes naturally after a little practice. I've used emacs and it's very comparable, but I just happened to like vim more. It can be just a matter of taste, but I really recommend checking out both vim and emacs to see if it can save you time typing out small, repetitive stuff that isn't worth writing a script to do.


52GqqI#<Esc><Enter>q6@q is how I'd usually do that (go to line 52, record how to comment out a line and move to the next line, then do that 6 more times). The macro is about the same number of keystrokes to write, is more generally powerful, and leans more on standard editing skills.


I think Vim's great, but if you don't use a text editor on a regular basis then it's not worthwhile to learn it.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: