LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 05-21-2013, 07:49 AM   #31
tronayne
Senior Member
 
Registered: Oct 2003
Location: Northeastern Michigan, where Carhartt is a Designer Label
Distribution: Slackware 32- & 64-bit Stable
Posts: 3,541

Rep: Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065

Here's a vote for vi/vim -- along with a little bit of history...

Linux is the kernel, everything else are utilities, tools and an occasional application or fifty. The utilities; things like vi, sed, ed, etc., etc., are look-work-alike ports of AT&T Bell Labs' Unix system utilities, tools and applications and, in that world, Unix is the kernel.

All of that stuff was written using text editors on text-only terminals -- a lot of Teletypes (you see those in old movies clanking away at 10 CPS), paper tapes for "storage," and the like. Royal PITA, that. Of the editor families, there was the original, ed (you have that on your system by the way) then ex (extended ed, a programmer's editor), plus a few more that have more or less fallen by the wayside. Bill Joy, a whiz-kid at Berkeley, took ex and added a visual mode to it, thus, viual editor; this was when video terminals started coming into use (and the things cost hundreds and in many cases, thousands of 1970's dollars). No paper, no clanking mechanical horrors, just a tube to stare at and no mice -- you moved the cursor around with with the H, J, K and L keys under your fingers (you still do, you do not take your hand of the keyboard). Simple CTRL-something key sequences to do things.

