Difference between revisions of "Syntax highlighting"

From Computernewb Wiki
Jump to navigation Jump to search
(Replaced content with "{{delete|garbage page, needs more work}}")
Tag: Replaced
m (Reverted edits by MrTorVandal5 (talk) to last revision by Icanttellyou)
Tag: Rollback
Line 1: Line 1:
{{delete|garbage page, needs more work}}
+
'''Syntax highlighting''' is available on this wiki. Syntax highlighting will allow you to make code much easier to read by separating it with colors.
 +
 
 +
To highlight syntax, do the following:
 +
<pre>
 +
<syntaxhighlight lang="(language)">
 +
text here
 +
</syntaxhighlight>
 +
</pre>
 +
 
 +
An example of Hello World in C with Syntaxhighlight:
 +
 
 +
<syntaxhighlight lang="C">
 +
/* Hello World */
 +
#include <stdlib.h>
 +
#include <stdio.h>
 +
int main()
 +
{
 +
    printf("Hello World\n");
 +
    return 0;
 +
}
 +
</syntaxhighlight>
 +
 
 +
==Available languages==
 +
Need a language highlight that isn't available here? Contact [[User_talk:Dartz|Dartz]] and we can see about adding it!
 +
 
 +
*ARM Assembly
 +
*Access log
 +
*ActionScript
 +
*Ada
 +
*Apache
 +
*AppleScript
 +
*AutoHotKey
 +
*AutoIt
 +
*Awk
 +
*Bash
 +
*Basic
 +
*Batch
 +
*Brainfuck
 +
*C#
 +
*C(++)
 +
*CSS
 +
*Cap'n Proto
 +
*Clean
 +
*Clojure
 +
*Cmake
 +
*CoffeeScript
 +
*Coq
 +
*Crystal
 +
*D
 +
*Dart
 +
*Delphi
 +
*Diff
 +
*Django
 +
*Dockerfile
 +
*Dust
 +
*ERB (Embedded Ruby)
 +
*Erlang
 +
*Excel
 +
*Extended Backus-Naur Form
 +
*F#
 +
*Fortran
 +
*Go
 +
*HTML
 +
*HTTP
 +
*Haml
 +
*Haskell
 +
*Ini
 +
*JSON
 +
*Java
 +
*JavaScript
 +
*Lisp
 +
*LiveScript
 +
*Lua
 +
*MIPS Assembly
 +
*Makefile
 +
*Markdown
 +
*MoonScript
 +
*Nginx
 +
*Objective-C
 +
*PHP
 +
*Perl
 +
*Pony
 +
*PowerShell
 +
*Processing
 +
*PureBASIC
 +
*Python
 +
*QML
 +
*R
 +
*Ruby
 +
*Rust
 +
*SQL
 +
*Scheme
 +
*Shell Session
 +
*Smalltalk
 +
*TypeScript
 +
*VB.Net
 +
*VBScript
 +
*VBScript in HTML
 +
*Vim Script
 +
*XML
 +
*x86 Assembly
 +
 
 +
[[Category:Tutorials]]

Revision as of 19:11, 22 December 2019

Syntax highlighting is available on this wiki. Syntax highlighting will allow you to make code much easier to read by separating it with colors.

To highlight syntax, do the following:

<syntaxhighlight lang="(language)">
text here
</syntaxhighlight>

An example of Hello World in C with Syntaxhighlight:

/* Hello World */
#include <stdlib.h>
#include <stdio.h>
int main()
{
    printf("Hello World\n");
    return 0;
}

Available languages

Need a language highlight that isn't available here? Contact Dartz and we can see about adding it!

  • ARM Assembly
  • Access log
  • ActionScript
  • Ada
  • Apache
  • AppleScript
  • AutoHotKey
  • AutoIt
  • Awk
  • Bash
  • Basic
  • Batch
  • Brainfuck
  • C#
  • C(++)
  • CSS
  • Cap'n Proto
  • Clean
  • Clojure
  • Cmake
  • CoffeeScript
  • Coq
  • Crystal
  • D
  • Dart
  • Delphi
  • Diff
  • Django
  • Dockerfile
  • Dust
  • ERB (Embedded Ruby)
  • Erlang
  • Excel
  • Extended Backus-Naur Form
  • F#
  • Fortran
  • Go
  • HTML
  • HTTP
  • Haml
  • Haskell
  • Ini
  • JSON
  • Java
  • JavaScript
  • Lisp
  • LiveScript
  • Lua
  • MIPS Assembly
  • Makefile
  • Markdown
  • MoonScript
  • Nginx
  • Objective-C
  • PHP
  • Perl
  • Pony
  • PowerShell
  • Processing
  • PureBASIC
  • Python
  • QML
  • R
  • Ruby
  • Rust
  • SQL
  • Scheme
  • Shell Session
  • Smalltalk
  • TypeScript
  • VB.Net
  • VBScript
  • VBScript in HTML
  • Vim Script
  • XML
  • x86 Assembly