Home » Questions » Computers [ Ask a new question ]

VIM and putty - mouse issues

VIM and putty - mouse issues

"i'm not very experienced in VIM.
i'm using VIM with putty, and i often use mouse scroll and move text cursor with mouse. also sometimes i need to paste some code from windows clipboard, so i have to type "":set mouse="" to turn off mouse handling in VIM, paste the code with right mouse button and then turn mouse handling on again with "":set mouse=a"". i'm looking for a better way to do it."

Asked by: Guest | Views: 218
Total answers/comments: 1
Guest [Entry]

"Most VIM purists would tell you: ""Stop using the mouse for movement then"".

Hopefully someone who uses the mouse in VIM can help you with making the mouse stuff work better, but if you're interested, I suggest the following helpful key combos to make moving your cursor/view easier in VIM:

h,j,k,l: left, down, up, right.
H: Move cursor to the top of the visible screen.
L: Move cursor to the bottom of the visible screen.
G: Move cursor to the bottom of the file.
gg: Move cursor to the top of the file.
$: Move cursor to the end of the current line.
0: Move cursor to the very beginning of the current line.
^: Move cursor to the first non-whitespace character of the current line.
Ctrl + f: Move forward/down one page.
Ctrl + b: Move back/up one page.

Hopefully those help free you from the mouse, if you're interested, if not, hopefully someone has some mouse suggestions."