Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

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.

enter image description here

Note: Consider explaining your downvote.

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

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.

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading