Re: Requesting vi tips

2019-10-20 Thread adr
marks are fairly useful and easy to define, though traditional vi doesn't keep them when swapping buffers, unfortunately. ... that's one of the main reasons why I've upgraded to vim. That and v, and multiple buffers visible at the same time. Just for the record, to not confuse the OP, vi in

Re: Requesting vi tips

2019-10-20 Thread Marc Espie
On Fri, Oct 18, 2019 at 03:45:42PM +0100, cho...@jtan.com wrote: > Claudio Jeker writes: > > set wl=72 will limit the line lenght to around 72. Additionally you > > can use !fmt with movement chars to reformat sections. I use !{fmt > > or {!}fmt frequently to reformat the paragraph I'm in. > > I

Re: Requesting vi tips

2019-10-19 Thread adr
You like emacs, so in .exrc map ^[q }{!}fmt -72 -s^M} The ^[ is an escape character, entered with the sequence C-vEsc. I think that your Meta key will produce one. C-v produce the character 0x16, used by nvi as , a character to escape other characters. The ^M is a , entered with the sequence

Re: Requesting vi tips

2019-10-18 Thread Christian Weisgerber
On 2019-10-18, Nam Nguyen wrote: >> Since 'q' is unused in nvi, I have this in my .nexrc: >> map q !}fmt > > I just wanted to add that you can Ctrl-v Enter to produce the ^M at the end. > This way it inputs and executes the command for you. > > It could be like this if you want it to press

Re: Requesting vi tips

2019-10-18 Thread Nam Nguyen
On 2019-10-18, Christian Weisgerber wrote: > On 2019-10-18, cho...@jtan.com wrote: > >> I didn't know [how] ! took movement commands. Thanks. I'll have a play >> with that one. >> >> It's not quite M-q (it's M not C) but I'm using vi after all. > > Since 'q' is unused in nvi, I have this in my

Re: Requesting vi tips

2019-10-18 Thread adr
On Fri, 18 Oct 2019, cho...@jtan.com wrote: For the record, I have a finite amount of neurons with a correspondingly finite amount of synapses. There is only so much even I can hold in my head. Asking actual humans for access to the particular minutiae they happen to have itemised to the nth

Re: Requesting vi tips

2019-10-18 Thread chohag
adr writes: > You see, is so easy to be an asshole. You're telling me? I know I'm not particularly active on OpenBSD's mailing lists but I've certainly been around. For the record, I have a finite amount of neurons with a correspondingly finite amount of synapses. There is only so much even I

Re: Requesting vi tips

2019-10-18 Thread Raf Czlonka
On Fri, Oct 18, 2019 at 03:39:41PM BST, cho...@jtan.com wrote: > Raf Czlonka writes: > > On Fri, Oct 18, 2019 at 03:12:37PM BST, cho...@jtan.com wrote: > > Is this what you had in mind? > > > > set editor="EXINIT='set wraplen=72' /usr/bin/vi" I forgot to mention - this is the line in my

Re: Requesting vi tips

2019-10-18 Thread adr
I didn't know [how] ! took movement commands. Thanks. I'll have a play with that one. It's not quite M-q (it's M not C) but I'm using vi after all. Matthew The entire man page is 1332 widely-spaced-out lines of clear, simple formated text. Including comments. Read the damn thing. You see, is

Re: Requesting vi tips

2019-10-18 Thread Christian Weisgerber
On 2019-10-18, cho...@jtan.com wrote: > I didn't know [how] ! took movement commands. Thanks. I'll have a play > with that one. > > It's not quite M-q (it's M not C) but I'm using vi after all. Since 'q' is unused in nvi, I have this in my .nexrc: map q !}fmt Close enough to emacs's M-q. --

Re: Requesting vi tips

2019-10-18 Thread Frank Beuth
On Fri, Oct 18, 2019 at 03:12:37PM +0100, cho...@jtan.com wrote: Alternatively is there something that would make vi do it on the fly, or something akin to emacs' C-q or vim's gq. Although I appreciate the fact that vi doesn't try to be clever. 1) select all text in visual mode (e.g with V,

about vim objects (Re: Requesting vi tips)

2019-10-18 Thread Marc Chantreux
hello, > I didn't know [how] ! took movement commands. Thanks. I'll have a play > with that one. almost related: in addition to the motions, vim has a notion of objects :h objects so you can easily filter a complete paragraph with !ap fmt -w72 in visual mode, you can select

Re: Requesting vi tips

2019-10-18 Thread paul wisehart
On Fri, Oct 18, 2019 at 03:12:37PM +0100, cho...@jtan.com wrote: > but I wonder if there's something that can correctly parse the > whole email and format the entire thing en masse :%!fmt -s

Re: Requesting vi tips

2019-10-18 Thread chohag
Claudio Jeker writes: > set wl=72 will limit the line lenght to around 72. Additionally you > can use !fmt with movement chars to reformat sections. I use !{fmt > or {!}fmt frequently to reformat the paragraph I'm in. I didn't know [how] ! took movement commands. Thanks. I'll have a play with

Re: Requesting vi tips

2019-10-18 Thread chohag
Raf Czlonka writes: > On Fri, Oct 18, 2019 at 03:12:37PM BST, cho...@jtan.com wrote: > Is this what you had in mind? > > set editor="EXINIT='set wraplen=72' /usr/bin/vi" I'm not sure that I'm happy with it doing it mid-insert. I'd prefer an explicit action or insert mode itself being

Re: Requesting vi tips

2019-10-18 Thread Claudio Jeker
On Fri, Oct 18, 2019 at 03:12:37PM +0100, cho...@jtan.com wrote: > OK this has started to get on my nerves now. > > I use vi to enter emails despite using evil emacs for development and > other general editing. Rather than linking them together (they're on > seperate machines) to enter emails in

Re: Requesting vi tips

2019-10-18 Thread Raf Czlonka
On Fri, Oct 18, 2019 at 03:12:37PM BST, cho...@jtan.com wrote: > OK this has started to get on my nerves now. > > I use vi to enter emails despite using evil emacs for development and > other general editing. Rather than linking them together (they're on > seperate machines) to enter emails in