4

For example, I got a small window, a long whole line is split into multiple lines, not actually split, but with one arrow at the end of each line of the window, if I use C-e or End key, this will move end point to the end of this actual line.

(setq truncate-lines nil)is set in my init.el, how can I move my point to the end of the window/screen line?

2 Answers 2

3

You want visual-line-mode. You can enable it with M-x visual-line-mode.

See the EmacsWiki on:

See the GNU Emacs manual on:

3
  • No, I don't want to enable visual-line-mode, I just want the whole line that way in Emacs, I already find the solution, I can use beginning/end-of-visual-line. Commented May 26, 2015 at 3:51
  • 2
    Okay then, post it as an answer and wait for answer-own-question time limit. Commented May 26, 2015 at 3:53
  • 1
    For anyone who may be interested to know, enabling visual-line-mode remaps move-beginning-of-line to beginning-of-visual-line; and move-end-of-line to end-of-visual-line. For those who prefer that whole words not be broken up at widow-edge, visual-line-mode offers a wonderful built-in alternative. This is also ideal for anyone with a word-processing background. Commented May 26, 2015 at 4:04
3

I already find the solution, I can use beginning/end-of-visual-line

(global-set-key (kbd "C-S-e") 'end-of-visual-line) (global-set-key (kbd "C-S-a") 'beginning-of-visual-line) 

Now, use C-S-a/e to do that motion.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.