Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What are the typical use cases for vi?

Tags:

vim

vi

I recently started picking up vi, going through some tutorials and trying to get used to it. But I still have some questions about it.

It seems to be nice for small one file changes, but as soon as I start to try doing bigger things it seems to be lacking. For example I'm used to have code formatting, import organizing, simple overview over all packages and other things that an IDE gives me. I saw some tutorials on how to use vi as an IDE, but it felt awkward at best.

Now I'm just wondering, what are the typical use cases for vi? Is it typically used to edit small files, or can it be used for larger projects? And if you use it in larger projects, how do you make it work? Or would it be a lot easier to use an IDE with vi keybindings?

like image 688
Andreas Arnold Avatar asked Aug 21 '09 08:08

Andreas Arnold


People also ask

Why do we use vi?

You can use it to edit configuration files, create a grocery list, write a letter home to ask for money, create a new script, or even edit source code. Vi is often a symbolic link to Vim (Vi Improved) or an alias to Vim, an enhanced version of Vi.

How many types of vi are there?

Two modes of operation in vi are entry mode and command mode. You use entry mode to type text into a file, while command mode is used to type commands that perform specific vi functions.

What is one of the most unique features about the vi editor?

All versions of vi have the autoindent option, which, when set, automatically indents the current line by the same amount as the one next to it. This is handy for C programmers who indent their code, and for anyone else who may need to indicate some kind of structure in their text via indentation.


2 Answers

People use non-IDE editors like Vi(m) for coding due to the following reasons,

  1. They are non-distractive, allows you to concentrate on the job.
  2. They do not clutter you screen area, offers you more code space
  3. They are faster
  4. They have better/faster/cooler text manipulation at the stroke of the finger
  5. You happen to move your hands out of the keyboard less to hold the mouse, drag it here and there and click.
  6. They also have the flexibility to support other tools like debugger, document viewer, etc.
  7. They also have ways to get things like code folding, etc.

For a normal programmer whose ideal work cycle is sit, write code, test, debug, more code, test debug.. Vi offers a simplistic yet powerful environment to get the work done faster and more efficiently.

For someone who had years of using some IDE, it might be like using some prehistoric tool, but once they have been through the initial days, then there is no looking back. They'd feel like there is no better thing.

like image 198
Parthan Avatar answered Sep 25 '22 02:09

Parthan


Why, oh WHY, do those #?@! nutheads use vi?

like image 23
Pawka Avatar answered Sep 23 '22 02:09

Pawka