The command C-l scrolls the current line to center, top, bottom. Is there an analogous command that scrolls the current column to center, left, and right?

1 Answer 1


There doesn't seem to be one built-in, however, there is something similar: M-g TAB - this will ask you for the column to move to. You can use the function below (bind it to some key you like) to do exactly what you ask:

(defun my/goto-midline ()
   (+ (point)
        (/ (- (progn
                (move-end-of-line 1) (point))
                (move-beginning-of-line 0) (point)))

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.