Here's another command I'd like added to .vimrc to change a really annoying default.
Could set showbreak=>\ wrap linebreak textwidth=0 please be added to /etc/skel/.vimrc in the user-settings package to stop vim auto-wrapping (at a silly width) and provide a marker when you reach the edge of the screen/window instead.
Thanks.
-pwatk
vimrc disable auto-wrap
Re: vimrc disable auto-wrap
Well, ok... I guess we can have that. But I don't like the "wrap" text showing up. How about something like:
Code: Select all
set showbreak=>>\ linebreak textwidth=0
Re: vimrc disable auto-wrap
That'll teach me not to blindly copy commands from web pages
.
The "wrap" is supposed to be part of the command but for some reason it's being printed on screen when the terminal has a small enough geometry. I didn't notice this until I saw your post and started playing around with it though.
This fixes the problem:

The "wrap" is supposed to be part of the command but for some reason it's being printed on screen when the terminal has a small enough geometry. I didn't notice this until I saw your post and started playing around with it though.
This fixes the problem:
Code: Select all
:set wrap linebreak textwidth=0 showbreak=>>
Re: vimrc disable auto-wrap
I'm not sure I like that. There are a lot of people (including me) that use vim as a text editor (not a code editor) and being able to view the entire paragraph you're writing is a must have.
I'd like to have more opinions on this.
I'd like to have more opinions on this.
Re: vimrc disable auto-wrap
I agree with pwatk.
Like this :
All this sentence is a one-liner
++
You will see your entire paragraph.and being able to view the entire paragraph you're writing is a must have.
Like this :
Code: Select all
Lorem Ipsum is simply dummy text of the printing and typesetting industry.
>>Lorem Ipsum has been the industry's standard dummy text ever since
>>the 1500s, when an unknown printer took a galley of type and scrambled
>> it to make a type specimen book. It has survived not only five centuries
>>, but also the leap into electronic typesetting, remaining essentially
>>unchanged. It was popularised in the 1960s with the release of Letraset
>>sheets containing Lorem Ipsum passages, and more recently with desktop
>> publishing software like Aldus PageMaker including versions of Lorem Ipsum.
++
Re: vimrc disable auto-wrap
You're right, I seem to have mistyped that somehow. Well, I'm ok with that. Although I'm not sure what the difference is between the one I posted and the last one.
Re: vimrc disable auto-wrap
I use vim as an editor for composing emails in alpine, and I'm not altogether sure what this change would do, but the current default works well in terms of wrapping.
I'd like to learn more about this sort of thing, though. Sometimes my emails get indented as though they were code. On the other hand, I'm now starting to code too, and the indenting isn't always the way I want it.
I suppose what I'm trying to say is if you know how these things work ... you can always change it. The real problem is people like me who haven't worked it out yet.
Defaults should ideally be transparent and well-commented in the config fle to help on the learning curve, i.e. nothing too tricksy. Not that I'm saying what is being proposed here is that; but I still don't understand it.
EDIT
fredg, that looks ugly

I'd like to learn more about this sort of thing, though. Sometimes my emails get indented as though they were code. On the other hand, I'm now starting to code too, and the indenting isn't always the way I want it.
I suppose what I'm trying to say is if you know how these things work ... you can always change it. The real problem is people like me who haven't worked it out yet.

EDIT
fredg, that looks ugly

Re: vimrc disable auto-wrap
set wrap textwidth=0 stops vim line wrapping at a silly invisible margin. At the very least keep this.
set linebreak showbreak=>> displays the >> to denote a break when you finally hit the edge of the screen on a single line.
-pwatk
set linebreak showbreak=>> displays the >> to denote a break when you finally hit the edge of the screen on a single line.
-pwatk
Re: vimrc disable auto-wrap
Thanks for the explanation, pwatk.
I'll try putting these in my .vimrc and continue using vim to write email for a while.
You say the existing wrap width is "silly". No doubt it wasn't set with alpine users in mind - and maybe alpine is already doing something to change the behaviour when it calls vim. But what *did* they have in mind, the vim devs, and what is the width, anyway?
I am dimly aware that line wrapping is an important issue with clients such as pine, so that different defaults used by the clients of your correspondents don't produce unreadable text when you (or they) scroll down to see what was said a day or two ago. But maybe alpine deals with this satisfactorily, whatever editor you use?
I also wonder how those >> might interact with the use of similar symbols to indicate text you are replying to (and so on, till >>>>>> recursively takes over the screen).
I'll try putting these in my .vimrc and continue using vim to write email for a while.
You say the existing wrap width is "silly". No doubt it wasn't set with alpine users in mind - and maybe alpine is already doing something to change the behaviour when it calls vim. But what *did* they have in mind, the vim devs, and what is the width, anyway?
I am dimly aware that line wrapping is an important issue with clients such as pine, so that different defaults used by the clients of your correspondents don't produce unreadable text when you (or they) scroll down to see what was said a day or two ago. But maybe alpine deals with this satisfactorily, whatever editor you use?
I also wonder how those >> might interact with the use of similar symbols to indicate text you are replying to (and so on, till >>>>>> recursively takes over the screen).
Re: vimrc disable auto-wrap
Sorry, I actually got that wrong. Use :set wrap linebreak textwidth=0 to force vim to only wrap the text when you hit the end of the screen/terminal. I would like this to be added at the very least.
The current default is to wrap text at a very short, fixed margin which IMO is very annoying.
You can add what ever showbreak= option you like to denote a line break or just leave it off.
-pwatk
The current default is to wrap text at a very short, fixed margin which IMO is very annoying.
You can add what ever showbreak= option you like to denote a line break or just leave it off.
-pwatk