Questions tagged [wrapping]
The wrapping tag has no usage guidance.
52
questions
1
vote
1
answer
47
views
Text wrapping in different major modes
I visit a new file, Fundamental mode is automatically selected and newly inserted long lines are wrapped automatically.
I create an .org file, Org mode is automatically selected, I manually select ...
0
votes
1
answer
159
views
Hard wrap in Doom Emacs
I'm trying Doom Emacs and immediately miss my hard wrap after 80 cols such as
(setq-default fill-column 80)
(setf fill-column 80)
(add-hook 'latex-mode-hook #'auto-fill-mode)
(add-hook 'prolog-mode-...
1
vote
1
answer
71
views
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. ...
3
votes
0
answers
55
views
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 ...
0
votes
2
answers
229
views
continuation markers in terminal visual-line-mode
How do I get continuation indicators (a character indicator at the far right edge, normally \) in visual-line mode when I'm working in a terminal emacs. FYI, the continuation markers on visual-line-...
0
votes
1
answer
56
views
How to change this wrap-region configuration on the init file from the classic imperative installation to a declarative approach via use-package?
When I first installed wrap-region, I used to install things via the classic M-x and package-install. Then, I inserted the following configuration:
;; Emacs minor mode to wrap region with tag or ...
0
votes
3
answers
91
views
Can environments be easily wrapped with AUCTeX?
I want to quickly wrap certain environments my cursor is within with text.
In my specific situation, I want to wrap the frame environment with the text
\makeatletter
\gdef\beamer@currentmode{beamer}
\...
0
votes
0
answers
37
views
How do I get the Fringe curved arrows to show in word wrap mode?
So I really like those curved arrows that appear in the Wrap at Window Edge option, like in this image:
But i don't like that it breaks the words at random places, in this respect I like that the ...
0
votes
1
answer
171
views
python-docstring-fill does not align properly
I am using python-docstring-fill (function of https://github.com/glyph/python-docstring-mode) to wrap Python docstrings. I observe that it does not align based the Python-way. It should be as:
"&...
2
votes
3
answers
516
views
Is there a command to wrap a characters in a word using Emacs? Or something to insert "/" around a word while using org-mode?
In org-mode, writing a word wrapped by / makes it italic. For instance, /word/ becomes word.
Is there a command in Emacs to make something go from ẁord to /word/?
Maybe some org related command only ...
1
vote
0
answers
48
views
How to ignore mail header in mu4e for visual-fill-column-mode
When setting a mu4e-view-mode-hook to fill columns for easy reading and without having to hard wrap the lines with fill-mode, then it also wraps the mail header, what makes it rather unreadable. Is ...
3
votes
0
answers
89
views
Line wrapping in select parts of buffer
When modifying an org buffer, is it possible to have line wrap selectively in different sections of the buffer?
I would to wrap my text outside code blocks. But inside the code blocks, we get some ...
2
votes
1
answer
471
views
Spacemacs move cursor using word wrap, not line breaks
I would like to be able to move the cursor around using the visual buffer, but I don't want to add line breaks to the source file. I'm not sure a better way to describe it, so I got some gif examples.
...
1
vote
0
answers
54
views
Left-align text with `visual-line-mode` and `adaptive-wrap-prefix-mode`
When I use visual-line-mode in conjunction with adaptive-wrap-prefix-mode, the wrapped text is not perfectly left-aligned (i.e. the text is not on a straight edge). Instead, it looks like this:
Is it ...
0
votes
0
answers
189
views
Wait for specific keypress in a function (press enter to continue)
I have a function to underline Chinese characters with zero width spaces in org-mode.
(defun ctext-uline-begin ()
"Underscore with invisible space before for underlining Chinese texts."
(insert "...
0
votes
0
answers
31
views
Problem with org-export: how to avoid hard-wrapping when exporting to text?
When I export my org buffer to text, I would like not to have it hard-wrapped.
I do not know how to disable this feature. I have asked previously years ago, but have not found an answer for this ...
2
votes
0
answers
82
views
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 ...
1
vote
1
answer
100
views
Break a long string in a concatenation of shorter ones
Is there a predefined way to split
"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud ...
2
votes
1
answer
645
views
Automatically indent ONLY logical lines in Org-mode
I want this:
** This is a heading
This is a logical line. But, because I have visual-line-mode on, lines
will wrap at the edge, as is just and godly. But, such elegant formatting
as you see here ...
0
votes
3
answers
644
views
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 ...
1
vote
1
answer
727
views
Make soft word wrap not cut words in the middle of the line?
Currently, in text files, Emacs is wrapping text (soft wrap), but if a word is at the end of the line, then it puts half of the word at the end of the line and the second half at the beginning of the ...
3
votes
2
answers
1k
views
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 ...
2
votes
1
answer
91
views
Preventing syntax highlighting in the wrap-prefix
When Emacs wraps long lines, is there a way to prevent the wrap prefix from having syntax highlighting (font-lock) or any such special properties?
Specifically, I have the following settings:
;; ...
1
vote
0
answers
199
views
Make adaptive-wrap tab aware
I am switching to AUCTeX as my LaTeX editor and need tab-aware automatic line wrapping. From this question on stackoverflow I gathered that adaptive-wrap is basically what I need.
How can I make ...
3
votes
0
answers
269
views
Output reflow in ansi-term [duplicate]
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
$ ...
1
vote
1
answer
573
views
How to turn off line wrap when opening from terminal
I'm trying to open a file from terminal and ensure that line-wrap will be off. I'm trying the following code, but it won't work
emacs --no-window-system --eval '(setq truncate-lines 1)' file
I don't ...
0
votes
1
answer
20
views
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 ...
2
votes
2
answers
2k
views
Split line every n characters
I have a long binary string that I would like to split every 32 characters. Is there a command that can do this for me?
I have tried word wrapping, but it splits per word. It has no effect since a ...
2
votes
1
answer
445
views
No visual-line-mode in emacs! How to set line wrap?
I am using Emacs on mac osx 10.7*. I have the LongLines mode where long sentences are truncated on screen with $ symbol. M-x visual-line-mode does not exist in my Emacs. That is when I type M-x and ...
2
votes
2
answers
3k
views
how to set truncate-lines in org-mode in spacemacs by default
Whenever I open up an .org file in spacemacs, the truncate-lines variable is set to t.
How can I make truncate-lines be set to nil by default in org-mode in the org-layer for spacemacs?
I would like ...
0
votes
1
answer
420
views
In Spacemacs, how can I conditionally set line-wrapping on only for text files (i.e. in text mode)?
I want to have Spacemacs wrap around long lines, but only in text files (i.e. text mode), not in programming language files (i.e. program mode).
How could one achieve that? I know that to turn on ...
4
votes
1
answer
449
views
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 ...
7
votes
2
answers
4k
views
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-...
8
votes
1
answer
4k
views
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 ...
12
votes
1
answer
17k
views
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 ...
6
votes
3
answers
9k
views
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"...
0
votes
1
answer
256
views
Show cut-off line in mini buffer?
When using ECB, the lines for function names are often long and get cut-off in the sidebar:
Is there a way to show the full line that the cursor is at in the mini buffer when it is cut off due to its ...
0
votes
2
answers
628
views
Configure smartparens wrapping to work in evil-visual-state?
I've been migrating from Vim to Emacs in evil mode, and I'd like to use smartparens. I know there's a port of surround.vim, but I've always found surround.vim awkward to use, so I'd like to explore an ...
15
votes
1
answer
4k
views
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'...
1
vote
0
answers
81
views
Increase spacing between physical lines only
How can I add spacing where there are linebreaks in the file, but not where a line is word-wrapped? This would be very useful for reading log files with long lines. Here's a mockup of what I'm after:
...
1
vote
1
answer
337
views
Extra indents in adaptive-wrap mode only for lines beginning with \item
When using the adaptive-wrap mode in the plain latex-mode (no AUCTeX), I want to give extra indents to only lines beginning with "\item". For example, I currently have:
\begin{itemize}
\...
1
vote
0
answers
549
views
Org column-view with visual-line-mode?
I want to enable visual-line-mode for use with org-column-view, so that the text under each headline wraps underneath. Here is a sample "shopping list" to illustrate what I mean:
Notice how the item'...
4
votes
1
answer
783
views
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 ...
2
votes
2
answers
3k
views
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 ...
3
votes
1
answer
631
views
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 ...
12
votes
1
answer
557
views
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 ...
1
vote
1
answer
44
views
What module handles word+period within paragraph fill?
I'm experienced with elisp, and I'm using emacs 24.5.
I want to modify how fill-paragraph works for a special application, and I'm trying to figure out which elisp code handles the case where a short ...
11
votes
3
answers
9k
views
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 ...
1
vote
1
answer
831
views
Auto-resize window widths to accomodate line length
What is an easy way to automatically resize a window (height and or width) according to the length / line length of the buffer?
Possible behavior: A frame split horizontally with two windows with the ...
5
votes
3
answers
943
views
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 long-long-long-long-long-long-long-...