Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

I have seen several questions on here about touch typing and words per minute but not about improving ones ability to manipulate text using keyboard shortcuts, bindings etc.

I have tried putting a cheat sheet of keyboard shortcuts next to my monitor but I can never incorporate them in my 'flow'. I have also tried the 'just use vi and don't touch the mouse' method but that only helps me with navigating code and not editing.

I would prefer to use some application (or game) to learn text manipulation. But it looks like nothing like that exists (app idea?). I'm open to other suggestions too.

share|improve this question
    
What kind of manipulation are you talking about? VIM provides plenty of keystrokes for copying/moving blocks of code and full incorporates RE in it's search and replace tools. Or do you mean refactoring support, like chaining the name of class or it's member functions? –  Charles E. Grant Mar 19 '12 at 19:05
2  
The only way to integrate any technique with your "flow" is to use that technique repeatedly and the only way you're going to get that is to ... use that technique repeatedly. Trust that it'll automatically happen while you work. And while you're at it I wouldn't disparage "navigating code" because that is literally 90% of manipulation skill and your coding time right there... –  Patrick Hughes Mar 19 '12 at 19:11

3 Answers 3

up vote 2 down vote accepted

cheat sheet of keyboard shortcuts

This stuff is definitely only going to come with practice. If you have to look at a cheat sheet every time you need to look up a shortcut, you'll never remember it. You have to use it lots, if you do it enough, you'll probably end up practically forgetting exactly what the shortcut is, and just do it automatically, much like a good touch typist would probably have to think for a couple of seconds if you asked where a specific character was on the keyboard, even though they'd be able to type it in 0.3s when they weren't thinking about it...

the 'just use vi and don't touch the mouse' method

If you still want to try this approach, and are just looking for a method of getting a better feel for vim editing more quickly, I'd recommend trying VimGolf. It allows you to practice your moves, and see other ways that people get the same job done.

share|improve this answer
    
Thanks for pointing out VimGolf. This is almost exactly what I was looking for. –  Steve Moser Mar 22 '12 at 17:02

I have also tried the 'just use vi and don't touch the mouse' method but that only helps me with navigating code and not editing.

This is the most effective method. If this method only helped you with navigating code, then you must not have tried it for long enough or for enough tasks.

  • Instead of highlighting a line with the mouse, use Home, Shift+End
  • Instead of clicking in a line to get the cursor where you want it, get to the line using up and down arrows(or page up & down) and use Ctrl+left & Ctrl+right to navigate to the desired location in the line.
  • Highlight sections of lines using Ctrl+Shift+left & Ctrl+Shift+right
  • Instead of cutting and pasting a line to move it, use Alt+up and Alt+down to move the line (this only works in some IDEs).
  • Memorize all of the shortcuts for things like build, run, test, find, find-in-project, find-replace and USE THEM instead of mousing through menus.

The key is to be consistent and disciplined, denying yourself the use of the mouse for a long period of time. It will be tedious at first, but sooner or later, you'll stop reaching for it and you'll be able to edit quicker without a mouse than you ever did with it.

share|improve this answer
    
Writing a word/typing game which is navigated/played with vi keyboard shortcuts sounds like a fun pass time or school project assignment –  blueberryfields Mar 19 '12 at 20:48
    
You want to spend time at a keyboard and not write code? The mind boggles =) –  Patrick Hughes Mar 20 '12 at 2:30

I have also tried the 'just use vi and don't touch the mouse' method

For how long? Like touch typing, it will take a while to learn. But if you stick to it eventually you will stop thinking about individual keystrokes, and just do it.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.