Hacker News new | past | comments | ask | show | jobs | submit login

Having to touch the mouse while just editing text slows me down and breaks my rhythm.

My standard vim configuration is this: set ts=3 "I like a tab space of 3 map <F5> :set hls!<bar>set hls?<CR> "Turn text search highlight on/off with F5 key

You can add more stuff, but the basic functionality I use everyday is just there. It takes me the actual time to install vim (if it's missing) and plug in those 2 lines and I'm ready to edit.

Using buffers comes and goes for me, I'm not a vim power user, I usually cut/paste blocks of text by checking the line numbers and doing :<start#>,<end#>y to copy, and p to paste. I learned to edit back in the day using a modified version of ed on a MUD, so my approach probably isn't the norm, but it's always worked for me. Adding Cscope as a backend pretty much makes it do everything Eclipse can do, only faster.

I usually am not adding tons of text at once, more usually I have my window split (:split <filename>) between a couple of source files pondering what is broken/working/needs to be added.

However, someone starting out can make more sense of one of the Wysiwyg editors, vim and the like (emacs comes to mind obviously), require a little more time to make productive. Once you have enough arcane incantations, the thought of doing something and the action happen almost instantly, and it's very, very, very hard to go back to having to interact with a mouse-based editor (I still use my mouse for copy/paste in some situations, though, so I suppose it's not as big a deal as I feel like it is).




seems like instead of copy and pasting like that you would be better served pressing V and using some form of block navigation.([,(,{, etc.) see :help text-objects for more examples. or a search would work as well for some queries. /textToFind then enter and then navigate to fine tune your selection if it's off by a bit.


Right, the line number is mostly just my habit. Occasionally I'll just yank with a regex, ie: y/<regex>, but that usually requires stopping to think.

I guess my point is there are a lot of ways to do things in vim, and even just learning a couple of them is in general quite powerful. Additionally, being able to use regex's with commands is very useful, and something not readily apparent if you aren't much of a regex user.

The line number thing is generally a search to first line (line number is in the ruler at the bottom of my vim window), search forward to last line, execute command. I suppose this is actually an ed-compatible command, older than vi.




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

Search: