Questions tagged [wrapping]
51 questions
15
votes
1 answer
Soft vs Hard word wrap in Emacs
There are (in my mind) two types of word wrapping:
Hard : Actually edit the file to have lines of a maximum length
Soft : Just wrap in the editor, but the underlying file still has long lines.
I can't figure out how to make Emacs do these two…

Chris Jefferson
- 253
- 2
- 6
12
votes
1 answer
Wrap lines at 80 characters
I'm using emacs 25.1.1 with the prelude config. In Atom I used to have a setting that made my lines wrap at 80 characters (without cutting words) for better readability. I've searched on the web for something similar for emacs but I have not found…

José María
- 273
- 1
- 2
- 5
12
votes
1 answer
How do I enable line numbers (on the left) every time when line is the long logical line
I have linum-mode enabled as well as truncate-lines. Works fine as long as Emacs displays column 0:
The line number is showed on left (OK)
But as soon as the window is scrolled horizontally, the line numbers disappear:
The line number is not…

user3875715
- 121
- 2
11
votes
2 answers
Word wrap line option by default
Recently I discovered emacs as a text editor for my latex documents. So far, I am excited with how powerful the editor is. However, I have a problem with line wrapping.
More precisely, in the option menu I choose line wrapping in this buffer -->…

Yorgos
- 255
- 2
- 9
8
votes
1 answer
How to word wrap within code blocks
I'm trying to get the formatting right for an org-mode file being exported to pdf. I set 'org-startup-truncated' to nil and that has resolved my word wrapping issues for non code blocks. But I cannot figure out how to set word wrapping or…

dmittakarin8
- 83
- 1
- 4
7
votes
2 answers
How to open .org files with visual-line-mode automatically turned on?
How to open .org and .txt files with visual-line-mode automatically turned on?
Also, is there a way to configure cursor-movement so that cursor moves as if the visual line where a logical line? line-move-visual is not effecting Spacemacs evil mode…

wolfv
- 1,403
- 1
- 13
- 30
6
votes
3 answers
How do I toggle soft-wrapped lines in org-mode?
I want to be able to toggle soft-wrapped lines in org-mode. My .emacs file has this code:
;;;;;;;;;;;;;;
;; Org Mode ;;
;;;;;;;;;;;;;;
(global-set-key "\C-cl" 'org-store-link)
(global-set-key "\C-ca" 'org-agenda)
(global-set-key "\C-cc"…

R891
- 161
- 1
- 4
4
votes
1 answer
How do I teach Emacs to re-wrap /* */ comments?
Is there an existing function, and if not how would I write one, that turns this:
/* asdasdasd asdasdasd asdasdasd */
/* asdasdasd asdasdasd asdasdasd asdasdasd asdasdasd */
/* asdasdasd asdasdasd asdasdasd asdasdasd asdasdasd asdasdasd */
/*…

Clément
- 3,924
- 1
- 22
- 37
4
votes
1 answer
Loading adaptive wrap as default
I've been using emacs for a long time but still have little understanding of elisp; I basically copy code I find on websites into my .emacs until it seems to do what I want.
I only recently discovered global-visual-line-mode (I had been using…

Steve Petersen
- 117
- 6
4
votes
3 answers
How to wrap line at some characters other than space?
How to set Emacs to wrap long line (using Visual Line Mode) at -, _, (, ) too, instead of just at spaces.
A sample line:
This is a long line with long words like…

aggu
- 91
- 2
4
votes
2 answers
Word wrap that preserves indent from previous line
This may really be a basic emacs lisp question, but I'm just starting to learn some Clojure -- tiptoeing along the first steps of the newbie's path -- and don't know any elisp yet.
How can one set Word Wrap mode to indent to the first character of…

Mallory-Erik
- 265
- 1
- 7
3
votes
0 answers
How to have a right line continuation indicator on the right of `word-wrap`ped lines without "having a right fringe" and while having a left fringe?
In Emacs, I want to have line continuation indicators (the curly arrows by default) shown before or after my wrapped text (e.g. in the fringes).
However:
I don't want want to be able to tell apart my right fringe from my buffer, either by not…

habit
- 143
- 4
3
votes
2 answers
How to disable line wrapping in LaTeX layer?
The LaTeX Layer by default wraps a line after column 85 by inserting a new line while typing and moving the current word to the new line. When the line is a comment, it even automatically inserts the comment prefix.
How can one disable this…

user905686
- 327
- 2
- 11
3
votes
0 answers
Output reflow in ansi-term
In gnome-terminal, the output of some commands is automatically "reflowed", in the sense that if the file tmp has content 0000000000 and the terminal has width 9, the output will be displayed as
$ cat tmp
000000000
0
but after resizing the terminal…

user355559
- 41
- 2
3
votes
1 answer
How to prevent line wrapping in code, but allow it in help/info buffers?
I'm quite new to emacs (coming from vim), and I'm struggling to figure out how to configure sane line-wrapping/truncation behavior.
For the most part, I'd like to prevent wrapping, so I put this in my init file:
(setq-default truncate-lines t)
But…

ivan
- 1,928
- 10
- 20