Created
March 21, 2016 17:04
-
-
Save colwem/7b6fc77b6720ce31c1ca to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function! MoveToMiddle() | |
| let end = strdisplaywidth(substitute(getline('.'), '\s*$', '', '')) | |
| let start = indent('.') | |
| call cursor(0, (start + end)/2) | |
| endfunction | |
| map gm :call MoveToMiddle()<cr> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment