intial upload of lartu's original code
This commit is contained in:
12
nano/README
Normal file
12
nano/README
Normal file
@@ -0,0 +1,12 @@
|
||||
+-----------------------------------+
|
||||
| LDPL Syntax Highlighting for nano |
|
||||
| by Martín del Río |
|
||||
+-----------------------------------+
|
||||
|
||||
[Installing]
|
||||
To install LDPL syntax highlighting for the nano editor just
|
||||
run the install.sh file found in the same folder as this README.
|
||||
|
||||
[Uninstalling]
|
||||
Remove LDPL releated lines from ~/.nanorc
|
||||
Delete ~/.nano/ldpl.nanorc
|
14
nano/install.sh
Executable file
14
nano/install.sh
Executable file
@@ -0,0 +1,14 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Check if ~/.nano directory exists
|
||||
if [ ! -d "$HOME/.nano" ]; then
|
||||
echo "Creating ~/.nano directory..."
|
||||
mkdir ~/.nano
|
||||
fi
|
||||
|
||||
# Copy ldpl.nanorc to ~/.nano
|
||||
echo "Copying ldpl.nanorc to ~/.nano"
|
||||
cp ldpl.nanorc ~/.nano/ldpl.nanorc
|
||||
|
||||
# Add ldpl.nanorc to .nanorc
|
||||
echo "include $HOME/.nano/ldpl.nanorc" >> ~/.nanorc
|
50
nano/ldpl.nanorc
Normal file
50
nano/ldpl.nanorc
Normal file
@@ -0,0 +1,50 @@
|
||||
syntax "LDPL" ".(ldpl|lsc)$"
|
||||
|
||||
color red "\".*?\""
|
||||
color red "(|-)[0-9][0-9]*"
|
||||
# Numbers, Strings & Constants
|
||||
|
||||
color magenta "(end if|if|then|while|do|repeat|for each|for|else)"
|
||||
# Blocks
|
||||
|
||||
color yellow "(substring|length|trim|push|clear|copy|accept|execute|write|append)"
|
||||
color yellow "(floor|modulo|by|display|get|random|replace|split|count)"
|
||||
color yellow "(return|call|with|exit|wait|milliseconds|goto|solve|join)"
|
||||
color yellow "(is|of|store|in|:|return|and|or|from|to|step|break|continue)"
|
||||
color yellow "(and store exit code in|to file|until eof|load file)"
|
||||
color yellow "(get key count of|get keys of|and store ouput in)"
|
||||
color yellow "(store quote|end quote|get index of|delete last element of)"
|
||||
color yellow "(get character at|get length of|get ascii character)"
|
||||
# Statements
|
||||
|
||||
color magenta "(is greater than or equal to|is less than or equal to)"
|
||||
color magenta "(is greater than|is less than|is equal to|is not equal to)"
|
||||
# Comparisons
|
||||
|
||||
color cyan "(number|text|list|map)"
|
||||
color cyan "(numbers|texts|lists|maps)"
|
||||
# Data types
|
||||
|
||||
color green "(crlf|lf)"
|
||||
color green "(linux|macos|android|bsd|emscripten)"
|
||||
# OS
|
||||
|
||||
color green "(using package|flag|extension|label)"
|
||||
color green "(external|local data|data|procedure|parameters|include)"
|
||||
# Sections
|
||||
|
||||
color cyan "(create statement|executing)"
|
||||
color cyan "(end sub|sub)"
|
||||
color cyan "(end sub-procedure|sub-procedure)"
|
||||
# Sub-Procedure Stuff
|
||||
|
||||
color cyan "(\:|\+|\-|\*|\/|\(|\)|\%)"
|
||||
# Operators
|
||||
|
||||
color red "\".*\""
|
||||
color red "(|-)[0-9][0-9]*"
|
||||
# Numbers, Strings & Constants
|
||||
|
||||
color green "\#.*"
|
||||
# Comments
|
||||
|
Reference in New Issue
Block a user