Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230
HOWTO - my favorite editor: Joe
HOWTO - my favorite editor: Joe
Here's another subjective matter: editors.
This is the type of application that you will use a lot, so might as well choose
one that is like second nature when you use it. It has to be one of the
most important application in your arsenal. So why learn the CLI when you
got gedit and kate? Because if you're in a situation in which you
cannot enter the X system and have to operate from the console, those
gui editors won't work.
A superficial check on forums and IRC channels will render all kinds of
asinine remarks, for example :
nano is for chumps
vim is for punks, vi is for real men
vi is better than emacs, emacs is for real geeks
and so forth... I use Joe, sorry for living.
I started with nano, it was easy and did the job, didn't have to
memorize too much. As i began to distro-hop and began to understand
what i was doing, i realize that vi was ubiquitous, you could find it
in whatever distro you used in Linux or BSD; worse yet, sometimes it
was the ONLY editor around. I had tried it and detested it, i found it
archaic and not friendly at all, but i HAD to learn it, it was a matter
of surviving. So my friend Google gave me tons of vi howtos to learn
from. In Debian it comes by default (nvi).
it should take a day to get the hang of it
So, learn to use these two, you don't want to be caught downtown
Baghdad in front of some exotic flavor of UNIX, boring everybody to
tears with your whining about where is Kedit, Kate, or Gedit.
$ apt-cache search editors
will give more editors you can shake a stick at. I like Joe, is pretty
light, it weighs half of vim, and the version i use, 'jpico', is just
like nano, same emacs keybindings.
Now my needs are basic, editing configuration files and using it as my
wordprocessor. I don't program or do complex things. After configuring
it, i ended up with this type of keybindings for editing:
C = Control
F1 takes me to the beginning of the file
F2 takes me to the end of the file
F10 saves/exit or just exits if the file has not been edited.
C-a will take me to the beginning of the line.
C-e will take me to the end of the line
C-j will format the paragraphs in blocks when used as
a wordprocessor (.txt).
C-k will delete the line
C-u undo
Backspace to erase backwards
Delete to erase forward
Simple.
Here's a section of Joe's manual
$ man joe
JOE also emulates several other editors.
JSTAR is a close imitation of WordStar
JPICO is a close imitation of the PICO editor (think nano)
JMACS is a GNU-EMACS imitation.
RJOE is a restricted version of JOE, which allows you to edit only the files
specified on the command line."
$ sudo updatedb
$ locate joe
Then i copy the global jpicorc to my /home and start editing so my
personal needs are met:
$ cp /etc/joe/jpicorc .jpicorc
$ nano .jpicorc
On line 20 starts some configuration options, i chose these:
-asis (so my spanish characters are shown)
--exask (it won't ask me if i want to exit)
--help (once i know the commands i don't need them at the top)
There is a description of what each does.
On line 230 under Text File (for my wordprocessing needs)
Text file.
*.txt
-wordwrap
-rmargin 72
-tab 3
-french
-spaces
-asis
-nobackups
--exask
On line 769 i added this:
bof .k1 Goto beginning of file
center .k4 Center line
eof .k2 Goto end of file
exsave .k; Save and exit from editor
markb .k5 Begin highlighting
markk .k6 Close highlighting
blkcpy .k8 Copy block of text
blkmove .k9 Move block of text
saved/exited nano
Then tested it:
$ jpico .jpicorc
pressed F2 - took me to end of file
pressed F1 - took me to the top of the file
pressed F10 - exited
To write an article like this:
$ jpico ~/editors.txt
and start writing, it will be saved in my /home, when i'm thru i press
F10, bye bye.
Reference:
How to Customize Joe
http://ed.asisaid.com/jostrokes.html
This is the type of application that you will use a lot, so might as well choose
one that is like second nature when you use it. It has to be one of the
most important application in your arsenal. So why learn the CLI when you
got gedit and kate? Because if you're in a situation in which you
cannot enter the X system and have to operate from the console, those
gui editors won't work.
A superficial check on forums and IRC channels will render all kinds of
asinine remarks, for example :
nano is for chumps
vim is for punks, vi is for real men
vi is better than emacs, emacs is for real geeks
and so forth... I use Joe, sorry for living.
I started with nano, it was easy and did the job, didn't have to
memorize too much. As i began to distro-hop and began to understand
what i was doing, i realize that vi was ubiquitous, you could find it
in whatever distro you used in Linux or BSD; worse yet, sometimes it
was the ONLY editor around. I had tried it and detested it, i found it
archaic and not friendly at all, but i HAD to learn it, it was a matter
of surviving. So my friend Google gave me tons of vi howtos to learn
from. In Debian it comes by default (nvi).
it should take a day to get the hang of it
So, learn to use these two, you don't want to be caught downtown
Baghdad in front of some exotic flavor of UNIX, boring everybody to
tears with your whining about where is Kedit, Kate, or Gedit.
$ apt-cache search editors
will give more editors you can shake a stick at. I like Joe, is pretty
light, it weighs half of vim, and the version i use, 'jpico', is just
like nano, same emacs keybindings.
Now my needs are basic, editing configuration files and using it as my
wordprocessor. I don't program or do complex things. After configuring
it, i ended up with this type of keybindings for editing:
C = Control
F1 takes me to the beginning of the file
F2 takes me to the end of the file
F10 saves/exit or just exits if the file has not been edited.
C-a will take me to the beginning of the line.
C-e will take me to the end of the line
C-j will format the paragraphs in blocks when used as
a wordprocessor (.txt).
C-k will delete the line
C-u undo
Backspace to erase backwards
Delete to erase forward
Simple.
Here's a section of Joe's manual
$ man joe
JOE also emulates several other editors.
JSTAR is a close imitation of WordStar
JPICO is a close imitation of the PICO editor (think nano)
JMACS is a GNU-EMACS imitation.
RJOE is a restricted version of JOE, which allows you to edit only the files
specified on the command line."
$ sudo updatedb
$ locate joe
Then i copy the global jpicorc to my /home and start editing so my
personal needs are met:
$ cp /etc/joe/jpicorc .jpicorc
$ nano .jpicorc
On line 20 starts some configuration options, i chose these:
-asis (so my spanish characters are shown)
--exask (it won't ask me if i want to exit)
--help (once i know the commands i don't need them at the top)
There is a description of what each does.
On line 230 under Text File (for my wordprocessing needs)
Text file.
*.txt
-wordwrap
-rmargin 72
-tab 3
-french
-spaces
-asis
-nobackups
--exask
On line 769 i added this:
bof .k1 Goto beginning of file
center .k4 Center line
eof .k2 Goto end of file
exsave .k; Save and exit from editor
markb .k5 Begin highlighting
markk .k6 Close highlighting
blkcpy .k8 Copy block of text
blkmove .k9 Move block of text
saved/exited nano
Then tested it:
$ jpico .jpicorc
pressed F2 - took me to end of file
pressed F1 - took me to the top of the file
pressed F10 - exited
To write an article like this:
$ jpico ~/editors.txt
and start writing, it will be saved in my /home, when i'm thru i press
F10, bye bye.
Reference:
How to Customize Joe
http://ed.asisaid.com/jostrokes.html
Last edited by Lou on 2007-07-26 14:05, edited 1 time in total.
Devuan Jessie - IceWM - vimperator - no DM
KISS - Keep It Simple, Stupid
KISS - Keep It Simple, Stupid
I prefer GNU Emacs as my main text editor, but sometimes I use jmacs (the emacs mode of joe) for simple editing tasks. After installing joe, you can copy the /etc/joe/jmacsrc file to ~/.jmacsrc and then you can modify it to your liking. You can set a command alias in one your startup files (like ~/.bash_profile):
And then, after you log out and login again, you just need to type "jm" when you want to start jmacs.
Jmacs has an emacs-like "mode line" on top of the screen while the real Emacs has it near the bottom of the screen, but in most aspects jmacs acts more or less like Emacs. I edited the line number 199 in my ~/.jmacsrc file to look like this:This makes the mode line in jmacs to look a bit nicer, IMHO.
Here are some basic keybindings that should work both in GNU Emacs and jmacs ("C" means the Control key and "M" means the Meta or Alt key):
You can try jmacs first and if you like it, then try the real thing -- the GNU Emacs.
Code: Select all
alias jm="jmacs"
Jmacs has an emacs-like "mode line" on top of the screen while the real Emacs has it near the bottom of the screen, but in most aspects jmacs acts more or less like Emacs. I edited the line number 199 in my ~/.jmacsrc file to look like this:
Code: Select all
-rmsg %p %% %S (%r,%c) \b%u\b Ctrl-X H for help
Here are some basic keybindings that should work both in GNU Emacs and jmacs ("C" means the Control key and "M" means the Meta or Alt key):
Code: Select all
C-x C-c Exit jmacs
C-x u Undo changes
C-x C-f Find & open a file in a new buffer
C-x C-b Switch between buffers
C-x b Switch between buffers (ask for name)
C-x C-s Save changes
C-x C-w Save the edited buffer as a different file
C-x k Kill buffer (without saving changes)
M-< Move the cursor to the beginning of the buffer
M-> Move the cursor to the end of the buffer
C-l Refresh screen
EDIT FILES:
M-d Delete text from the cursor to the end of the word
C-k Delete text from the cursor to the end of the line
C-Space Set mark (to start a text selection)
M-w Copy the marked text block to the clipboard
C-w Cut the marked text block to the clipboard
C-y Paste text from the clipboard
SEARCH:
C-s Search forward
C-r Search backward
M-% Search & replace
SPLIT WINDOW:
C-x 2 Split the current window vertically
C-x o Cycle through the windows
C-x 0 Close the active window
C-x 1 Close all but the active window
"Hit the philistines three times over the head with the Elisp reference manual."
-- Michael A. Petonic --
-- Michael A. Petonic --
Possibly you need to add the same command alias also to /root/.bash_profile or /root/.bashrc?
It might make sense to make the /root/.bash_profile to look like this...
...and then add all the bash configuration stuff in /root/.bashrc
You might also want to copy your ~/.jpicorc to /root/.jpicorc
It might make sense to make the /root/.bash_profile to look like this...
Code: Select all
if [ -f /root/.bashrc ]; then
source /root/.bashrc
fi
You might also want to copy your ~/.jpicorc to /root/.jpicorc
Last edited by Lux on 2007-07-27 14:43, edited 1 time in total.
"Hit the philistines three times over the head with the Elisp reference manual."
-- Michael A. Petonic --
-- Michael A. Petonic --
OK. Maybe a slightly different command alias would work better? Try this alias:Lou wrote:I tried it, it won't work. Thanks all the same.
Code: Select all
alias sjp="sudo jpico"
"Hit the philistines three times over the head with the Elisp reference manual."
-- Michael A. Petonic --
-- Michael A. Petonic --
- canci
- Global Moderator
- Posts: 2502
- Joined: 2006-09-24 11:28
- Has thanked: 136 times
- Been thanked: 136 times
LOL, in Downtown Baghdad they don't use UNIX for sure, since they're
an American colony now, so Windows will be more frequent. Or maybe
Apple?
See: http://www.youtube.com/watch?v=xcjLEwZqcQI
Other than that, this is, as always, a great HOWTO as expected from Lou...
an American colony now, so Windows will be more frequent. Or maybe
Apple?
See: http://www.youtube.com/watch?v=xcjLEwZqcQI
Other than that, this is, as always, a great HOWTO as expected from Lou...
Stable / Asus VivoBook X421DA / AMD Ryzen 7 3700U / Radeon Vega Mobile Gfx (Picasso) / 8 GB RAM / 512GB NVMe
READ THIS:
* How to Post a Thread Here
* Other Tips and Great Resources
READ THIS:
* How to Post a Thread Here
* Other Tips and Great Resources
Re: HOWTO - my favorite editor: Joe
LOL. Not a sentiment I'd seen in a while. I used Joe in college; vi was okay, but I'd not messed with UNIX systems until about 11 years ago, and had used PCs for a few years, so something being WordStar-like really floated my boat. There really is a danger to dealing with DOS machines before anything Unixy, I suppose.Lou wrote: nano is for chumps
vim is for punks, vi is for real men
vi is better than emacs, emacs is for real geeks
and so forth... I use Joe, sorry for living.
I've gone through various fits, Joe, Emacs, Vim, jEdit, etc. I may just have to look at Joe again.
Thanks for this!
But let us not rail about justice as long as we have arms and the freedom to use them.
I've been struggling to find an editor. I think this may be the one. The only problem is, I can't get syntax highlighting to work for .css files.
I put this in the .jpicorc config file with no luck.
:include /etc/joe/syntax/css.jsf
Weird thing is, .html files highlight just fine.
And really, a CSS file doesn't need much highlighting anyway. If I could just get the ";" to be a different color, that would be enough.
I put this in the .jpicorc config file with no luck.
:include /etc/joe/syntax/css.jsf
Weird thing is, .html files highlight just fine.
And really, a CSS file doesn't need much highlighting anyway. If I could just get the ";" to be a different color, that would be enough.
Yeah I'm still googleing. I googled and read man pages till 3 last night! I also thought about booting up Lenny and seeing if any changes have happened to Joe, but for some reason Lenny don't want to boot. So now I get to fix that as well haha. I'm sure I'll get it worked out soon enough, but if anyone knows anything to speed up my search, I'd appreciate it!
howto
http://www.sysdesign.ca/guides/unixdev/
in google:
joe editor + syntax hightlighting howto
http://tinyurl.com/ywyu72
It's supposed to syntax highlight in 40 languages.
http://www.sysdesign.ca/guides/unixdev/
in google:
joe editor + syntax hightlighting howto
http://tinyurl.com/ywyu72
It's supposed to syntax highlight in 40 languages.
Devuan Jessie - IceWM - vimperator - no DM
KISS - Keep It Simple, Stupid
KISS - Keep It Simple, Stupid
I run xfce4. Thats not considered a WM is it? Maybe it is, I dono. I do need to get back on Joe. I've been on Vim for a while. I can't set still. I don't think I would mess with Vim at all if my programming teacher wasn't notorious for forcing it on everyone in almost all of his classes he teaches. I'd rather just stick with Joe. Its so straight forward.
haha, and really I shouldn't be too concerned about highlighting a stylesheet. There pretty simple on the eye.
haha, and really I shouldn't be too concerned about highlighting a stylesheet. There pretty simple on the eye.