The Unix-based text editors all share the same key sequences to do work (like substituting some pattern of characters with some other pattern of characters, inserting, deleting, all the stuff you typically do with an editor. Learn one, you've pretty much learned 'em all. So, what you can do with the text editor, say vi/vim, you can also do with the streaming editor, sed and ex. They all work with what are known as regular expressions. Those look like gobbledygook when you first encounter them but after a while they start to make sense (and, once learned, your life becomes easier and easier).

Thing is, these programs were all designed to do one thing and do it well (see the bottom of this post) and they were designed to work together as pipes and filters. Brian Kernighan and Dennis Ritchie (R.I.P.) wrote books with vi, incorporating simple, elegant directions for typesetting in the text (The C Programming Language for example). All the manual pages were written with the same tools (and still are). A little learning curve and away you go.

I've been doing this stuff since... oh, hell, the mid 70's (lessons learned during a wasted youth) and still use vi, sed, ex and all the other text manipulation, editing and formatting tools to do useful work quickly and effectively. They work.

Learn vi, you'll never regret it.

[EDIT]
Something I forgot to mention: with a vi-compatible editor; e.g., elvis, vim, if you place a file .exrc in your home directory with this content:
Code:
cat .exrc
set autoindent showmode showmatch
autoindent: if you insert a tab in the first column, the editor will continue to insert a tab on a new line; an additional tab will indent further and so on. To shut it off, you type Ctrl-D which undents one tab level. Mainly useful with indenting code.

showmatch: when you type an opening paren, brace or bracket -- ( { [ -- and then a closing paren, brace or bracket the cursor will jump back to the matching opening one. You can use the % key to jump back and forth to matching open-close pairs. If you don't close an open (or vice versa), you'll get a beep or visual flash to indicate that there isn't a match.

showmode: indicates at the bottom of the screen what mode you're in, command or insert.

All handy for big (or even small) editing.
[/EDIT]

Hope this helps some.

Last edited by tronayne; 05-23-2013 at 08:04 AM.
 
2 members found this post helpful.
Old 05-21-2013, 04:35 PM   #32
paulb2
Member
 
Registered: Feb 2011
Location: Evansville, IN USA
Distribution: Slackware64 14.1(multilib) and Win7
Posts: 30

Original Poster
Rep: Reputation: 5
Quote:
Originally Posted by tronayne View Post
Here's a vote for vi/vim -- along with a little bit of history...

-- snip --

All of that stuff was written using text editors on text-only terminals -- a lot of Teletypes (you see those in old movies clanking away at 10 CPS), paper tapes for "storage," and the like. Royal PITA, that.

-- snip --

Hope this helps some.
Thank you, tronayne, for the encouragement. After reading all the responses, I intend to learn vim (or perhaps elvis) along with nano and joe, and see which one (or combination) will serve my purposes best. I will now mark this thread solved.

And thanks for bringing back memories of the good ole' days. In my first real job after graduate school, back in the mid 60's, the company I worked for cleaned out a former janitor's closet and installed two gen-u-wine tty's. One had a dial-up connection to a local (same city) shared computer that used an early version of BASIC; the other to a distant shared computer a few states away that used FORTRAN.
I did a lot of data analysis on the first one, and had lots of rolls of yellow, punched, paper tape as my storage medium. Even wrote my own programs for data input, analysis, and output in the form of tables and graphs. Made report writing much easier.
 
Old 05-22-2013, 07:23 AM   #33
tronayne
Senior Member
 
Registered: Oct 2003
Location: Northeastern Michigan, where Carhartt is a Designer Label
Distribution: Slackware 32- & 64-bit Stable
Posts: 3,541

Rep: Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065
All that sounds really familiar -- dial-up (110 BAUD) Teletype, BASIC, FORTRAN. Fortunately the computer was a Honeywell GECOS time sharing which had many of the features of Unix (GE was part of the project including Bell Labs, MIT and other folks, Honeywell bought GE's computer business), nice system to work on, later they did Multics that turned out to be pretty useful too although I never did work on a Multic system. My own transition from GECOS to Unix was pretty painless, actually. I still have box somewhere or other with paper tapes, nothing to read them with, but there they are, all ready to load and run. Sheesh. Still got a couple of boxes of 9-track, too. Why, I don't know.
 
Old 05-22-2013, 07:41 AM   #34
perbh
Member
 
Registered: May 2008
Location: Republic of Texas
Posts: 393

Rep: Reputation: 81
Ahhhh - brings back tons of memories!
Started on a teletype as well - even had 2 punches so you could copy/edit *chuckles*
As for quick and dirty editing by manually splicing and punching the holes - could read ascii-codes like it was clear-text!
And you could connect to a Univac-1107 with a whopping 64kW memory!
Once I started a job that finished right after midnight - and got a bill for some $150,000 - the stooopid system thought I had used over 24-hours of cpu-time - he, he!
Yeah - we do get a li'l nostalgic at times ... still - nice memories.

By-the-way - Univac was word-addressable, not byte-addressable and each 'word' was 36 bits - so 64kW were 64kx36bits

Last edited by perbh; 05-22-2013 at 07:46 AM.
 
Old 05-22-2013, 07:57 AM   #35
tronayne
Senior Member
 
Registered: Oct 2003
Location: Northeastern Michigan, where Carhartt is a Designer Label
Distribution: Slackware 32- & 64-bit Stable
Posts: 3,541

Rep: Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065
Hey! Yeah, Honeywell was a 36-bit box, too. Forgot about that. Never did figure out just what reason/advantage there was to a 36-bit word size, though (maybe being able to use the full 32-bits for numerics? I dunno).

BTW, the Wikipedia article about Multics says that "The last known running Multics installation was shut down on October 30, 2000, at the Canadian Department of National Defence in Halifax, Nova Scotia, Canada." Now, that's some longevity!
 
Old 05-22-2013, 10:23 AM   #36
Z038
Member
 
Registered: Jan 2006
Location: Dallas
Distribution: Slackware
Posts: 910

Rep: Reputation: 174Reputation: 174
Since it hasn't been mentioned in this thread, I'll just add that pico is another basic editor choice available in Slackware. nano is a pico-like editor with more features than pico and with a GPL license, whereas pico has a proprietary license. Of the two, I prefer nano.
 
Old 05-22-2013, 11:24 PM   #37
nick_th_fury
Member
 
Registered: Jun 2003
Location: Texas
Distribution: Slackware, NetBSD
Posts: 151

Rep: Reputation: 23
For a new person switching from Windows, Midnight Commander 'mc' is really easy to use.
Fantastic little editor, works on unicode as well and it's also a pretty powerful file manager.
Not to sure about it's language versions though.
When I first started learning Slackware & Suse I used vim. I completely agree it's worth learning if your going to be using it a lot.
 
Old 05-23-2013, 09:47 AM   #38
perbh
Member
 
Registered: May 2008
Location: Republic of Texas
Posts: 393

Rep: Reputation: 81
Quote:
Originally Posted by tronayne View Post
Hey! Yeah, Honeywell was a 36-bit box, too. Forgot about that. Never did figure out just what reason/advantage there was to a 36-bit word size, though (maybe being able to use the full 32-bits for numerics? I dunno).
...
Makes a huuuuge difference for floats. I used to be involved in the ship-building industry - the yards were mostly running ibm mainframes - and where you've got the 'bulb' (double curvature and aw' that, origin at the stern) - 32-bit floats caused welding seams the size of which you have never seen - just to cover the gaps - he he. Using 36-bit floats -> no problems. For the ibm's we had to rewrite large parts using 'double precision'.
Of course, somewhat later was the era of the mini's and the Nord mini used 48-bit floats - a breeze!! (though as slow as walking in treacle)

p.s
My humble apologize to the 'audience' - got carried away with my reminiscence - this has nothing to do with 'command line editor' ...

Last edited by perbh; 05-23-2013 at 09:51 AM.
 
Old 05-23-2013, 10:29 AM   #39
kikinovak
MLED Founder
 
Registered: Jun 2011
Location: Montpezat (South France)
Distribution: CentOS, OpenSUSE
Posts: 3,453

Rep: Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154
Quote:
Originally Posted by Richard Cranium View Post
The most important vi skill is memorizing the key sequence of...

:q!

...
No, it's this sequence:

Code:
:r !LANG=C && date
... for the daily ChangeLog.txt
 
Old 05-23-2013, 01:18 PM   #40
digger95
Member
 
Registered: Oct 2007
Location: Indiana, PA
Distribution: Slackware 14
Posts: 330

Rep: Reputation: 46
When I first started using Slackware (and Linux in general) I had to learn emacs the hard way. I was stuck at the command-line, couldn't get X started, and had to edit some configuration files before I could even reboot my machine. Emacs was the only text editor I could remember the name of, and unfortunately the man page doesn't give you a whole lot of in-program help. I couldn't for the life of me figure out how to save a file and/or quit the program, so I sat here pushing various keys to see what they did.
 
Old 05-23-2013, 02:50 PM   #41
tronayne
Senior Member
 
Registered: Oct 2003
Location: Northeastern Michigan, where Carhartt is a Designer Label
Distribution: Slackware 32- & 64-bit Stable
Posts: 3,541

Rep: Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065
Quote:
Originally Posted by perbh View Post
Makes a huuuuge difference for floats. I used to be involved in the ship-building industry - the yards were mostly running ibm mainframes - and where you've got the 'bulb' (double curvature and aw' that, origin at the stern) - 32-bit floats caused welding seams the size of which you have never seen - just to cover the gaps - he he. Using 36-bit floats -> no problems. For the ibm's we had to rewrite large parts using 'double precision'.
Of course, somewhat later was the era of the mini's and the Nord mini used 48-bit floats - a breeze!! (though as slow as walking in treacle)
Yeah, we were running finite element analysis on that Honeywell mainframe (and all sort of other engineering analytic software too). No problems there. Nice easy-to-use boxes, those.
 
Old 05-23-2013, 03:15 PM   #42
astrogeek
Moderator
 
Registered: Oct 2008
Distribution: Slackware [64]-X.{0|1|2|37|-current} ::12<=X<=15, FreeBSD_12{.0|.1}
Posts: 6,263
Blog Entries: 24

Rep: Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194
Quote:
Originally Posted by perbh View Post
Ahhhh - brings back tons of memories!
Started on a teletype as well - even had 2 punches so you could copy/edit *chuckles*
As for quick and dirty editing by manually splicing and punching the holes - could read ascii-codes like it was clear-text!
HAHA! I too started life on a teletype with paper tape storage and also had a double punch copy system. I built more than one cassette tape interface but never acheived any kind of reliable storage with them.

But it is true, we learned to read the ascii directly from the tape (machine code too!) and at times that could be the quickest access to code when debugging!

Did anyone else use multi-colored magic markers to bookmark sections of tape for easy reference? How about tiny marginal notes?

Last edited by astrogeek; 05-23-2013 at 03:23 PM.
 
Old 05-23-2013, 09:00 PM   #43
perbh
Member
 
Registered: May 2008
Location: Republic of Texas
Posts: 393

Rep: Reputation: 81
@astrogeek,
We occasionally used a papertape 'header' in clear-text (using a 5x7 matrix to generate 'readable characters', still using the 8th row for parity).
Many times I have seen guys trying to read what was there (expecting the usual ascii-code) and being completely baffled, not being able to figure out what the heck was on the tape *chuckles* - while anyone 'uninitiated' obviously could read it at a glance.

Papertape output usually was put into a h-u-g-e bucket, later to be wound up. Being on the 6th floor, we usually just threw the head of the tape out the window and let it hang there while carefully winding it up on a spool ... until one day when a guy a couple of floors below saw this 'girlander' hanging outside his window - so opened the window and cut it with scissors .... and thus valuable data slowly floated down to the ground ...

Last edited by perbh; 05-23-2013 at 09:01 PM.
 
Old 05-23-2013, 09:14 PM   #44
perbh
Member
 
Registered: May 2008
Location: Republic of Texas
Posts: 393

Rep: Reputation: 81
I used to be responsible for a remote-terminal (w/card-reader/punch and line-printer and papertape punch/reader) running a NTR (nine-thousand-remote) emulator against a Univac-1107. It had to be boot-strapped with manual-switches (all 16 of them) on the front-panel - but often, when you finally sent it the final 'jmp'-command it would just hang there ...
Guys working the 'late shift' would call me up at all ridiculous hours to get the beast started again .. I had figured out that when it hung - you could get it going again by giving it a kick on a particular spot on the side panel (which I had marked). So - whenever they called out-of-hours I would command everyone out, bootstrap it and giving it 'the kick' - never failed (and I never told anyone). I guess that today, that is known as 'job security'!!

Last edited by perbh; 05-23-2013 at 09:17 PM.
 
Old 05-23-2013, 09:28 PM   #45
perbh
Member
 
Registered: May 2008
Location: Republic of Texas
Posts: 393

Rep: Reputation: 81
Often, data would be on punched cards which had to be sent through a card reader/punch so we could 'read' what was on each card and the seq-no would also be punched/printed (the punch on the terminal didn't have a black ribbon). A box of cards was usually about 3000 cards. Once, a friend of mine was walking through to the card-punches with a box full - he stumbled on the threshold and spilled all the cards out on the floor !!
It took him well over a week to get the cards back in their proper sequence!!

Cards, of course, were in EBCDIC - a right pita!!
However, they made good note-pads - always had about 20 of'em in my jacket-pocket!!

Last edited by perbh; 05-23-2013 at 09:34 PM.
 
  


Reply

Tags
command line, text editor, unicode



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
command line//text editor Fred Caro Linux - Newbie 6 02-18-2009 11:23 AM
Command-line output to GUI text editor hex1a4 Linux - General 2 04-10-2008 11:49 AM
Enhanced command line text editor netsoft2005 Linux - Software 2 07-14-2005 07:42 AM
Mandrake 9.1 installed command line text editor plexi100 Linux - Newbie 1 11-07-2003 10:25 PM
VI text editor in command line InSane103 Linux - Software 4 07-09-2003 09:04 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 04:06 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration