augroup NO_CURSOR_MOVE_ON_FOCUS au! au FocusLost * let g:oldmouse=&mouse | set mouse= au FocusGained * if exists('g:oldmouse') | let &mouse=g:oldmouse | unlet g:oldmouse | endif augroup END Alternatively, if you are on a system which allows this, simply clicking on the GUI window chrome instead of the buffer text should give Vim focus without changing the cursor position.
| Attributes | Values |
|---|---|
| rdfs:label |
|
| rdfs:comment |
|
| Version |
|
| dbkwik:vim/property/wikiPageUsesTemplate | |
| Previous |
|
| Subpage |
|
| Complexity |
|
| Created |
|
| ID |
|
| NEXT |
|
| abstract |
|