Who know's the editors!
Is there an editor apart from Emacs and Vim that does 'softwrap' or 'linebreak' (as vim calls it). I want to use a console editor for editing text words (as opposed to programmer's code). Despite hundreds available it seems that emacs and vim are the only two that offer this.
My preference would be for wordstar bindings (yes i'm that old! and i still think they are the most efficient keybindings like a lot of writers). Joe does all i want other than coping with long lines. [I seem to recall a discussion about editors a few years ago and someone on here uses Joe]. Point is i want to save in long line form but view and edit in wrapped form - just like one does in gedit or leafpad. Using nano/pico ^W^J justifies the entire file and saves it in that form... like Joe's ^B - which isn't what i want.
I don't really want to have to learn either vim or emacs as they are too complex for my more basic uses but it seems i don't have much choice.
So who's experimented and can advise on the many editors available. Nano has an option --softwrap or $ - it truncates but doesn't wrap like vim's linebreak. It seems surprising that no one's done a console editor with CUA bindings.
thanks james
On 14/11/2012 20:35, James Freer wrote:
Who know's the editors!
[SNIP]
I have used Joe for donkey's years. The first full-screen editor I ever played with on a PC, back in the early 80s, was Wordstar. Joe was a natural choice when I hit CLI Linux, and I have no real need of emacs or vim, so I've never been near them.
Anyway, I'm sure that nano does a justify/unjustify, but the latter only immediately after the former, which is no more than a simple undo. Maybe if you mark a block of text? Ok, tested, no, that doesn't work.
I can only think that maybe a makro in joe would do it. A simple, start from the bottom of the section, one line at a time, executed n times.
Cheers, Laurie.
James Freer jessejazza3.uk@gmail.com
[...] Joe does all i want other than coping with long lines. [I seem to recall a discussion about editors a few years ago and someone on here uses Joe]. Point is i want to save in long line form but view and edit in wrapped form - just like one does in gedit or leafpad. [...]
Why?
To view a wrapped file as unwrapped:
sed -ne 'H;/^$/{;x;s/\n/ /g;p;}' filename
or for some files, this will suffice and leave more gaps:
fmt -w2500 filename
Hope that helps,
On Thu, Nov 15, 2012 at 7:45 PM, MJ Ray mjr@phonecoop.coop wrote:
James Freer jessejazza3.uk@gmail.com
[...] Joe does all i want other than coping with long lines. [I seem to recall a discussion about editors a few years ago and someone on here uses Joe]. Point is i want to save in long line form but view and edit in wrapped form - just like one does in gedit or leafpad. [...]
Why?
To view a wrapped file as unwrapped:
sed -ne 'H;/^$/{;x;s/\n/ /g;p;}' filename
or for some files, this will suffice and leave more gaps:
fmt -w2500 filename
Hope that helps,
MJ Ray (slef), member of www.software.coop, a for-more-than-profit co-op.
Ah... i read the info on sed when i was in synaptic a few evenings ago but wasn't sure. I'm not a computer geek. Many thanks for the guidance and i'll give the sed docs a read. Hopefully it's not too involved otherwise i might as well switch to vim.
james
On Thu, 15 Nov 2012 20:34:33 +0000, jessejazza3.uk@gmail.com said:
i'll give the sed docs a read. Hopefully it's not too involved otherwise i might as well switch to vim.
This is going to be good...
<settles down to watch with beer>
On Thu, 15 Nov 2012 22:12:36 +0000 Keith Edmunds kae@midnighthax.com allegedly wrote:
On Thu, 15 Nov 2012 20:34:33 +0000, jessejazza3.uk@gmail.com said:
i'll give the sed docs a read. Hopefully it's not too involved otherwise i might as well switch to vim.
This is going to be good...
<settles down to watch with beer>
Oh c'mon, give the guy a break. At least he didn't say emacs....
(James - take a look at http://sed.sourceforge.net/sed1line.txt lots of fun, but educational too.)
Mick
---------------------------------------------------------------------
blog: baldric.net gpg fingerprint: FC23 3338 F664 5E66 876B 72C0 0A1F E60B 5BAD D312
---------------------------------------------------------------------
On Thu, 15 Nov 2012 22:23:33 +0000, mbm@rlogin.net said:
Oh c'mon, give the guy a break.
I didn't mean to be rude.
To be honest, learning Vim was one of the most productive things I've done (probably second to learning touch typing). Both were hell for a few weeks, but they soon passed. I use both skills 350+ days a year and never look back.
On Thu, 15 Nov 2012 22:27:36 +0000 Keith Edmunds kae@midnighthax.com allegedly wrote:
On Thu, 15 Nov 2012 22:23:33 +0000, mbm@rlogin.net said:
Oh c'mon, give the guy a break.
I didn't mean to be rude.
Keith
I didn't think you were. Amusing yes, rude no. :-)
For the novitiate, sed, like most tools designed in the unix dark ages can be baffling.
I'll join you in a beer. But James needs a whisky. Or two.
Mick ---------------------------------------------------------------------
blog: baldric.net gpg fingerprint: FC23 3338 F664 5E66 876B 72C0 0A1F E60B 5BAD D312
---------------------------------------------------------------------
On Thu, 15 Nov 2012, mick wrote:
On Thu, 15 Nov 2012 22:27:36 +0000 Keith Edmunds kae@midnighthax.com allegedly wrote:
On Thu, 15 Nov 2012 22:23:33 +0000, mbm@rlogin.net said:
Oh c'mon, give the guy a break.
I didn't mean to be rude.
Keith
I didn't think you were. Amusing yes, rude no. :-)
For the novitiate, sed, like most tools designed in the unix dark ages can be baffling.
I'll join you in a beer. But James needs a whisky. Or two.
Mick
Yes... malt is best. I used to live in Aberdeen when i worked in the oil industry and there was always a pleasant evening at a certain hotel that stocked all the malts along a wall - there are hundreds.
As to learning sed i think from what i've looked at it may be easier to learn vim. I do know some vim and it's not that difficult to master a dozen commands initially to do basics and after that one picks up additional ones gradually. The thing that's 'foreign' to me with editors is that while there are so many - there are very few (one i think) with CUA bindings and only one console editor with 'linebreak'. Emacs (as you haven't mentioned it!) - i'm sure it's very powerful and good but it's somehow just impregnable to me... lovely huge reference manual but such hard reading.
I still think wordstar keybindings are the most efficient and hence why so many writers still use it. Joe editor does the lovely 'hotch' (as i call it - option --mid) i.e. cursor returns to mid screen and moves text up when at the bottom - Pico, Emacs, and i think vim do that. Which is indispenable for writing although nice for coding as well. Vim keybindings are a bit perculiar to me although one has to admit it's the #1 editor... it's uncomfortable to use but that's down to practice.
thanks james
Highly recommended reading for users of any text editor (not just Vim) is Bram Moolenaar's (the author of Vim) "Seven habits of effective text editing" (http://www.moolenaar.net/habits.html).
On Fri, 16 Nov 2012 07:39:42 +0000 Keith Edmunds kae@midnighthax.com allegedly wrote:
Highly recommended reading for users of any text editor (not just Vim) is Bram Moolenaar's (the author of Vim) "Seven habits of effective text editing" (http://www.moolenaar.net/habits.html).
Thanks for that Keith. I hadn't seen it before. An interesting read.
And as a confirmed vi fan and emacs avoider (let's face it, you are either Rolling Stones, or Beatles) I particularly liked "Another tendency is to include all kinds of functionality inside the editor; Emacs is a good example of where this can end up."
(with apologies for the flame bait.....)
Mick
---------------------------------------------------------------------
blog: baldric.net gpg fingerprint: FC23 3338 F664 5E66 876B 72C0 0A1F E60B 5BAD D312
---------------------------------------------------------------------
James Freer jessejazza3.uk@gmail.com
As to learning sed i think from what i've looked at it may be easier to learn vim. I do know some vim and it's not that difficult to master a dozen commands initially to do basics and after that one picks up additional ones gradually. The thing that's 'foreign' to me with editors is that while there are so many - there are very few (one i think) with CUA bindings and only one console editor with 'linebreak'. Emacs (as you haven't mentioned it!) - i'm sure it's very powerful and good but it's somehow just impregnable to me... lovely huge reference manual but such hard reading.
I don't see why you'd need to learn sed (or vim) unless you're in my line of work, developing websites and working on servers. I just offered a sed program as a tool for unwrapping a text file.
One reason that there are few editors with CUA bindings is that Common User Access is misnamed: it's not common - it's DOS more-or-less.
Worse, most Unix terminals don't distinguish the Alt key from ESC, Alt is grabbed by some and the CUA keystrokes Shift-Del, Ctrl-Ins and Shift-Ins aren't passed consistently. What editor implements CUA?
Emacs is very powerful, but you don't need to understand it all to edit things - just like you don't need to understand the engine fully to drive a car. If you start Emacs, there are nice menus File, Edit and so on along the top - access them with a mouse on a graphical session, or with F10 (the CUA menu key!) on most terminal sessions (and ESC then backquote on the few others).
Hope that helps,
On 15/11/2012 20:34, James Freer wrote:
[SNIP]
and i'll give the sed docs a read. Hopefully it's not too involved otherwise i might as well switch to vim.
HaHa! Good luck with that! You might be gone some time!
Cheers, Laurie.
On 16-Nov-2012 10:31:22 Laurie Brown wrote:
On 15/11/2012 20:34, James Freer wrote:
[SNIP]
and i'll give the sed docs a read. Hopefully it's not too involved otherwise i might as well switch to vim.
HaHa! Good luck with that! You might be gone some time!
Cheers, Laurie.
The original query was about viewing *and editing* files:
"Is there an editor apart from Emacs and Vim that does 'softwrap' or 'linebreak' (as vim calls it). I want to use a console editor for editing text words (as opposed to programmer's code). Despite hundreds available it seems that emacs and vim are the only two that offer this." [...] "Point is i want to save in long line form but view and edit in wrapped form - just like one does in gedit or leafpad." [James Freer, Wed, 14 Nov 2012 20:35:23 +0000]
The use of 'sed' may well be fine for the stated viewing purpose. But I would *not* recommend using 'sed' for general editing!!! (Theoretically possible; but even something as simple as inserting a new phrase in the middle of an existing paragraph could take several minutes to set up in 'sed').
Speaking for myself, I use 'vim' all the time. The main thing to get used to with 'vim' is switching between command mode and insert mode.
Best wishes to all, Ted.
------------------------------------------------- E-Mail: (Ted Harding) Ted.Harding@wlandres.net Date: 16-Nov-2012 Time: 11:16:17 This message was sent by XFMail -------------------------------------------------
(Ted Harding) Ted.Harding@wlandres.net
"Point is i want to save in long line form but view and edit in wrapped form - just like one does in gedit or leafpad." [James Freer, Wed, 14 Nov 2012 20:35:23 +0000]
The use of 'sed' may well be fine for the stated viewing purpose. But I would *not* recommend using 'sed' for general editing!!!
Sure and I did ask "Why?" (why save in long line form and edit in wrapped form,) as I didn't understand why not just edit it wrapped and then convert it when unwrapped is needed. Maybe there is a reason, but it seemed like a preference rather than a functional need. I wasn't advocating sed for general editing!
Hope that clarifies,
On Fri, 16 Nov 2012, MJ Ray wrote:
(Ted Harding) Ted.Harding@wlandres.net
"Point is i want to save in long line form but view and edit in wrapped form - just like one does in gedit or leafpad." [James Freer, Wed, 14 Nov 2012 20:35:23 +0000]
The use of 'sed' may well be fine for the stated viewing purpose. But I would *not* recommend using 'sed' for general editing!!!
Sure and I did ask "Why?" (why save in long line form and edit in wrapped form,) as I didn't understand why not just edit it wrapped and then convert it when unwrapped is needed. Maybe there is a reason, but it seemed like a preference rather than a functional need. I wasn't advocating sed for general editing!
Why? For my uses the text editor is for text in words and not programming code. So i wanted to use a console editor (as mentioned above from earlier post) that saved like the graphical editors gedit, leafpad, bluefish to mention one or two.
Saving in nano, Joe and others put a hard return at the end of each line. Which is an absolute pain if i then transfer what i've written into Scribus (although i like to keep the original doc as text). So for me i'd say it was functional need... my attempt at sed didn't work which was a pity but i'll have another look.
You could say you're just a pain, use gedit and you've got what you want. But it's slow and i prefer console editors (easier on the eyes i find over long periods)... and also use the alpine mail client (mainly because it's the only one i've found that's fast without any bugs and problems - being a corporate app if one gives a Uni that accolade).
Ideally for me a CUA console editor with 'linebreak' and cursor repositioning mid screen when one comes to the bottom of a page. When typing a long article cursor repositioning is very useful... and a boon when replying to emails. It's a shame nano's softwrap doesn't work... it's keybindings are so quick and easy to learn.
To the best of my knowledge there is one CUA console editor Diakonos but that doesn't do softwrap. What do you use in a word processor, forums, email client - mostly CUA so it makes sense to stay with it for productivity. But for coding i can see why most like vim... it has almost every function/capability one could dream of - but too sophisticated for my uses really.
james
James Freer jessejazza3.uk@gmail.com
To the best of my knowledge there is one CUA console editor Diakonos but that doesn't do softwrap. What do you use in a word processor, forums, email client - mostly CUA so it makes sense to stay with it for productivity. [...]
Ah well, it's moot for email clients as there's a special MIME "flag" format=flowed to overcome this very problem. Plain text email line lengths are usually kept fairly short (to avoid various historical errors), but format=flowed tells the reading client it can rewrap it.
Word processors and web browsers tend to have their own built-in editors, but I do end up deleting hard linebreaks in them more often than I'd like, even in cases where the pasted text came from the word processor or web browser itself!
Sorry the sed didn't work for you. I wonder why not.
Hope that informs,
This is one for we old geeks. Reminds me of my first job as a Computer Operator on a Honeywell 120, back in 1973.
http://www.dailymail.co.uk/sciencetech/article-2235139/The-2-5ton-calculator...
Cheers, Laurie.
On Tue, 20 Nov 2012 15:06:08 +0000 Laurie Brown laurie@brownowl.com allegedly wrote:
This is one for we old geeks. Reminds me of my first job as a Computer Operator on a Honeywell 120, back in 1973.
http://www.dailymail.co.uk/sciencetech/article-2235139/The-2-5ton-calculator...
Cheers, Laurie.
"The WITCH [...] had a multiplication time of between five and ten seconds. Modern day computers work in less than a second."
Classic piece of Mail reporting - technically illiterate.
Mick
---------------------------------------------------------------------
blog: baldric.net gpg fingerprint: FC23 3338 F664 5E66 876B 72C0 0A1F E60B 5BAD D312
---------------------------------------------------------------------
On 20 November 2012 15:18, mick mbm@rlogin.net wrote:
On Tue, 20 Nov 2012 15:06:08 +0000 Laurie Brown laurie@brownowl.com allegedly wrote:
This is one for we old geeks. Reminds me of my first job as a Computer Operator on a Honeywell 120, back in 1973.
http://www.dailymail.co.uk/sciencetech/article-2235139/The-2-5ton-calculator...
Cheers, Laurie.
"The WITCH [...] had a multiplication time of between five and ten seconds. Modern day computers work in less than a second."
Classic piece of Mail reporting - technically illiterate.
Mick
Come on Mick, this is The Mail you didn't expect accuracy no did you. ;-)
Cheers, BJ
On Tue, 20 Nov 2012 15:22:50 +0000 John Woodard mail@johnwoodard.co.uk allegedly wrote:
"The WITCH [...] had a multiplication time of between five and ten seconds. Modern day computers work in less than a second."
Classic piece of Mail reporting - technically illiterate.
Mick
Come on Mick, this is The Mail you didn't expect accuracy no did you. ;-)
I expect nothing good of the Mail. It has columnists like Melanie Phillips and Richard Littlejohn.
Mick
---------------------------------------------------------------------
blog: baldric.net gpg fingerprint: FC23 3338 F664 5E66 876B 72C0 0A1F E60B 5BAD D312
---------------------------------------------------------------------
On 20/11/2012 15:18, mick wrote:
On Tue, 20 Nov 2012 15:06:08 +0000 Laurie Brown laurie@brownowl.com allegedly wrote:
This is one for we old geeks. Reminds me of my first job as a Computer Operator on a Honeywell 120, back in 1973.
http://www.dailymail.co.uk/sciencetech/article-2235139/The-2-5ton-calculator...
Cheers, Laurie.
"The WITCH [...] had a multiplication time of between five and ten seconds. Modern day computers work in less than a second."
Classic piece of Mail reporting - technically illiterate.
Yeah, the standard of journalism is woeful sometimes, although strictly-speaking nano-seconds are indeed, "less than a second"!!!
Cheers, Laurie.
On 20-Nov-2012 16:21:20 Laurie Brown wrote:
On 20/11/2012 15:18, mick wrote:
On Tue, 20 Nov 2012 15:06:08 +0000 Laurie Brown laurie@brownowl.com allegedly wrote:
This is one for we old geeks. Reminds me of my first job as a Computer Operator on a Honeywell 120, back in 1973.
http://www.dailymail.co.uk/sciencetech/article-2235139/The-2-5ton-calculator -Rebooted-1951-definitely-wont-fit-pocket.html
Cheers, Laurie.
"The WITCH [...] had a multiplication time of between five and ten seconds. Modern day computers work in less than a second."
Classic piece of Mail reporting - technically illiterate.
Yeah, the standard of journalism is woeful sometimes, although strictly-speaking nano-seconds are indeed, "less than a second"!!!
Cheers, Laurie.
The BBC have done a much better job:
Two-tonne Witch computer gets a reboot http://www.bbc.co.uk/news/technology-20395212
When I saw the story, I wondered if this was the same machine that that I did work with, when I did a vacation job at Harwell during my third year studying Maths at Cambridge, in the Summer of 1959 (but when I look at the picture I don't think it was; also, that was a couple of years after 1957 when, it seems, the WITCH was dunked in Wolverhampton).
I had also done a vac job at Aldermaston (Summer 1957) which was my first contact with computing, but that was an IBM something or other. But that wouldn't have been the WITCH either.
Ted.
------------------------------------------------- E-Mail: (Ted Harding) Ted.Harding@wlandres.net Date: 20-Nov-2012 Time: 17:11:41 This message was sent by XFMail -------------------------------------------------
Laurie Brown wrote:
This is one for we old geeks. Reminds me of my first job as a Computer Operator on a Honeywell 120, back in 1973.
How is this a reply about text editing, linebreaks and so on?
Please, if you're starting a new topic, click "Compose..." or the email address, rather than "Reply..."
Thanks,
On Wed, 21 Nov 2012 12:37:52 +0000 MJ Ray mjr@phonecoop.coop allegedly wrote:
How is this a reply about text editing, linebreaks and so on?
It isn't.
Please, if you're starting a new topic, click "Compose..." or the email address, rather than "Reply..."
He did. Check the subject line.
Mick
---------------------------------------------------------------------
blog: baldric.net gpg fingerprint: FC23 3338 F664 5E66 876B 72C0 0A1F E60B 5BAD D312
---------------------------------------------------------------------
On Wed, Nov 21, 2012 at 12:42:58PM +0000, mick wrote:
On Wed, 21 Nov 2012 12:37:52 +0000 MJ Ray mjr@phonecoop.coop allegedly wrote:
How is this a reply about text editing, linebreaks and so on?
It isn't.
Please, if you're starting a new topic, click "Compose..." or the email address, rather than "Reply..."
He did. Check the subject line.
Changing the subject doesn't stop the message also being a reply to an existing thread. The MessageID is preserved when you R[eply] and many (good) mail programs use this to show the messages as a thread. Hence what I think MJ Ray was saying was that this appeared in the message thread about "text editing, linebreaks" whereas it should have been a new thread.
On Wed, 21 Nov 2012 12:58:10 +0000 Chris Green cl@isbd.net allegedly wrote:
On Wed, Nov 21, 2012 at 12:42:58PM +0000, mick wrote:
On Wed, 21 Nov 2012 12:37:52 +0000 MJ Ray mjr@phonecoop.coop allegedly wrote:
How is this a reply about text editing, linebreaks and so on?
It isn't.
Please, if you're starting a new topic, click "Compose..." or the email address, rather than "Reply..."
He did. Check the subject line.
Changing the subject doesn't stop the message also being a reply to an existing thread. The MessageID is preserved when you R[eply] and many (good) mail programs use this to show the messages as a thread. Hence what I think MJ Ray was saying was that this appeared in the message thread about "text editing, linebreaks" whereas it should have been a new thread.
Ah yes - the "References:" header. I'd missed that (I don't thread my email. I don't work that way.)
Mick ---------------------------------------------------------------------
blog: baldric.net gpg fingerprint: FC23 3338 F664 5E66 876B 72C0 0A1F E60B 5BAD D312
---------------------------------------------------------------------
On 21-Nov-2012 12:58:10 Chris Green wrote:
On Wed, Nov 21, 2012 at 12:42:58PM +0000, mick wrote:
On Wed, 21 Nov 2012 12:37:52 +0000 MJ Ray mjr@phonecoop.coop allegedly wrote:
How is this a reply about text editing, linebreaks and so on?
It isn't.
Please, if you're starting a new topic, click "Compose..." or the email address, rather than "Reply..."
He did. Check the subject line.
Changing the subject doesn't stop the message also being a reply to an existing thread. The MessageID is preserved when you R[eply] and many (good) mail programs use this to show the messages as a thread. Hence what I think MJ Ray was saying was that this appeared in the message thread about "text editing, linebreaks" whereas it should have been a new thread. -- Chris Green
Indeed. From the headers to Laurie Brown's original message Ted.(which started the "WITCH" sequence):
From: Laurie Brown laurie@brownowl.com Subject: [ALUG] The WITCH is dead! Long live the WITCH! Date: Tue, 20 Nov 2012 15:06:08 +0000 References: E1TaRN8-0003id-PA@petrol.towers.org.uk In-Reply-To: E1TaRN8-0003id-PA@petrol.towers.org.uk
and, if you search message headers for "E1TaRN8-0003id-PA", you will find:
From: MJ Ray mjr@phonecoop.coop Subject: Re: [ALUG] Console editor with 'linebreak' Date: Mon, 19 Nov 2012 13:26:46 +0000 Message-Id: E1TaRN8-0003id-PA@petrol.towers.org.uk
(and this was the latest one in the "Console editor with 'linebreak'" thread). So Laurie's message was indeed a reply to MJR's.
So changing the subject line does not suffice to break the thread, since its spoor is preserved in the "References:" and "In-Reply-To:" headers, and these are usually what is tracked by mail clients when building threads.
On the other hand, starting a new topic with "Compose New" will not incorporate any reference to previous messages, so indeed starts a new thread.
Hoping this helps, Ted.
------------------------------------------------- E-Mail: (Ted Harding) Ted.Harding@wlandres.net Date: 21-Nov-2012 Time: 13:22:35 This message was sent by XFMail -------------------------------------------------
On Fri, 16 Nov 2012 10:31:22 +0000 Laurie Brown laurie@brownowl.com allegedly wrote:
On 15/11/2012 20:34, James Freer wrote:
[SNIP]
and i'll give the sed docs a read. Hopefully it's not too involved otherwise i might as well switch to vim.
HaHa! Good luck with that! You might be gone some time!
Check out http://www.digilife.be/quickreferences/quickrefs.htm for a the quick reference guides to vi and vim (and other stuff of course). I have a rather elderly vi/ex guide which I still find useful.
Mick
---------------------------------------------------------------------
blog: baldric.net gpg fingerprint: FC23 3338 F664 5E66 876B 72C0 0A1F E60B 5BAD D312
---------------------------------------------------------------------
On Fri, Nov 16, 2012 at 11:41 AM, mick mbm@rlogin.net wrote:
On Fri, 16 Nov 2012 10:31:22 +0000 Laurie Brown laurie@brownowl.com allegedly wrote:
On 15/11/2012 20:34, James Freer wrote:
[SNIP]
and i'll give the sed docs a read. Hopefully it's not too involved otherwise i might as well switch to vim.
HaHa! Good luck with that! You might be gone some time!
Check out http://www.digilife.be/quickreferences/quickrefs.htm for a the quick reference guides to vi and vim (and other stuff of course). I have a rather elderly vi/ex guide which I still find useful.
Mick
Thanks for the link. I've got those i those i think... but useful to have them in one place as one of them is out of date.
james