emacs里有将光标移动到当前行的行头(move-beginning-of-line)和行尾(move-end-of-line)的函数,但没有移动到当前行中间的函数
我自己写了一个,如下:
(defun move-middle-of-line () "Move point to the middle of line current displayed" (interactive) (message "move to middle of line, cur=%d." (current-column)) (end-of-line) (backward-char (/ (current-column) 2)))
原文:http://blog.csdn.net/loveaborn/article/details/18565205