As of May 31, 2023, we have updated our Code of Conduct.

Questions tagged [textwidth]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
2 votes
2 answers
29 views

Command to set the window width

Using MacVim, I can manually drag the edge of the window (watching the numbers in the title bar) to whatever width I want. Is there a command that will just immediately set it to a desired width? I ...
RadlyEel's user avatar
  • 141
1 vote
1 answer
25 views

What is changing the textwidth on rust files?

This seems like a bizarre behavior to me. I've set the textwidth to 88, but I've noticed that, when editing a .rs file, something sets it to 99. At first I though it must be some plugin or formatting ...
videbar's user avatar
  • 13
1 vote
2 answers
179 views

How to format text with gq by cutting long lines but without joining shorter lines?

I don't understand what shall I set (I guess fo, but how?) for cutting lines that are longer than textwidth but without joining lines that are shorter. For example, assume that I have textwidth option ...
Barzi2001's user avatar
  • 404
0 votes
0 answers
22 views

UltiSnips Latex snippet does not work correctly when wrapped around due to textwidth setting

Given snippet: snippet mm "Inline Math" wA \\( $1 \\) $0 endsnippet which inserts inline math mode in LaTeX: \( | \) where cursor position is | and following .vimrc: "-------------Load ...
Tryer's user avatar
  • 227
0 votes
0 answers
10 views

The textwidth setting result in strange behaviour or not?

All setting related to the textwidth in .vimrc: set fo+=w set wrap set formatoptions+=a autocmd FileType * setlocal textwidth=120 I found some strange behaviour in editing. Press i for two times ,...
newview's user avatar
  • 291
2 votes
1 answer
35 views

How can make every line contain 80 characters when to insert lorem ipsum string?

set textwidth=80 in my .vimrc. I have written a function to create a lorem ipsum: function! Lorem(num) python3 << EOF import random num = int(vim.eval("a:num")) words = ['...
newview's user avatar
  • 291
0 votes
1 answer
55 views

How did gggqG format the file?

I have set textwidth in .vimrc: set tw=80 Format the sample file with gggqG: test ======================= :: words_en = ['exercitationem', 'perferendis', 'perspiciatis', 'laborum', 'eveniet', ...
newview's user avatar
  • 291
0 votes
0 answers
284 views

Text width not working in markdown files?

I use vim pencil which has a setting called vim.opt.textwidth = 80. I also have this in my init.vim (neovim): let g:pencil#textwidth = 80 But when I am writing in markdown files, the text takes up the ...
Vinn's user avatar
  • 607
1 vote
1 answer
37 views

Why `textwidth` gives me the same effect as `linebreak`?

Could anybody explain, why textwidth works gives me the same effect as linebreak? Example 1. If I type aaaaaaaaaaaaaaaaaaa several times, the last aaa... is wrapped to the next line. linebreak is off, ...
user90726's user avatar
3 votes
1 answer
161 views

Reformatting comments with gq, using spaces in 'comments'

I'm using Prettier to automatically reformat JavaScript (well, TypeScript, but same deal in this situation) source-code. It enforces a comment-style like this, with leading spaces replaced with ·: ···/...
ELLIOTTCABLE's user avatar
3 votes
1 answer
144 views

LaTeX: turn off text wrap and auto indent in maths environments

I use vim with vim-latex for editing latex files. I always have hard wrapping enabled using set tw=80. I also have the default vim-latex auto indent settings enabled. I wonder if there is a way to ...
chaffdog's user avatar
  • 131
1 vote
0 answers
212 views

gvim vs. xterm: what's wrong with my guifont?

The 10x20 is the (alias for) font I use with xterm -- and I like it. Both for shell-commands and vi/vim. Yet, when I use the :set guifont=10x20, I get "w i d e l y" spaced characters for ...
Mikhail T.'s user avatar
0 votes
1 answer
249 views

Setting `colorcolumn` to the value of `textwidth` has no effect?

I want to mark the textwidthth column using colorcolumn and have used the following (since I have slightly different textwidths for different files) au FileType py set textwidth=80 (say line 98) au ...
First User's user avatar