TIP: Click on subject to list as thread! ANSI
echo: rberrypi
to: CHARLIE GIBBS
from: RICKMAN
date: 2017-04-04 19:45:00
subject: Re: 64Gbyte flash memory

On 4/4/2017 7:06 PM, Charlie Gibbs wrote:
> On 2017-04-04, rickman  wrote:
>
>> On 4/4/2017 3:36 PM, Charlie Gibbs wrote:
>>
>>> On 2017-04-04, rickman  wrote:
>>>
>>>> On 4/4/2017 6:27 AM, Kerr Mudd-John wrote:
>>>>
>>>>> I'm thinking of getting it vaguely back on topic-ish as Yet Another vi v
>>>>> emacs debate!
>>>>
>>>> Which side are you on.  My old editor, Codewright has had a stroke and I
>>>> am finally learning a new one so I can use the same editor on the rPi
>>>> and the PC.  Right now I am struggling to learn Emacs as I have heard so
>>>> much good about it.  But it doesn't do much through the GUI.  :(
>>>
>>> I took a look at emacs a while ago.  However it was just a bit too
>>> foreign to wrap my head around.  I think tab handling was the straw
>>> that broke the camel's back.
>>
>> What does it do with tabs?  Codewright could be pretty weird.  The
>> choices were to replace tabs with spaces (which means deleting them is a
>> PITA) or using tabs (which means putting them in lots of times when you
>> are trying not to).  Didn't seem to have a middle ground of inserting
>> tabs when you hit the tab key one.  But maybe I missed an option or two.
>
> That's the problem I was having.  I'm stuck in a nasty middle ground where
> I want to indent my C code by multiples of 4 spaces, and many programs
> (e.g. cat) assume a tab every 8 spaces.  So I wind up typing 4 spaces
> for the first level of indentation, tab for the second level, tab plus
> four spaces for the third level, two tabs for the fourth, etc.  I'm the
> first to admit that it's ugly - especially when moving a block of code
> and changing its indentation.  But the only alternative is to do away
> with tabs altogether, and as you say it's a PITA.  I can't remember just
> what emacs did or how much work I'd have to do to make it work, but it
> was almost as ugly, and not too compatible with cat and friends.

CW didn't deal with that.  I would set the tab to 4 spaces.  I find many
editing programs have the ability to configure the tab size.  So that
wasn't the problem.  When you hit return CW would auto indent to match
the previous line and if that meant tabs were needed, you got tabs.
Backspace a couple of chars and you suddenly backspace by four.  Not
every file or every line in the file was aligned to tabstops.  Likewise,
inserting spaces had to be done at the right point or it was just adding
spaces in front of the tab.  I would have liked it to have inserted
spaces, but allow me to backspace by tabstops somehow when needed.


>>>> Does VI even run on the PC?  How well does it deal with the Unix NL vs.
>>>> PC CR/LF issue?  Codewright would just preserve what it saw used in the
>>>> file being edited.  That was *great*.
>>>
>>> Dunno about a Windoze version of vi, but I'm sure something exists.
>>> However, if I call up a file that has CRLF line endings in vi on my Linux
>>> box, each line has a blue "^M" at the end; the CRLF endings are preserved.
>>
>> What did it do on your Linux box when you opened a DOS file and typed
>> some extra lines?  Did the new lines have the CR inserted too?
>
> (I couldn't remember so I did a quick test just now.)  No, they went
> in with LF only, just like a normal *n*x line.  I could delete the ^M
> character at the end of existing lines, but I couldn't think of a quick
> way to put one back.  I'm sure some vi guru will have a magic solution...

That was one of the nice things about CW, it recognized which flavor of
file you had and would conform to that convention for that file.

--

Rick C

--- SoupGate-Win32 v1.05
* Origin: Agency HUB, Dunedin - New Zealand | FidoUsenet Gateway (3:770/3)

SOURCE: echomail via QWK@docsplace.org

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.