Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
mp = nano with highlighting (very nice)
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks
View previous topic :: View next topic  
Author Message
RedBeard0531
Guru
Guru


Joined: 21 Sep 2002
Posts: 415
Location: maryland

PostPosted: Thu Jun 26, 2003 4:56 am    Post subject: mp = nano with highlighting (very nice) Reply with quote

emerge mp

Add this line to ~/.bashrc
alias mp="mp -m sh"

Use this if you want to be able to place the curser with the mouse
alias mp="mp -m sh --mouse"

open a file
mp <filename>

To access the menu use alt+a.
_________________
OH MY GOD! Kenny just killed Kenny!
That Basterd!
Back to top
View user's profile Send private message
Pindrop
Apprentice
Apprentice


Joined: 09 Jul 2002
Posts: 165
Location: Virginia, USA

PostPosted: Thu Jun 26, 2003 2:58 pm    Post subject: Reply with quote

I'm impressed, this is a really nice editor. Thanks for the tip!
Back to top
View user's profile Send private message
dylix
Apprentice
Apprentice


Joined: 20 Sep 2002
Posts: 261
Location: Atlanta

PostPosted: Thu Jun 26, 2003 6:23 pm    Post subject: Reply with quote

nice, thanks for the info!
_________________

Rape is such a strong word, I prefer surprise sex.
http://plutonic.mine.nu/
Back to top
View user's profile Send private message
frippz
Guru
Guru


Joined: 22 Aug 2002
Posts: 460
Location: Malmö, Sweden

PostPosted: Sat Jun 28, 2003 7:00 am    Post subject: Reply with quote

Just what I've been looking for! Great tip! Thanks! :)
Back to top
View user's profile Send private message
Anacific
Apprentice
Apprentice


Joined: 05 Jun 2003
Posts: 210
Location: Toronto, Canada

PostPosted: Mon Jun 30, 2003 9:24 pm    Post subject: Reply with quote

