Text Editor with decent syntax highlighting


21 posts
by empire » 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 :-)
Posts: 42
Joined: Thu Jun 14, 2012 2:00 pm
by andyl » 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.
Posts: 265
Joined: Tue Jan 10, 2012 11:05 am
by empire » 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 :-)
Posts: 42
Joined: Thu Jun 14, 2012 2:00 pm
by jamesh » Fri Jun 22, 2012 9:35 pm
gedit
Soon to be unemployed software engineer currently specialising in camera drivers and frameworks, but can put mind to most embedded tasks. Got a job in N.Cambridge or surroundings? I'm interested!
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 11578
Joined: Sat Jul 30, 2011 7:41 pm
by jmacey » 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-off-color-syntax-highlighting-in-vi-or-vim/
Posts: 135
Joined: Thu May 31, 2012 1:05 pm
by bhoga » Sun Jun 24, 2012 10:02 am
/me considers mentioning emacs and thereby initiate an emacs vs vi thread ...! :D
User avatar
Posts: 10
Joined: Sun Jun 03, 2012 7:33 pm
Location: Brighton, UK
by spacemacgyver » 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.
Posts: 4
Joined: Mon May 28, 2012 6:43 pm
by kobzar » Wed Jul 25, 2012 6:14 am
Just try Sublime Text 2 for X and VIM on console....
No Fate!
Posts: 37
Joined: Tue Jul 17, 2012 1:09 pm
Location: Ukraine
by Rabjerg » 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
Posts: 31
Joined: Fri Jun 29, 2012 7:56 am
by pwinwood » 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:
Posts: 54
Joined: Mon Jul 02, 2012 2:21 am
Location: Oxford, England
by RaTTuS » Wed Jul 25, 2012 7:50 am
vi ....... it makes sense in the long run
1QC43qbL5FySu2Pi51vGqKqxy3UiJgukSX - Prosliver FTW
"That's not right, the badgers have moved the goalposts."
User avatar
Posts: 4699
Joined: Tue Nov 29, 2011 11:12 am
Location: North West UK
by Linkas » Wed Jul 25, 2012 8:47 am
Emacs- great editor with many extensions.
Posts: 6
Joined: Fri Jun 15, 2012 7:59 am
by khh » Thu Jul 26, 2012 1:31 am
Personally I've always used kwrite or kate, which included by default on KDE.
Posts: 49
Joined: Thu Jul 26, 2012 12:16 am
by SirLagz » 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
Posts: 1704
Joined: Mon Feb 20, 2012 8:53 am
Location: Perth, Australia
by sovet » 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
Posts: 5
Joined: Wed Jul 25, 2012 7:10 am
Location: U.S
by AndrewS » 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" :)
User avatar
Posts: 3069
Joined: Sun Apr 22, 2012 4:50 pm
Location: Cambridge, UK
by empire » 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 :-)
Posts: 42
Joined: Thu Jun 14, 2012 2:00 pm
by jackokring » Tue Jul 31, 2012 8:39 am
I wonder if mc "midnight commander" is available? good at C highlighting. and command line.
Pi=B256R0USB CL4SD8GB Raspbian Stock. https://sites.google.com/site/rubikcompression/strictly-long https://dl.dropboxusercontent.com/u/1615413/Own%20Work/Leptronics.pdf https://groups.google.com/forum/#!topic/comp.compression/t22ct_BKi9w
User avatar
Posts: 784
Joined: Tue Jul 31, 2012 8:27 am
Location: London, UK
by KCarscadden » 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.
Posts: 49
Joined: Sat Jun 09, 2012 9:00 pm
Location: Canada
by fos » 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://linuxagora.com
User avatar
Posts: 86
Joined: Wed Nov 16, 2011 1:48 am
Location: Texas, United States
by kirbyman62-2 » 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.
User avatar
Posts: 35
Joined: Sun May 13, 2012 11:03 am
Location: Northampton, England