Score:5

Which CLI text editor does not waste screen space?

jp flag

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.

enter image description here

Note: Consider explaining your downvote.

MTCoster avatar
nl flag
You can [hide Vim's status & command lines](https://unix.stackexchange.com/q/140898/62484).
tejasvi88 avatar
jp flag
@MTCoster It does not remove the command line, only hides its content. [This answer](https://superuser.com/questions/619765/hiding-vim-command-line-when-its-not-being-used) is more explicit. There is an abandoned [PR](https://github.com/neovim/neovim/pull/4382) for neovim for this feature.
tejasvi88 avatar
jp flag
@24601 Unfortunately TextRoom is GUI.
vanadium avatar
cn flag
Not sure why the question is unclear? Sure, it is ranty, but the question is clear: remove any title bar or status bar from the editing screen. Gedit in full screen mode cuts it perfectly, but we need terminal editor here.
paladin avatar
kr flag
`ed` doesn't waste any space, or just use `cat` via `clear;cat>>~/mytext.txt`.
Score:7
cn flag

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:

screenshot of emacs with the status bar

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:

screenshot of emacs without the status bar

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.

Someone avatar
my flag
Wow it is actually really good !!! , just downloaded it .
Score:1
vn flag

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.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.