Which CLI text editor does not waste screen space?
Vim has a non-removable status bar at the bottom. Nano has the same problem with its title bar. Surely there has to be an alternative for entering text in full-screen without any frills? I often jot down ideas in a full-screen terminal with large font size and a single line space becomes critical. For instance, my entire screen looks like below with Vim.
Note: Consider explaining your downvote.
Solution 1:
Looks like a great opportunity to switch to a Real Editor! :P. Emacs can do this. It also has a bar at the bottom, and can have some at the top, but all can be disabled. You will most likely just see the bottom one in the default setup:
To disable it, add this line to your ~/.emacs
file and restart emacs:
(setq mode-line-format nil)
Or, to disable it only for this session, press Esc+: and then write (setq mode-line-format nil)
and press enter. The result looks like:
If you also have other bars active by default, adding these lines to ~/.emacs
commands will get rid of them:
To disable the menu bar, add this line to ~/.emacs
:
(menu-bar-mode -1)
To disable the scrollbar, this one:
(toggle-scroll-bar -1)
To disable the toolbar, this one:
(tool-bar-mode -1)
You can install emacs
with
sudo apt install emacs
Or, to install it for command line only, without GUI support:
sudo apt install emacs-nox
No matter which of the two you install, if you are running without a GUI (e.g. in a tty), running emacs
will open the command line version and, if you are running with a GUI, running emacs -nw
will open the command line mode in a terminal.
Answer adapted from https://stackoverflow.com/a/44188258/1081936 and http://kb.mit.edu/confluence/display/istcontrib/Disabling+the+Emacs+menubar%2C+toolbar%2C+or+scrollbar.
Solution 2:
As of GNU nano 6.0 (released 2021 December 15) a full screen mode is included, invoked with the option --zero
This mode can further be toggled with Meta + Z by default.
2021 December 15 - GNU nano 6.0 "Humor heeft ook zijn leuke kanten"
- Option --zero hides the title bar, status bar and help lines, and uses all rows of the terminal as editing area. The title bar and status bar can be toggled with M-Z.
Reference.
One important point though, is that this version requires libc6
2.33 or above, which is only included in Ubuntu 21.04 or above. So right now, if you're on 20.04 (like me), it seems you're out luck (the nano snap isn't updated regularly, and I've experienced various problems with it, unfortunately). But this will of course be redeemed with 22.04.