LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 07-05-2005, 04:05 AM   #1
rohr
Member
 
Registered: Jan 2005
Distribution: debian
Posts: 44

Rep: Reputation: 15
syntax highlighting


hello, i have the following question:
in my MATLAB code i have a lot of "for...end" or "if....end" and most of them are nested one inside the other, do you know how to recognise whose "for" or "if" an "end" belongs to?
i know some editors are able to do this (vim, emacs, kwite...)

thank you!
 
Old 07-05-2005, 07:22 AM   #2
bigearsbilly
Senior Member
 
Registered: Mar 2004
Location: england
Distribution: Mint, Armbian, NetBSD, Puppy, Raspbian
Posts: 3,515

Rep: Reputation: 239Reputation: 239Reputation: 239
if you have such high levels of nesting,
maybe you should split the code into more functions.
 
Old 07-06-2005, 05:37 AM   #3
enemorales
Member
 
Registered: Jul 2004
Location: Santiago, Chile
Distribution: Ubuntu
Posts: 410

Rep: Reputation: 31
IIRC, matlab comes with an editor that does syntax highlighting...

Maybe you can look for tools for octave highlighting also, because it is very similar to matlab...

Last edited by enemorales; 07-06-2005 at 05:41 AM.
 
Old 07-06-2005, 06:07 AM   #4
dr_zayus69
Member
 
Registered: Sep 2004
Location: western massachusetts
Distribution: fedora core 3, Suse 10
Posts: 877

Rep: Reputation: 35
i don't know anything about MATLAB(is it an editor?) but i use emacs. Emacs does highlighting by default but you shouldn't stop using something you know to use an editor you may not have experience with. It is a good idea to pick an editor and learn it in and out. If you absolutely need syntax highlighting to make the code more clearer i'd think of refactoring your code. Imagine the people that may at some point look at your code that wouldn't have access to syntax highlight (like viewing it shitastic notepad) or if the person is colorblind. good luck with any route you take.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
RdHat Vim Syntax Highlighting R4z0r Linux - Software 8 09-06-2011 01:22 PM
Syntax highlighting in Gedit jriis Linux - Software 1 10-24-2005 06:16 AM
vim syntax highlighting MiniMe001 Linux - General 2 06-19-2005 11:08 AM
xemacs syntax highlighting jclark00001 Linux - Software 2 04-13-2003 04:40 PM
Vim syntax highlighting NSKL Linux - Software 2 11-09-2002 02:39 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 02:14 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