Vim Tips Wiki
No edit summary
 
m (Fixed formatting, added category)
Line 10: Line 10:
 
|text=
 
|text=
 
My favorite way to move around is to use the pattern search. It is mapped to / by default, but this key is a little difficult to reach with the little finger, i.e. when touch typing. Thus, I mapped the search command to the biggest key on the keyboard: the space bar, because I noticed that I never used its default mapping (move the cursor forward one character).
 
My favorite way to move around is to use the pattern search. It is mapped to / by default, but this key is a little difficult to reach with the little finger, i.e. when touch typing. Thus, I mapped the search command to the biggest key on the keyboard: the space bar, because I noticed that I never used its default mapping (move the cursor forward one character).
  +
<pre>
 
 
 
 
nmap &lt;Space&gt; /
 
nmap &lt;Space&gt; /
 
 
nmap &lt;C-Space&gt; ?
 
nmap &lt;C-Space&gt; ?
  +
</pre>
 
 
 
 
This sounds like a small change but it astoundingly increases convenience in every day work.
 
This sounds like a small change but it astoundingly increases convenience in every day work.
 
 
 
 
 
}}
 
}}
   
Line 43: Line 34:
 
, September 14, 2005 8:08
 
, September 14, 2005 8:08
 
----
 
----
  +
[[Category:Map]][[Category:Searching]]
<!-- parsed by vimtips.py in 0.429626 seconds-->
 

Revision as of 20:41, 19 September 2007

Previous TipNext Tip

Tip: #979 - Short mappings for common tasks

Created: August 27, 2005 4:50 Complexity: basic Author: klausenhausen Version: 5.7 Karma: 13/16 Imported from: Tip#979

My favorite way to move around is to use the pattern search. It is mapped to / by default, but this key is a little difficult to reach with the little finger, i.e. when touch typing. Thus, I mapped the search command to the biggest key on the keyboard: the space bar, because I noticed that I never used its default mapping (move the cursor forward one character).

nmap <Space> / 
nmap <C-Space> ? 

This sounds like a small change but it astoundingly increases convenience in every day work.

Comments

I have space mapped to <C-f>. Another variation on the theme...

Anonymous , August 27, 2005 20:21


Space or pattern search?

Anonymous , August 31, 2005 7:31


Actually, the key I use most in normal mode is ':'. That's what I've mapped to my space bar.

mail--AT--mbant.de , September 14, 2005 8:08