views:

283

answers:

4

I am a touch typist.

I am using a regular HP 17" laptop...

When using visual studio 2008, frequently my right hand leaves the home row to use the arrow keys to navigate to different lines of code in the editor.

I have seen viemu, iam not a vi user and am not interested in investing time to learn viemu.

It is frustrating when I am coding something complex and have to take my hand off to use the arrow keys ...

I am interested in knowing how other developers handle this?

EDIT: One of the reason I don't use Viemu is that I am a consultant and I frequently have to use other machines that do not have the viemu addin installed.

+3  A: 

I'm a vim user and a touch typist, but never got used to hjkl. For me it's OK to use the arrow keys, but I must admit that I admire my colleagues who master that skill.

The only thing that is really annoying is that Home, End, etc. are not exactly in the same place on different keyboards, that really drives me nuts.

Ludwig Weinzierl
I have seen vi, don't you have to move your left hand up to the escape to toggle between modes? I would think that this would be a similar distraction.
Nick
@Nick: You are right, an alternative is Ctrl-[, but this is hardly better.
Ludwig Weinzierl
+1  A: 

I agree, it was a large pain for me to move my fingers away from the main keyboard to the arrow keys as well.

What worked for me was to use Emacs mode. You mentioned you don't want to use the viemu mode, but Emacs mode is built into VS2008 so you could use it on other machines pretty easily.

If you navigate to Tools->Keyboard, and under the "Apply the following additional keyboard mapping scheme" you switch the dropdown to Emacs you can use that mode. The keys follow Emacs commands fairly well in my experience and you can learn the commands from numerous tutorials on the web.

Trevor Abell
Thanks - this is something I did not know, emacs option in vs 2008. Will spend some time to look into this.
Nick
+1  A: 

I have learned to use my little finger (aka the pinky) to stretch to the cursor keys, anchoring the remainder of my hand on the Return/Enter key. This approach seems to work for me when using both the cursor keys and the Page Up/Page Down keys. However, I usually use the Ctrl+F3 shortcut and search for actual keywords and such, which enables me to avoid leaving the home row as I can stretch to that (Ctrl+F can be substituted in Visual Studio for a different type of find but equally effective for code navigation, and Ctrl+G to go to specific line numbers).

As an aside I feel speed is only useful after correctness and I'm not convinced that the time saved by not having to move from the home row to the cursor keys and back without looking at the keyboard is really that important when compared with getting the actual code written correctly. I've had several team mates over the years who appear to have favoured speed over quality and to me, that's bad - optimizing ones typing before one has actually learned to code things correctly seems like a waste of effort (of course, it's likely that they think I was slow and ineffective by contrast).

Of course, I totally understand the need to work quickly when one is a developer of quality, and efficient use of tools is a good thing.

Jeff Yates
Are you implying that I am not a "developer of quality" :)
Nick
Hahaha! Not at all. I apologise if it came across that way - I just wanted to think about the idea a bit more in depth. I am jealous of those who are good and fast as the fast part evades me (as does the good most days).
Jeff Yates