blog: additional image fixes
ci/woodpecker/push/woodpecker Pipeline failed
Details
ci/woodpecker/push/woodpecker Pipeline failed
Details
parent
476ed85e93
commit
9be77ba0c0
|
@ -17,21 +17,21 @@ As most people know, GNU nano began its life as a clone of UW pico. Pico (shor
|
||||||
|
|
||||||
The licensing problem in combination with a desire to make a more capable editor based on the overall `pico` user experience led to the creation of GNU nano.
|
The licensing problem in combination with a desire to make a more capable editor based on the overall `pico` user experience led to the creation of GNU nano.
|
||||||
|
|
||||||
In the Alpine Linux distribution, both `pico` and `nano` are available. Here's what `pico` looks like by default:![A screenshot of Pico showing some code, in its default configuation. The help options and titlebar are present.](/images/Screenshot_20210813_131025-300x210.png)
|
In the Alpine Linux distribution, both `pico` and `nano` are available. Here's what `pico` looks like by default:![A screenshot of Pico showing some code, in its default configuation. The help options and titlebar are present.](/images/Screenshot_20210813_131025.png)
|
||||||
|
|
||||||
## The default `nano` experience
|
## The default `nano` experience
|
||||||
|
|
||||||
Like with `pico`, the default UI for `nano` is quite boring to look at. Here is GNU nano displaying the same file with the default configuration:
|
Like with `pico`, the default UI for `nano` is quite boring to look at. Here is GNU nano displaying the same file with the default configuration:
|
||||||
|
|
||||||
![The GNU nano editor showing some code in its default configuration. The help bar highlights undo/redo support and other features not present in Pico.](/images/Screenshot_20210813_131745-300x210.png)As you can hopefully see, the default `nano` configuration is quite similar to that of `pico`. However, unlike `pico`, it can be changed by editing the `~/.nanorc` file.
|
![The GNU nano editor showing some code in its default configuration. The help bar highlights undo/redo support and other features not present in Pico.](/images/Screenshot_20210813_131745.png)As you can hopefully see, the default `nano` configuration is quite similar to that of `pico`. However, unlike `pico`, it can be changed by editing the `~/.nanorc` file.
|
||||||
|
|
||||||
## Building something like `vim` using `.nanorc`
|
## Building something like `vim` using `.nanorc`
|
||||||
|
|
||||||
What I want in an editor is something that basically looks like `vim`, but is modeless like `nano`. Something like this:
|
What I want in an editor is something that basically looks like `vim`, but is modeless like `nano`. Something like this:
|
||||||
|
|
||||||
![GNU nano displaying source code as I have configured it, syntax highlighting is enabled, and minibar mode also.](/images/Screenshot_20210813_132423-300x210.png)But how do we get there? The answer is simple: we use the `~/.nanorc` file.
|
![GNU nano displaying source code as I have configured it, syntax highlighting is enabled, and minibar mode also.](/images/Screenshot_20210813_132423.png)But how do we get there? The answer is simple: we use the `~/.nanorc` file.
|
||||||
|
|
||||||
![GNU nano displaying my .nanorc file. Some features are enabled, and some syntax highlighting packages are included.](/images/Screenshot_20210813_132854-300x210.png)As a result of many people wanting the same thing: `vim`\-like functionality with modeless editing, `nano` gained several third-party patches which allowed for this. For the most part, these patches (or equivalent functionality) have been included upstream in recent years.
|
![GNU nano displaying my .nanorc file. Some features are enabled, and some syntax highlighting packages are included.](/images/Screenshot_20210813_132854.png)As a result of many people wanting the same thing: `vim`\-like functionality with modeless editing, `nano` gained several third-party patches which allowed for this. For the most part, these patches (or equivalent functionality) have been included upstream in recent years.
|
||||||
|
|
||||||
Getting most of the way to a vim-like look and feel, without syntax highlighting, is quite simple. You simply need to add these lines to your `~/.nanorc` file with any recent version of `nano`:
|
Getting most of the way to a vim-like look and feel, without syntax highlighting, is quite simple. You simply need to add these lines to your `~/.nanorc` file with any recent version of `nano`:
|
||||||
|
|
||||||
|
@ -43,14 +43,16 @@ set nohelp
|
||||||
|
|
||||||
That gets you something like this:
|
That gets you something like this:
|
||||||
|
|
||||||
![GNU nano with minibar and help disabled.](/images/Screenshot_20210813_133705-300x210.png)However, that minibar looks a little ugly with the inverse text. The good news is, we can disable the inverse text by adding another snippet to `~/.nanorc`:
|
![GNU nano with minibar and help disabled.](/images/Screenshot_20210813_133705.png)
|
||||||
|
|
||||||
|
However, that minibar looks a little ugly with the inverse text. The good news is, we can disable the inverse text by adding another snippet to `~/.nanorc`:
|
||||||
|
|
||||||
\# disable inverse text for the minibar
|
\# disable inverse text for the minibar
|
||||||
set titlecolor normal,normal
|
set titlecolor normal,normal
|
||||||
|
|
||||||
The way this works is by setting the foreground and background colors for the titlebar to `normal`, which means that `nano` shouldn't change whatever color is already set. That gives us:
|
The way this works is by setting the foreground and background colors for the titlebar to `normal`, which means that `nano` shouldn't change whatever color is already set. That gives us:
|
||||||
|
|
||||||
![GNU nano with minibar enabled, help disabled, and titlecolor set to normal/normal.](/images/Screenshot_20210813_134130-300x210.png)
|
![GNU nano with minibar enabled, help disabled, and titlecolor set to normal/normal.](/images/Screenshot_20210813_134130.png)
|
||||||
|
|
||||||
## Enabling syntax highlighting
|
## Enabling syntax highlighting
|
||||||
|
|
||||||
|
@ -67,4 +69,6 @@ include "~/.nano/c.nanorc"
|
||||||
|
|
||||||
Once you do that, you're done and left with a nano that looks like this:
|
Once you do that, you're done and left with a nano that looks like this:
|
||||||
|
|
||||||
![GNU nano displaying source code as I have configured it, syntax highlighting is enabled, and minibar mode also.](/images/Screenshot_20210813_132423-300x210.png)Hopefully this post demonstrates that `nano` is a quite capable editor in its own right.
|
![GNU nano displaying source code as I have configured it, syntax highlighting is enabled, and minibar mode also.](/images/Screenshot_20210813_132423.png)
|
||||||
|
|
||||||
|
Hopefully this post demonstrates that `nano` is a quite capable editor in its own right.
|
||||||
|
|
Loading…
Reference in New Issue