Five things you can do with the nano editor

In the early stages of my experience with Linux servers, I had to learn how to edit text files using the command line. While there are other powerful text editors in Linux, such as vi and vim, I found Nano to be particularly useful. Nano is a simple yet powerful text editor that comes pre-installed on many Linux distributions. You can easily install it from the command line if it’s not pre-installed on your system.

Debian-based systems:

$ sudo apt install nano

RPM based systems:

$ sudo dnf install nano

Basic Text Editing

Nano is a user-friendly text editor designed for simple and efficient text editing. To open a file, type “nano” followed by the file name in the terminal. Once inside, you can begin typing or editing text immediately. Navigation is easy, using the arrow keys to move around. To save your changes, press Ctrl + O; to exit, press Ctrl + X.

Screen picture by Don Watkins CC by SA 4.0

Search and Replace

Nano has a valuable search and replace feature. To search for a specific term, press Ctrl + W, type your search term, and press Enter. To replace text, press Ctrl + \, enter the text you want to replace, followed by the new text. This feature is handy for quickly updating configuration files or scripts.

Undo and Redo

Mistakes happen, but Nano makes it easy to correct them with its undo and redo functionality. Press Alt + U to undo the last action and Alt + E to redo it. This feature ensures that you can quickly revert changes without losing your progress

Syntax Highlighting

Nano offers syntax highlighting for those working with code, making reading and editing code easier. Syntax highlighting is available for various programming languages and can be enabled by adding the appropriate syntax files to your Nano configuration.

Screen picture by Don Watkins CC by SA 4.0

Custom Key Bindings

Nano enables you to customize key bindings to match your workflow. You can edit the /etc/nanorc file to modify default key bindings or add new ones. This flexibility allows you to personalize the editor based on your specific requirements, enhancing your editing experience and making it more efficient.

Nano’s simplicity and powerful features make it a great choice for text editing in Linux. Whether editing configuration files, writing scripts, or taking notes, Nano has the tools to do the job efficiently.

Mastering Markdown with MarkText

A few years back, I learned about Markdown. I had never heard of it until I started exploring Jupyter Notebooks. Markdown was a familiar skill to many of my writing colleagues. It remained an uncharted territory for me.

Markdown is a universal method for composing text, employing concise notation to apply to style. For instance, rather than relying on a button click to emphasize a word, you envelop the word with two asterisks **word**.

Markdown holds a significant edge in its reliance on intuitive notations, often drawing from our ingrained habits. Employing asterisks for emphasis, and utilizing characters to distinguish headlines – these practices align seamlessly with our natural inclinations.

While its merits were extolled by many, I remained uncertain about the necessity of acquiring markdown skills. My inherent curiosity, however, drove me to delve into the realm of markdown, investigating how it could integrate into my writing endeavors.

As I underwent the learning process, I found an excellent Markdown cheat sheet online and discovered that I could write Markdown in any simple text editor like ‘nano’, ‘vim’, or ‘gedit’. While it is technically possible to use almost any text editor to write Markdown, it is much more powerful to use an editor specifically designed to output Markdown formatted documents.

I stumbled upon MarkText, a platform equipped with features that streamline markdown writing while presenting an unobtrusive interface. This tool boasts six themes, comprising three light and three dark options. I find the dark themes more comfortable to work with. Notably, the user documentation is comprehensive, and a dedicated resource for markdown syntax assistance is also available.

MarkText presents a clean, minimalistic interface with a real-time preview feature. It accommodates several markdown specifications, including Commonmark, Github Flavored Markdown, and Pandoc Markdown. Its official website shows MarkText supports markdown enhancements like KaTex, front matter, and emoji usage. The application is capable of generating both HTML and PDF output files.

Within Mark Text, you’ll find diverse editing modes such as typewriter mode, source code mode, and focus mode. Incorporating images is effortlessly achieved by copying and pasting them directly from the clipboard.

For added convenience, a pop-up situated in the upper-left corner of the Mark Text interface provides a continuous tally of the characters and paragraphs that have been entered. This proves particularly advantageous for writers.

Saving files is a straightforward task accessible via the upper-left menu of the MarkText window or by employing the Ctrl+S shortcut. Remarkably, the menus within Mark Text bear a friendly and recognizable resemblance to those found in fundamental text editors or word processors, creating a sense of familiarity for users.

The versatility of Mark Text truly impresses me, as it effortlessly accommodates many formats through simple keystroke shortcuts. These include table blocks, diagrams, inline formats, math formula blocks, and other code blocks.

You can acquire Mark Text for your respective operating system through the following links:

Mark Text is an open-source project governed by the MIT license. The latest version can always be obtained via download.

Alternatively, on macOS, you can install Mark Text using

brew install --cask mark-text

On Windows, installation can be accomplished through Chocolatey by running

choco install marktext.

Mark Text continually seeks the support of sponsors and developers. The project provides a guide for those interested in contributing. Furthermore, you can back the project on Patreon and Open Collective.

This article is adapted from Why MarkText is my favorite markdown editor