Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 08c46f6

Browse files
committed
Add syntax highlight for nano
1 parent 81bf5a4 commit 08c46f6

File tree

2 files changed

+43
-3
lines changed

2 files changed

+43
-3
lines changed

_build/pages/language_support.markdown

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,13 @@ The SDL and FLTK versions of SmallBASIC come with an integrated editor. If you a
99
Contents
1010
:::
1111

12-
#. [Visual Studio Code](/pages/language_support_vscode.html)
12+
1313
#. [Atom](/pages/language_support_atom.html)
1414
#. [Geany](/pages/language_support_geany.html)
15-
#. [Sublime Text](/pages/language_support_sublimetext.html)
16-
#. [KDE Kate](/pages/language_support_kdekate.html)
1715
#. [jEdit](/pages/language_support_jedit.html)
16+
#. [KDE Kate](/pages/language_support_kdekate.html)
1817
#. [Micro](/pages/language_support_micro.html)
18+
#. [nano](/pages/language_support_nano.html)
19+
#. [Sublime Text](/pages/language_support_sublimetext.html)
20+
#. [Visual Studio Code](/pages/language_support_vscode.html)
1921
:::
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# SmallBASIC in nano
2+
3+
> Using nano
4+
5+
_"GNU nano is a text editor for Unix-like computing systems or operating environments using a command line interface. " ([Wikipedia](https://en.wikipedia.org/wiki/GNU_nano))_
6+
7+
8+
![Example](https://raw.githubusercontent.com/Joe7M/smallbasic.nano.syntaxcoloring/main/screenshot.png)
9+
10+
## Installation
11+
12+
- Download the file `smallbasic.nanorc` from [github](https://github.com/Joe7M/smallbasic.nano.syntaxcoloring)
13+
- Create the folder `~/.config/nano/syntax`
14+
- Copy the file "smallbasic.nanorc" into that folder
15+
- Edit the nano configuration file -> `nano ~/.config/nano/nanorc`
16+
- In the section `## === Syntax coloring ===` add `include "~/.config/nano/syntax/*.nanorc"`
17+
18+
## Tweaking nano
19+
20+
Depending on your Linux distribution the default nano settings are a little bit disappointing.
21+
But fortunately you can tweak nano quite a bit by activating some settings in `nanorc`.
22+
Just remove the comments for:
23+
24+
1. `set autoindent`
25+
2. `set indicator`
26+
3. `set linenumbers`
27+
4. `set minibar`
28+
5. `set mouse`
29+
6. Remove the comments in the section `### Paint the interface elements of nano` to make nano colorful.
30+
7. `include "/usr/share/nano/*.nanorc"`
31+
8. To get more common keyboard shortcuts like CTRL+C for copy uncomment all the commands in the section
32+
`## If you would like nano to have keybindings that are more "usual"`
33+
34+
## A useful hint
35+
36+
If you use nano in a console you can suspend it by pressing `CTRL-Z`. After pressing `CTRL-Z` you are on the
37+
console and you can i.e. start the console version of SmallBASIC to test your program. After testing
38+
you can switch back to the suspended nano by executing the command `fg` in the console.

0 commit comments

Comments
 (0)