This is great!! Thanks for the tip!
_________________
warning: `class GroveImpl' only defines a private destructor and has no friends.
Back to top
View user's profile Send private message
RedBeard0531
Guru
Guru


Joined: 21 Sep 2002
Posts: 415
Location: maryland

PostPosted: Thu Jul 03, 2003 3:21 am    Post subject: Reply with quote

Can anyone think of a reason this shouldnt replace nano as the default editor, or atleast be on the next livecd? If not, ill shoot an email off to the devs.
_________________
OH MY GOD! Kenny just killed Kenny!
That Basterd!
Back to top
View user's profile Send private message
PowerFactor
Veteran
Veteran


Joined: 30 Jan 2003
Posts: 1693
Location: out of it

PostPosted: Thu Jul 03, 2003 6:27 am    Post subject: Reply with quote

It doesn't handle function keys corectly in X for me. Same with the home and end keys. Works fine in the console though. Anyone else?
Back to top
View user's profile Send private message
nempo
Guru
Guru


Joined: 16 Apr 2002
Posts: 360
Location: Linkoping, Sweden

PostPosted: Thu Jul 03, 2003 9:57 am    Post subject: Reply with quote

PowerFactor wrote:
It doesn't handle function keys corectly in X for me. Same with the home and end keys. Works fine in the console though. Anyone else?


I have this problem with nano so it isn't just mp.
_________________
homeobocks wrote:
superjaded wrote:

would Big Brother become a reality?

Yeah . . . it would be just like the tv show. Except somebody would be watching.
Back to top
View user's profile Send private message
RedBeard0531
Guru
Guru


Joined: 21 Sep 2002
Posts: 415
Location: maryland

PostPosted: Thu Jul 03, 2003 3:15 pm    Post subject: Reply with quote

PowerFactor wrote:
It doesn't handle function keys corectly in X for me. Same with the home and end keys. Works fine in the console though. Anyone else?


Hmm.... Itried this with all the xterms I have. For some reason it works fine in Eterm, but not in xterm or konsole(my favorite).

There is a new version 3.2.8 that isnt in portage yet, mabey it fixes this. I'd check it, but I dont have time right now. Also if you have gtk installed check out gmp. It opens a tabed editor with the same highlighting and commands as the console verson.
_________________
OH MY GOD! Kenny just killed Kenny!
That Basterd!
Back to top
View user's profile Send private message
PowerFactor
Veteran
Veteran


Joined: 30 Jan 2003
Posts: 1693
Location: out of it

PostPosted: Thu Jul 03, 2003 4:35 pm    Post subject: Reply with quote

nempo wrote:
I have this problem with nano so it isn't just mp.

Hmm, nano works fine for me.

RedBeard0531 wrote:
Hmm.... Itried this with all the xterms I have. For some reason it works fine in Eterm, but not in xterm or konsole(my favorite).
I didn't even think to try it in anything but konsole and xterm. It works in eterm for me too. In rxvt it gets the function keys right but not home and end. I hope the new version fixes it. Otherwise it looks great.
Back to top
View user's profile Send private message
JensZ
Guru
Guru


Joined: 15 Feb 2003
Posts: 339
Location: Freiburg

PostPosted: Thu Jul 03, 2003 5:13 pm    Post subject: Reply with quote

great programm, thanks for tha advice...
Back to top
View user's profile Send private message
Proteus
Guru
Guru


Joined: 14 Jul 2002
Posts: 346
Location: Hamburg, Germany

PostPosted: Thu Jul 03, 2003 9:04 pm    Post subject: Reply with quote

It misses the strg+k shortcut to cut and paste whole lines.
I need that! Often!

So it seems I'll stay with nano - but I really liked the highlighting in mp.
_________________
Greetings,
Proteus
Back to top
View user's profile Send private message
quirx
n00b
n00b


Joined: 27 Jul 2003
Posts: 14

PostPosted: Sun Jul 27, 2003 11:32 am    Post subject: Reply with quote

btw. nano has syntax highlighting....
check man nanorc and /usr/share/doc/nano-1.2.1/nanorc.sample.gz...
Back to top
View user's profile Send private message
thraxil
n00b
n00b


Joined: 04 Apr 2003
Posts: 46
Location: nyc

PostPosted: Fri Aug 01, 2003 6:05 pm    Post subject: Reply with quote

mp looks ok. i like the ability to position the cursor with the mouse.

unfortunately, it isn't very well documented (no man page), and doesn't support basic emacs-style cursor movement commands. i long ago trained my hands to use C-n, C-p, C-b, C-f, C-a, and C-e instead of arrow keys and now it's hardwired into my nervous system. emacs supports those, bash supports them, nano supports them, even textareas in mozilla support them. i'm essentially crippled in any program that doesn't support them. i can't use windows for more than 2 minutes without spawning a bunch of print dialogs just because i wanted to go to the previous line.

if mp has a way of remapping the commands so they work, it might be usable. unfortunately, i have no idea if that's possible since there isn't a manpage.

i think i'll just wait for the new version of nano with syntax highlighting.
Back to top
View user's profile Send private message
Epcylon
n00b
n00b


Joined: 24 Nov 2002
Posts: 34
Location: Oslo, Norway

PostPosted: Fri Aug 01, 2003 6:38 pm    Post subject: Reply with quote

The version of nano currently in portage (1.2.1 iirc) already has syntax highlighting... it just doesn't have any highlighting patterns.

The sample nanorc has support for C/C++ highlighting, but that's it. Which brings me to my next point:

With the amount of Pythoneers using Gentoo, I'm guessing I'm not the first one to want syntax highlighting for python in nano... are there anyone who has bothered to sit down and make one?

Other languages like PHP, bash, java are also wanted if you have them... :)
_________________
Epcylon
Back to top
View user's profile Send private message
snutte
Apprentice
Apprentice


Joined: 24 Apr 2002
Posts: 181
Location: Sweden, Malmö

PostPosted: Fri Aug 01, 2003 8:24 pm    Post subject: Reply with quote

Neat :)
Back to top
View user's profile Send private message
eeknay
Guru
Guru


Joined: 07 Jul 2003
Posts: 402
Location: EndOfTheRainbow

PostPosted: Fri Aug 01, 2003 10:43 pm    Post subject: Reply with quote

hm, i'd like to use the highlighting, but where exactly do i alter the file? and where the heck do i find it? :roll:
_________________
Linda: "The holiday season is time of celebration for most but it is also the time to remember the tragic suffering of the less fortunate."
Morbo: "Earthlings do not yet know the meaning of suffering."
Back to top
View user's profile Send private message
marshall_j
Tux's lil' helper
Tux's lil' helper


Joined: 22 Jan 2003
Posts: 98
Location: NZ

PostPosted: Sat Aug 02, 2003 1:44 am    Post subject: Reply with quote

To get basic syntax highlighting for nano do something like this:

Code:

gzcat /usr/share/doc/nano<versionnumber>/nanorc.sample.gz > $HOME/.nanorc


This will create the file in your home dir and all you should have to do is add your own syntax highlighting or use the examples supplied.
A simple on I use is
Code:

syntax "default" ".*"
color white "^#.*"


which just highlights comments in files.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum