-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
124 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# Nano backups | ||
*~ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# How To Contribute | ||
1. Check if any issue are open and not resolved yet | ||
1. Fork the repository | ||
1. Modify the content | ||
1. Install and test the rc file using installation procedure | ||
1. Commit your edits | ||
1. Open pull request to the main branch | ||
1. Wait | ||
|
||
Thank you for your interest in contributing, we are looking forward for your PR |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,22 @@ | ||
# nano-gdscript | ||
GDScript Syntax Highlighting in GNU Nano | ||
GDScript Syntax Highlighting in GNU Nano. Updated regularly every minor updates. | ||
Contributions are welcomed | ||
|
||
# Installation | ||
This is 100% free, proof: | ||
1. Admit that `install` is an executable | ||
```sh | ||
chmod +x install | ||
``` | ||
2. Start the installation | ||
```sh | ||
./install | ||
``` | ||
3. Test it | ||
```sh | ||
nano test.gd | ||
``` | ||
|
||
# End Notes | ||
Nano is a great tool overall, its simplicity allows us to improve it. | ||
This rc file is unlicensed, use it in any way you want |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
# GNU Nano Syntax Highlighter for GDScript (*.gd) | ||
# Contributors, please read CONTRIBUTING.md | ||
# otherwise your pull request would be closed | ||
syntax gdscript "\.gd$" | ||
|
||
comment "#" | ||
|
||
# Numbers | ||
color orange "\<[0-9]*\>" | ||
color orange "\<0x[0-9a-fA-F]*\>" | ||
|
||
# Function Calls | ||
color cyan "[_a-zA-Z]*[0-9]*\(" | ||
|
||
# Operators | ||
color white "(\!|\%|\&|\*|\(|\)|\-|\+|\=|\{|\}|\[|\]|\/)" | ||
|
||
# Class | ||
color lightcyan "\<[A-Z]+[_a-zA-Z0-9]*\>" | ||
## Class Property | ||
color white "\.[_a-zA-Z]+[0-9]*" | ||
|
||
# Constants | ||
color white "\<[A-Z_]+\>" | ||
|
||
# Keywords | ||
## Conditions | ||
color bold,lightred "\<(if|elif|else|match|switch|case)\>" | ||
## Repeations | ||
color bold,lightred "\<(for|while|break|continue)\>" | ||
## Long-hand Operator | ||
color bold,lightred "\<(is|as|not|in|and|or)\>" | ||
## OOP | ||
color bold,lightred "\<(null|self|owner|parent|tool)\>" | ||
## Booleans | ||
color bold,lightred "\<(true|false)\>" | ||
## Statements | ||
color bold,lightred "\<(remote|master|puppet|remotesync|mastersync|puppetsync|sync)\>" | ||
color bold,lightred "\<(return|pass|static|const|enum|breakpoint|assert|onready)\>" | ||
color bold,lightred "\<(class_name|extends|var|export|setget|class|func|signal)\>" | ||
## Builtin Functions | ||
color bold,lightred "\<(print|funcref)\>" | ||
## Primitive Types | ||
color bold,lightred "\<(void|bool|int|float)\>" | ||
|
||
# Comment line | ||
color lightblack "^\s*#.*" | ||
|
||
# Strings | ||
color yellow "\".*\"" | ||
|
||
# Child | ||
color green "\$[\"]?[_a-zA-Z]*[0-9]*[\"]?" | ||
|
||
# Misc | ||
## Task Marker | ||
color bold,lightcyan "^\s*#\s*(TODO|FIX|HACK|XXX|NOTE|BUG)" | ||
## Notices | ||
color bold,lightyellow "^\s*#\s*(WARNING|WARN|BUGGY)" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#! /usr/bin/env sh | ||
echo "Installing requires sudo permission" | ||
echo "What we need:" | ||
echo " 1. Copy gdscript.nanorc to /usr/share/nano directory" | ||
sudo cp gdscript.nanorc /usr/share/nano | ||
echo "Done" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
extends KinematicBody2D | ||
|
||
export var speed: int = 200 | ||
export var jump_force: int = 0x5f | ||
|
||
func _process(delta): | ||
var direction = Vector2.ZERO | ||
|
||
# Vertical movement | ||
if Input.is_key_pressed(KEY_UP): | ||
direction += Vector2.UP | ||
elif Input.is_key_pressed(KEY_DOWN): | ||
direction += Vector2.DOWN | ||
|
||
# Horizontal movement | ||
if Input.is_key_pressed(KEY_UP): | ||
direction += Vector2.UP | ||
elif Input.is_key_pressed(KEY_DOWN): | ||
direction += Vector2.DOWN | ||
|
||
# WARNING: Will be processed each frame | ||
move_and_slide(Vector2.UP * speed * delta) | ||
|
||
func _ready(delta): | ||
print("Script is now ready!") | ||
$AnimatedSprite.play("default") |