this feature would go nicely with emmet mode. With emmet-mode, I can expand



But after i enter something in between first tags. i have to scroll to the right position on moving to next line which is inconvinient.

This lock i'm looking for would do awesome job.

1 Answer 1


set-goal-column might be what you're looking for :

set-goal-column is an interactive compiled Lisp function in

It is bound to C-x C-n.

(set-goal-column ARG)

Set the current horizontal position as a goal for C-n and C-p.
Those commands will move to this position in the line moved to
rather than trying to keep the same horizontal position.
With a non-nil argument ARG, clears out the goal column
so that C-n and C-p resume vertical motion.
The goal column is stored in the variable `goal-column'.

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.