• Home
  • Archive
  • Tools
  • Contact Us

The Customize Windows

Technology Journal

  • Cloud Computing
  • Computer
  • Digital Photography
  • Windows 7
  • Archive
  • Cloud Computing
  • Virtualization
  • Computer and Internet
  • Digital Photography
  • Android
  • Sysadmin
  • Electronics
  • Big Data
  • Virtualization
  • Downloads
  • Web Development
  • Apple
  • Android
Advertisement
You are here: Home » Syntax Highlighting : All About the Colorful Snippets

By Abhishek Ghosh July 7, 2012 3:39 pm Updated on July 7, 2012

Syntax Highlighting : All About the Colorful Snippets

Advertisement

Syntax Highlighting is a method for coloring certain words and characters in a text depending on their importance in in an piece of code or snippet. If you are new to WordPress for blogging purpose, you might have seen in some websites, colored texts for PHP, CSS, HTML etc. languages and markups are used. So how these colored things appears and why we basically need them ? To explain this, here is the article on Syntax Highlighting.

 

Basics of Syntax Highlighting

 

Syntax highlighting is mainly used in text editors, like we previously we wrote about gedit for editing excellent documents, program and configuration files. Syntax Highlighting is based on language elements.

Syntax highlighting improves the readability and clears the structures in the text separating comments from the actual code and it also indicates typographical mistakes more quickly, because in many cases only typo creates the problem.

Advertisement

---

Wilfred Hansen, in 1969 first used practical Syntax Highlighter in the code editor Emily.

 

Resources and Information on Syntax Highlighting

 

Syntax Highlighting in Text Editors 

 

Microsoft Windows, a great malware proof Operating System, has no Syntax Highlighting software shipped by default. However, most free UNIX like Operating System has basic text editors with Syntax Highlighting feature. Even, stripped down server OS versions of Linux has Syntax Highlighting feature, in our recent guide on Installing OpenPanel on Rackspace Cloud Server, we have used nano, a Text Editor which works in Command Line Interface (CLI) :

 

Syntax Highlighting in Nano

 

Gedit is one of the most powerful Syntax Highlighting text Editor.

 

Syntax Highlighting in web browser 

 

In most modern web browsers, like Opera, Mozilla Firefox, Google Chrome, Safari etc. has very good Syntax Highlighting feature while using the development related tools.

Please do not think that the fastest web browser named Internet Explorer has no Syntax Highlighting feature from the corollary that  Microsoft Windows by default has no Syntax Highlighting tool. It has a decade old Syntax Highlighting tool. That is better than having nothing like Notepad.

 

Syntax Highlighting in Web CMS like WordPress, Joomla!

 

GeSHi is a PHP based Generic Syntax Highlighter, which has been used in various Plugins. WP-Syntax is an age old WordPress Plugin that uses GeSHi.

 

Example of Syntax Highlighting

 

If I write this :

 

/**

* Example of Syntax Highlighting

*/

if ( !defined(‘WP_LOAD_IMPORTERS’) && !defined(‘DOING_CRON’) )
return;

require_once ABSPATH . ‘wp-admin/includes/import.php’;
require_once ABSPATH . ‘wp-admin/includes/admin.php’;

It is not possible to understand which is code part and which is not. But if I use WordPress default pre tag, it somewhat looks better :

 

Vim
1
2
3
4
5
6
7
8
9
<?php
/**
* Example of Syntax Highlighting
*/
if ( !defined('WP_LOAD_IMPORTERS') &amp;&amp; !defined('DOING_CRON') )
return;
 
require_once ABSPATH . 'wp-admin/includes/import.php';
require_once ABSPATH . 'wp-admin/includes/admin.php';

There are advanced Syntax Highlighting plugin and scripts which helps to see the code as plain text, copy in one click or print.
Signature

This Article Has Been Shared 990 Times!

Facebook Twitter Pinterest
Abhishek Ghosh

About Abhishek Ghosh

Abhishek Ghosh is a Businessman, Surgeon, Author and Blogger. You can keep touch with him on Twitter - @AbhishekCTRL.

Here’s what we’ve got for you which might like :

Articles Related to Syntax Highlighting : All About the Colorful Snippets

  • Self Hosted WordPress on Cloud Server for Dummies

    Self Hosted WordPress is itself a scary phrase to a non-tech person and add Cloud Server on it. Here is Very Easy Guide to under Self Hosted WordPress.

  • Eight Tips for Secure Cloud

    Eight Tips for Secure Cloud are for are using the extremely useful services whose security are still regarded as uncertain. What users can do in this situation?

  • 100 Tips for Building and Maintaining a Successful Blog

    100 Tips for Building and Maintaining a Successful Blog is the 2500th article published on this website.Free Infographic is also included so that you print it.

  • Installing SoundManager2 With Great 360° Player

    Installing SoundManager2 now has great looking 360° Players with Spectrum/EQ visualizations. Can be embeded in WordPress. Source Code is same of SoundCloud.

  • Install WordPress on Ubuntu or Debian PC Guide

    Install WordPress on Ubuntu or Debian PC is actually very easy. Its just running some commands from Terminal and here is full guide with Screen shots to help.

Additionally, performing a search on this website can help you. Also, we have YouTube Videos.

Take The Conversation Further ...

We'd love to know your thoughts on this article.
Meet the Author over on Twitter to join the conversation right now!

If you want to Advertise on our Article or want a Sponsored Article, you are invited to Contact us.

Contact Us

Subscribe To Our Free Newsletter

Get new posts by email:

Please Confirm the Subscription When Approval Email Will Arrive in Your Email Inbox as Second Step.

Search this website…

 

Popular Articles

Our Homepage is best place to find popular articles!

Here Are Some Good to Read Articles :

  • Cloud Computing Service Models
  • What is Cloud Computing?
  • Cloud Computing and Social Networks in Mobile Space
  • ARM Processor Architecture
  • What Camera Mode to Choose
  • Indispensable MySQL queries for custom fields in WordPress
  • Windows 7 Speech Recognition Scripting Related Tutorials

Social Networks

  • Pinterest (22.1K Followers)
  • Twitter (5.8k Followers)
  • Facebook (5.7k Followers)
  • LinkedIn (3.7k Followers)
  • YouTube (1.3k Followers)
  • GitHub (Repository)
  • GitHub (Gists)
Looking to publish sponsored article on our website?

Contact us

Recent Posts

  • Why Data Management is so Important in a Business July 6, 2022
  • Application Modernization : Cloud Can Take Your Applications to the Next Level July 5, 2022
  • Ways To Make Sure Your Online Course Outshine Others July 3, 2022
  • Will Smart Factories Become the New Assembly Line? July 2, 2022
  • The Cost of Doing Business as a Handyman July 1, 2022

About This Article

Cite this article as: Abhishek Ghosh, "Syntax Highlighting : All About the Colorful Snippets," in The Customize Windows, July 7, 2012, July 7, 2022, https://thecustomizewindows.com/2012/07/syntax-highlighting-all-about-the-colorful-snippets/.

Source:The Customize Windows, JiMA.in

This website uses cookies. If you do not want to allow us to use cookies and/or non-personalized Ads, kindly clear browser cookies after closing this webpage.

Read Privacy Policy.

PC users can consult Corrine Chorney for Security.

Want to know more about us? Read Notability and Mentions & Our Setup.

Copyright © 2022 - The Customize Windows | dESIGNed by The Customize Windows

Copyright  · Privacy Policy  · Advertising Policy  · Terms of Service  · Refund Policy