Marek Novotny <
marek....@marspolar.com> wrote:
> On 2016-12-24, Melzzzzz <
m...@zzzzz.com> wrote:
>> On Sat, 24 Dec 2016 17:14:57 +0000 (UTC)
>> deplorable owl <o...@rooftop.invalid> wrote:
>>
>>> Marek Novotny <
marek....@marspolar.com> wrote:
>>> > On 2016-12-24, deplorable owl <o...@rooftop.invalid> wrote:
>>> >> Melzzzzz <
m...@zzzzz.com> wrote:
>>> >>> On Sat, 24 Dec 2016 10:17:04 -0600
>>> >>> Marek Novotny <
marek....@marspolar.com> wrote:
>>> >>>
>>> >>>> On 2016-12-24, Melzzzzz <
m...@zzzzz.com> wrote:
>>> >>>> > On Fri, 23 Dec 2016 21:32:42 +0000 (UTC)
>>> >>>> > deplorable owl <o...@rooftop.invalid> wrote:
>>> >>>> >
>>> >>>> >> Melzzzzz <
Melz...@zzzzz.com> wrote:
>>> >>>> >> > On 2016-12-23, deplorable owl <o...@rooftop.invalid>
>>> >>>> >> > wrote:
>>> >>>> >> >> Melzzzzz <
Melz...@zzzzz.com> wrote:
>>> >>>> >>
>>> >>>> >> ...
>>> >>>> >>
>>> >>>> >> >>> Limit is that vim can's reformat quoted text passed to it
>>> >>>> >> >>> from slrn...
>>> >>>> >> >>
>>> >>>> >> >> Why not? It works fine as tin's editor.
>>> >>>> >> >
>>> >>>> >> > I just press ctrl-K-J and voila!
>>> >>>> >> >
>>> >>>> >>
>>> >>>> >> You said vim can't do whatever as editor for slrn. What
>>> >>>> >> can't it do?
>>> >>>> >> >>>
>>> >>>> >> >>> Hm, I think joe is better :P
>>> >>>> >> >>>
>>> >>>> >> >>
>>> >>>> >> >> Stick with vim for a while and you won't feel that
>>> >>>> >> >> way.
>>> >>>> >> >
>>> >>>> >> > I typed some C code with it. But this reformat thing is what
>>> >>>> >> > keeps me to stick with joe...
>>> >>>> >> >
>>> >>>> >>
>>> >>>> >> Give me an example of what you think you can't do easily in
>>> >>>> >> vim.
>>> >>>> >> >>
>>> >>>> >> >>> What is fmt BTW? What does it do?
>>> >>>> >> >>>
>>> >>>> >> >>
>>> >>>> >> >> anon@lowtide:~$ cat sometext
>>> >>>> >> >
>>> >>>> >> >> this is some text that needs formatting. Some of it is on
>>> >>>> >> >> a long line; some of it is on shorter lines. we want it
>>> >>>> >> >> all together and formatted together as it should be.
>>> >>>> >> >
>>> >>>> >> > ctrl-K-J and voila!!!
>>> >>>> >> >
>>> >>>> >>
>>> >>>> >> fmt -p ">"
>>> >>>> >
>>> >>>> > Nah, not even near what joe does ;(
>>> >>>>
>>> >>>> Something is not right. In this post I'll give you both a proper
>>> >>>> line and a long line to test the above. It really ought to work.
>>> >>>> I can't imagine what it isn't. You're on Linux, or a Mac? Maybe
>>> >>>> the fmt is different some how? Now this line is going to run on
>>> >>>> beyond the 72 limit and you should be able to fix that with the
>>> >>>> method above.
>>> >>>>
>>> >>>> So above you three lines proper and the 4th line runs on. You're
>>> >>>> saying that !fmt -p ">" failed to fix it? I don't see how that's
>>> >>>> possible, please try again.
>>> >>>>
>>> >>>
>>> >>> It fixes it but what it does actually is that each line is
>>> >>> wrapped not whole paragraph. And '>' character is not replicated
>>> >>> as original quote rather single '>' is added at each broken line.
>>> >>> That's not what I want.
>>> >>
>>> >> You newsreader should automatically quote normally for regular
>>> >> lines. For long lines, go to the offending line and use whatever
>>> >> starting quote string your newsreader has given it as the -p
>>> >> option for fmt:
>>> >>
>>> >>:.!fmt -p ">>>"
>>> >>
>>> >> The "." char after the ":" means "the current line."
>>> >>
>>> >>
https://vid.me/PKwh
>>> >>
>>> >> BTW, in my testing, joe's ctrl-K-J doesn't do what you want here
>>> >> either.
>>> >
>>> > I use visual first because there are often multiple lines, all long,
>>> > that I wish to reformat with a particular quantity of the >>> quote
>>> > levels. Not everything is just one line. I'll likely always use some
>>> > form of blocking. Either #gg and then V#gg or just V and then cursor
>>> > with j or k to get what I want. I like what you though.
>>> >
>>>
>>> Or just go to the first, knowing it's 5 lines to be affected, and:
>>>
>>> :.,+4!fmt -p ">>>"
>>>
>>> Or mark first and last as "a" and "b":
>>>
>>> :'a,'b!fmt -p ">>>"
>>>
>>> Or, knowing the line numbers,
>>>
>>> :30,35!fmt -p ">>>"
>>>
>>> I love vim.
>>>
>>
>> One have to be dedicated fun in order to love vim ;p
>> Just learning how to open several windows files. It might be that I'll
>> switch to it some time in future...
>
> It's strange at first. I always believe that those that try it will
> likely walk away from it in the first few minutes or day and not return
> to it. But for those that stick to it for maybe a week or more, it gets
> hard to walk away from. First time I tried it I had no idea how I got it
> to insert mode or what insert mode even was. And then I couldn't figure
> out how to save or exit. I thought, who the hell uses this???
>
> What caught me off guard was I was told some woman actually wrote her
> dissertation entirely in Vi. I thought, jez she must really like this
> editor. Why?
>
> Almost everytime I use something else, I find myself screwing up my text
> because I expect modes that aren't there. Now I love having modes. It's
> not for everyone. Kind of an acquired taste.
>
Aside from processing on the text itself, my other most-often used,
and most appreciated, capability of vim is cat'ing text into the
file. If the text you need to copy in is more than a screenful,
it's so much easier to just cat it from a file than it is to paint
and click.
:.!cat whatever
Alternatively, you can use the X selection manually by (in the
source file):
:%!xsel -i
(or similar on a range)
Then in the target file or post:
:.!xsel -o
This is helpful if you have an X server running but are on a VT at
the moment, in which case you have to specify the display:
:.!xsel -o --display :0
Let's face it. We all get tired of the GUI sometimes and like
to just relax and enjoy a pure CLI outside of X. :)
But X or not, vi's access to the shell makes it just awesome.