Wikia

Vim Tips Wiki

Changes: Easy block selection with mouse

Edit

Back to page

(Comments)
(Standard category names + minor manual clean.)
 
Line 5: Line 5:
 
|previous=1131
 
|previous=1131
 
|next=1133
 
|next=1133
|created=February 16, 2006
+
|created=2006
 
|complexity=basic
 
|complexity=basic
 
|author=Georg Dahn
 
|author=Georg Dahn

Latest revision as of 04:13, May 16, 2012

Duplicate tip

This tip is very similar to the following:

These tips need to be merged – see the merge guidelines.

Tip 1132 Printable Monobook Previous Next

created 2006 · complexity basic · author Georg Dahn · version 6.0


In some editors it is possible to make a block selection by holding the Alt-key and the left mouse key. Since <M-LeftMouse> is not used in Vim, nor is <M-LeftDrag>, it is reasonable to enable this behavior in Vim, too. To do this, just add the following mappings to your vimrc file:

noremap <M-LeftMouse> <4-LeftMouse>
inoremap <M-LeftMouse> <4-LeftMouse>
onoremap <M-LeftMouse> <C-C><4-LeftMouse>
noremap <M-LeftDrag> <LeftDrag>
inoremap <M-LeftDrag> <LeftDrag>
onoremap <M-LeftDrag> <C-C><LeftDrag>

CommentsEdit

At least on gnome the alt+mouse-left key is used to move the application window around.

KDE too.


On X Servers in general that is alt+left mouse, but no one prevents you from using any mapping unused for you to do the same if you need it


Around Wikia's network

Random Wiki