Questions tagged [wrapping]

53 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
5
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
  • 101
  • 3
3
votes
0 answers

Line wrapping with prefix

I'm using the answer from https://stackoverflow.com/questions/13559061/emacs-how-to-keep-the-indentation-level-of-a-very-long-wrapped-line but can't make it do exactly what I want If I have this long line of code: if some_condition: then some…
obadz
  • 131
  • 1
2
votes
0 answers

configuring the word boundary for word-wrap

Is there a way to configure the word boundary character used for word-wrap like breakat option of vim? The documentation says "When word-wrapping is on, continuation lines are wrapped at the space or tab character nearest to the right window edge".…
Blank_
  • 25
  • 3
2
votes
2 answers

Wrap/trunc text at 80 column width

Is it possible to wrap text automatically at 80 column length? I mean, writing code or text and then, when I reach 80 characters, put a breakline and continue on the next line (not wrapping the word but putting on the next line). Thank you!
user11867
1
vote
1 answer

Bug or feature? Sudden wrapping of lines when window width increases

Context: GNU Emacs 29.0.60 (build 1, x86_64-pc-linux-gnu, X toolkit, cairo version 1.16.0, Xaw3d scroll bars) of 2023-03-30, Development version 4508a024e818 on emacs-29 branch; build date 2023-03-30. Linux Mint 21 (Vanessa) Cinnamon: ~ $ emacs -Q…
Claudio
  • 450
  • 3
  • 12
0
votes
3 answers

Use adaptive wrapping only in one specific major mode

I am using adaptive wrapping (see Correct indentation for wrapped lines) but it applies to all major modes. I would like to only use it for html. What I have tried so far is adding the following to my .emacs file: (add-hook 'html-mode-hook …
Vincent
  • 216
  • 1
  • 8
0
votes
1 answer

line wrapping is adding unwanted prefix text

Somehow, I must have clicked something that makes my line wrap (M-q) insert text. Here is an example: line I want to wrap: - also copied it into the loop that gets executed every time - now we always get degraded results! results of wrapping: -…