It has been a long time since we first used custom configuration for Vim, removed vim-tiny, and then switched to Neovim. Of all support to terminal text editor, we totally forgot about Nano, a lightweight and easy to use text editor. Because user @Pero_Sar1111
mentioned Nano supports enable mouse and default configuration file (which we have never actually noticed), we decided to add default Nano’s configuration.
Editor configurations
- Enable line numbers by default
- Enable mouse. User can click to move cursor instead of only arrow keys
- Enable auto indent
- Tabsize is 4 instead of 8 (default). There is no replace tab to space.
-
Enable smooth scrollingSupported by default since Nano 4.0 -
Set morespace, allow user to use empty line under title barSupported by default since Nano 4.0 - Set locking, only allow 1 nano process edit the current files
- Enable softwrap for long lines
- Enable constantshow for staus bar
Keybinding configurations
- Remove keybinding for
Justify
- Remove keybinding for
Write out
, which similar to Save As. User can useCtrl + S
to save data to file quickly - Remove keybinding for Location. It should be enabled by
constantshow
- Unbind 2 hotkeys
Alt + \
andAlt + /
for go to last line / first line of the text file. Users can use Secondary bindingCtrl + Home
orCtrl + End
- Search text is now
Ctrl + F
instead ofCtrl + W
- Undo is now
Ctrl + Z
instead - Redo is now
Ctrl + Y
- Help is now
Ctrl + H
instead ofCtrl + G
- Go to line is now
Ctrl + G
instead - Replace text (search and replace) is now
Ctrl + R
- Open new file is now
Ctrl + O
- Paste is now
Ctrl + V
instead ofCtrl + U
. This feature uses Nano’s buffer instead of clipboard. User can useCtrl + Shift + V
to paste text in clipboard - Comment current line is
Ctrl + /
. This feature should be used for programming scripts