SmallBASIC in nano
Using nano
“GNU nano is a text editor for Unix-like computing systems or operating environments using a command line interface.” (Wikipedia)
Installation
- Download the file
smallbasic.nanorc
from github - Create the folder
~/.config/nano/syntax
- Copy the file “smallbasic.nanorc” into that folder
- Edit the nano configuration file ->
nano ~/.config/nano/nanorc
- In the section
## === Syntax coloring ===
addinclude "~/.config/nano/syntax/*.nanorc"
Tweaking nano
Depending on your Linux distribution the default nano settings are a
little bit disappointing. But fortunately you can tweak nano quite a bit
by activating some settings in nanorc
. Just remove the
comments for:
set autoindent
set indicator
set linenumbers
set minibar
set mouse
- Remove the comments in the section
### Paint the interface elements of nano
to make nano colorful. include "/usr/share/nano/*.nanorc"
- To get more common keyboard shortcuts like CTRL+C for copy uncomment
all the commands in the section
## If you would like nano to have keybindings that are more "usual"
A useful hint
If you use nano in a console you can suspend it by pressing
CTRL-Z
. After pressing CTRL-Z
you are on the
console and you can i.e. start the console version of SmallBASIC to test
your program. After testing you can switch back to the suspended nano by
executing the command fg
in the console.