empire
Posts: 42
Joined: Thu Jun 14, 2012 2:00 pm

Text Editor with decent syntax highlighting

Fri Jun 22, 2012 3:09 pm

I currently use Notepad to code PHP on my main Windows PC -- I would love to begin coding on Linux machines + the RPi, but I have not yet found a decent and easy to use text editor with good syntax highlighting.

Does anyone else code PHP on Linux/Rpi? If so, which editor do you use? :)
http://rpi-blog.com - Raspberry Pi guides, tips, tricks, and resources :-)

andyl
Posts: 265
Joined: Tue Jan 10, 2012 11:05 am

Re: Text Editor with decent syntax highlighting

Fri Jun 22, 2012 3:19 pm

empire wrote:I currently use Notepad to code PHP on my main Windows PC -- I would love to begin coding on Linux machines + the RPi, but I have not yet found a decent and easy to use text editor with good syntax highlighting.

Does anyone else code PHP on Linux/Rpi? If so, which editor do you use? :)
You use Notepad?? That doesn't do syntax highlighting either.

But there are plenty of syntax highlighting editors. Geany for one. Scite is another.

Emacs can do syntax colouring from the command line without any GUI.

empire
Posts: 42
Joined: Thu Jun 14, 2012 2:00 pm

Re: Text Editor with decent syntax highlighting

Fri Jun 22, 2012 8:52 pm

Whoops, I meant notepad++ ;) Will check out the others you suggested :)
http://rpi-blog.com - Raspberry Pi guides, tips, tricks, and resources :-)

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 17889
Joined: Sat Jul 30, 2011 7:41 pm

Re: Text Editor with decent syntax highlighting

Fri Jun 22, 2012 9:35 pm

gedit
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Please direct all questions to the forum, I do not do support via PM.

jmacey
Posts: 135
Joined: Thu May 31, 2012 1:05 pm

Re: Text Editor with decent syntax highlighting

Fri Jun 22, 2012 9:39 pm

vim as well (my preferred console editor) just need to add syntax on to you .vimrc

http://www.cyberciti.biz/faq/turn-on-or ... vi-or-vim/

User avatar
bhoga
Posts: 10
Joined: Sun Jun 03, 2012 7:33 pm
Location: Brighton, UK
Contact: Website

Re: Text Editor with decent syntax highlighting

Sun Jun 24, 2012 10:02 am

/me considers mentioning emacs and thereby initiate an emacs vs vi thread ...! :D

spacemacgyver
Posts: 4
Joined: Mon May 28, 2012 6:43 pm

Re: Text Editor with decent syntax highlighting

Wed Jul 25, 2012 4:01 am

Being a vim guy who uses it exclusively for PHP development, I can say that if you are willing to get around the [steep] learning curve, it pays off tremendously. Not knowing emacs at all (with the exclusion of the fishbowl-shaped variety), I can't argue its merits or lack thereof, and the internet has done so ad nauseum already.

