Can u please suggest name different types of modes used in VI editor?

medacess

New Member
Joined
Mar 2, 2023
Messages
1
Reaction score
0
Credits
11
VI editor (Visual Editor) is basically a default text editor that usually comes with most of the Linux OS...
 


Welcome to Linux.org

usually comes with most of the Linux OS...
It does not come with Linux Mint.

If you have this app....where did you download it from?.....Read the description of its various modes, there.
 
Welcome to Linux.org


It does not come with Linux Mint.

If you have this app....where did you download it from?.....Read the description of its various modes, there.
I think he is referring to "vi", which is almost universal on every Unix and Linux system I have ever seen. I have a recently installed "plain vanilla" Linux Mint Cinnamon and "vi" is there. On my Linux Mint Cinnamon:
  • vi is in /usr/bin/
  • vi is a link to /etc/alternatives/vi
  • /etc/alternatives/vi is a link to /usr/bin/vim.tiny
On other Linux distros, I have noticed that "vi" is a link to vim. To a basic user like me, they all work the same.
 
The Vim online help is not installed on this Debian GNU/Linux system.

WHY ?

Because only the "vim-tiny" package is installed, whose sole purpose is to
provide the vi command for base installations. As such, it contains a minimal
version of Vim compiled with no graphical user interface and a small subset of
features, in order to keep the package size small.

Since the "vim-runtime" package is rather huge when compared to "vim-tiny",
installing the latter does not automatically install the former.

HOW TO GET A BETTER VIM

To get a more featureful Vim binary (and a vim command, rather than just vi),
install one of the following packages: vim, vim-nox, vim-athena, vim-gtk, or

What a weird package

i stand corrected...it is there.

What the hell use it is I have zero idea !
 
good to know.
 
What the hell use it is I have zero idea !
vim-tiny is the bare minimal install of vim, with very few extensions compiled in.

vi is provided by running vim in "compatible" mode, which disables any vim extensions (there aren’t many in Vim-tiny) and makes it behave exactly like classic vi.

As @sphen pointed out - it allows config files to be edited in the terminal. This is especially useful in environments where there may be no GUI available.

For example, if you’re SSH’d into a remote server which is running in headless mode. Or if your desktop crashes after making some changes to its configuration, or you’ve changed/updated your graphics card drivers and the screen goes blank.

In cases where the desktop has crashed, or the graphics card refuses to play ball, you can typically still open a terminal via ctrl+alt+Fx (any function key from F1-F6). And in order to fix what you did, you will need to use a terminal based editor, because the GUI is unavailable.

For many years vi (via vim-tiny) was the default terminal based editor for ALL Linux distros. Vi and vim may not be quite as popular as they were. Many distros now set nano as the default terminal editor, rather than vi.bProbably because nano is a bit more intuitive/user-friendly for ordinary users, who’ve never heard of vi/vim, let alone used it. But typically, vim-tiny is still pre-installed for those of us who prefer vi/vim. And there are still quite a lot of us!! Ha ha!

Also sudo requires visudo for editing its configuration. So again, on systems that use sudo, vim-tiny is required to provide the editor for visudo.

Though visudo can be ran with other editors:
Bash:
sudo EDITOR=nano visudo
You could substitute nano in the above line, with any other terminal based editor (emacs, joe etc).

But looking at the above and thinking about it - the $EDITOR environment variable is a user-level, global environment variable that defines the default editor for the terminal.

So on systems where nano has already been made the default terminal emulator, perhaps visudo works with nano out of the box, without needing to specify it as per the above?! IDK. I’ve never tried it!

As soon as nano started to become the default terminal editor, I explicitly changed the $EDITOR environment variable back to vim in my .bash_profile config.

Anyway, the visudo invocation I shared above temporarily overrides $EDITOR, to make visudo use whatever editor is specified.

So, regardless of which terminal based editor is default, if you want to specify a different editor just for visudo, that’s how you’d do it.

Like I say, I’ve always installed and used full-fat vim as my default terminal editor. So I don’t know what visudo does by default, if nano is already set as the default editor. Does it use nano out of the box? Or does it still require the invocation I shared?! IDK!!

I’ll leave you guys to find that out, ha ha!
 
For us, Geany is pretty much universal across the kennels. We, of course, have no need for visudo, since Puppy runs as root by default.....although the option is there to set it up as a restricted, multi-user environment if the user wants to.

The reason Geany is favoured is quite simple; Puppy's "ethos" is to keep things as 'lean' as possible, so wherever we can we try to employ 'combination' apps that will suffice for multiple functions.....Geany is also a complete IDE. For those who want just a straight-forward text editor, Leafpad fills that gap.

If anybody wants a WYSIWYG / HTML editor, we find Blue Griffon seems to work nicely.


Mike. ;)
 

Members online


Top