If you need quick-and-dirty, and still have access to your Windows computer, you could always use WinSCP (or perhaps Filezilla client using SFTP, though I've yet to test that) to access the Pi's filesystem, and have it open .php files using your Windows editor of choice. Basically, it creates a local temp copy for you to modify, and when you save changes it gets persisted back to your SSH endpoint. For the record, I use this technique to get access to my Windows system's installation of GVim :) -- but it would work just as well with any other text editor.

kobzar
Posts: 37
Joined: Tue Jul 17, 2012 1:09 pm
Location: Ukraine

Re: Text Editor with decent syntax highlighting

Wed Jul 25, 2012 6:14 am

Just try Sublime Text 2 for X and VIM on console....
No Fate!

Rabjerg
Posts: 31
Joined: Fri Jun 29, 2012 7:56 am

Re: Text Editor with decent syntax highlighting

Wed Jul 25, 2012 7:31 am

I'm +1 for Sublime Text, using it to edit Python and XML.
http://www.sublimetext.com/2

pwinwood
Posts: 69
Joined: Mon Jul 02, 2012 2:21 am
Location: Oxford, England

Re: Text Editor with decent syntax highlighting

Wed Jul 25, 2012 7:37 am

If you are using Notepad++ on Windows then you may be comfortable with the Scite which also uses the Scintilla editing component and is light weight, cross platform and has colour syntax highlighters and folding algorithm for many languages - but you will need to be running 'X'. Scintilla is packaged for Debian - 'sudo apt-get install scite' I think.
Full disclosure: I am a contributor to the Scite/Scintilla project so naturally I am a little biased: :lol:

User avatar
RaTTuS
Posts: 9491
Joined: Tue Nov 29, 2011 11:12 am
Location: North West UK

Re: Text Editor with decent syntax highlighting

Wed Jul 25, 2012 7:50 am

vi ....... it makes sense in the long run
How To ask Questions :- http://www.catb.org/esr/faqs/smart-questions.html
WARNING - some parts of this post may be erroneous YMMV

1QC43qbL5FySu2Pi51vGqKqxy3UiJgukSX
Covfefe

Linkas
Posts: 6
Joined: Fri Jun 15, 2012 7:59 am

Re: Text Editor with decent syntax highlighting

Wed Jul 25, 2012 8:47 am

Emacs- great editor with many extensions.

khh
Posts: 49
Joined: Thu Jul 26, 2012 12:16 am

Re: Text Editor with decent syntax highlighting

Thu Jul 26, 2012 1:31 am

Personally I've always used kwrite or kate, which included by default on KDE.

SirLagz
Posts: 1705
Joined: Mon Feb 20, 2012 8:53 am
Location: Perth, Australia
Contact: Website

Re: Text Editor with decent syntax highlighting

Thu Jul 26, 2012 2:00 am

No one a fan of nano ?
That's my weapon of choice at the moment.
My Blog - http://www.sirlagz.net
Visit my blog for Tips, Tricks, Guides and More !
WiFi Issues ? Have a look at this post ! http://www.raspberrypi.org/phpBB3/viewtopic.php?f=28&t=44044

User avatar
sovet
Posts: 5
Joined: Wed Jul 25, 2012 7:10 am
Location: U.S
Contact: Website

Re: Text Editor with decent syntax highlighting

Thu Jul 26, 2012 5:16 am

You should echo and pipe your code in its entirety every time you want to recompile. :lol: But really I find geany to be quite nice, though I've played with vim a bit and it does seem that it'd be quicker once you learn it well.
So I could spam nonsense on the whole forum with one little text box huh?

User avatar
AndrewS
Posts: 3625
Joined: Sun Apr 22, 2012 4:50 pm
Location: Cambridge, UK
Contact: Website

Re: Text Editor with decent syntax highlighting

Thu Jul 26, 2012 12:34 pm

At one of the "breakout sessions" after the recent Cambridge RaspberryJam, Eben declared that "ed is the One True Editor" :)

empire
Posts: 42
Joined: Thu Jun 14, 2012 2:00 pm

Re: Text Editor with decent syntax highlighting

Sat Jul 28, 2012 7:14 am

I have been using Nano for any command line editing, because I use it at work too, and I will try out scite first because I have used it in windows several times :-)

Thanks for all your suggestions :-)
http://rpi-blog.com - Raspberry Pi guides, tips, tricks, and resources :-)

User avatar
jackokring
Posts: 815
Joined: Tue Jul 31, 2012 8:27 am
Location: London, UK
Contact: ICQ

Re: Text Editor with decent syntax highlighting

Tue Jul 31, 2012 8:39 am

I wonder if mc "midnight commander" is available? good at C highlighting. and command line.
Pi[NFA]=B256R0USB CL4SD8GB Raspbian Stock.
Pi[Work]=A+256 CL4SD8GB Raspbian Stock.
My favourite constant 1.65056745028

KCarscadden
Posts: 56
Joined: Sat Jun 09, 2012 9:00 pm
Location: Canada

Re: Text Editor with decent syntax highlighting

Tue Jul 31, 2012 8:25 pm

Midnight Commander is available. To get it, do

sudo apt-get install mc

then just

mc

to run it. It appears to run OK, but I use emacs, so can't go into any detail.

User avatar
fos
Posts: 100
Joined: Wed Nov 16, 2011 1:48 am
Location: Texas & Kansas, United States
Contact: Website

Re: Text Editor with decent syntax highlighting

Wed Aug 08, 2012 7:37 am

jed is a nice text based editor. It has drop down menus using the F10 key and "key" letters. It color highlights well.

To install:

apt-get install jed

Jeff

PS. I still prefer vim but I started with c and unix many years ago.
http://greersfos.com

User avatar
kirbyman62-2
Posts: 35
Joined: Sun May 13, 2012 11:03 am
Location: Northampton, England

Re: Text Editor with decent syntax highlighting

Sat Aug 11, 2012 11:26 am

jamesh wrote:gedit
I found I couldn't get that working in the Wheezy image, is it sorted out for Raspbian?

I use nano or Geany on the R-Pi, though I'm very fond of Notepad++ myself as well.

Return to “General discussion”

Who is online

Users browsing this forum: No registered users and 35 guests