Why Should I Switch to Vim for Editing Code and LaTeX?

  • MHB
  • Thread starter Ackbach
  • Start date
  • Tags
    Fun
In summary, the conversation centers around the use of Vim as a text editor, with some anecdotes and jokes about the editor. The speakers express a preference for Vim over other editors, such as TextPad, and discuss its features and plugins. They also mention the importance of mastering Vim's normal mode for efficient use.
  • #1
Ackbach
Gold Member
MHB
4,155
92
I run Windows machines at the moment, but I have always had a soft spot in my heart for Linux and the open source philosophy. So I decided to start learning hard-core Vim. It's fun to see how powerful Vim is. I think I'm going to switch from TextPad to Vim for $\LaTeX$ editing now.

Cheers.
 
Computer science news on Phys.org
  • #2
I am using Linux now and used vi a long time ago. However, having distinct insert and command modes seems a little crazy to me. It was fun for a while, but I felt relief when I could finally use a normal text editor where typing text always inserts it.

Some anecdotes and jokes about vi.

I read about a guy who opened a text in a vi-like editor and wanted to type "edit." He did not switch from the command mode to insert mode, so "e" selected the whole text ("everything"), "d" deleted it, "i" switched to insert mode. Thus, the whole document was replaced by the letter "t."

From Wikipedia:

vi-vi-vi is 6-6-6 in Roman numerals.

However, "Using a free version of vi is not a sin but a penance" (Richard Stallman).

vi has two modes – "beep repeatedly" and "break everything."

Tim O'Reilly said, in 1999, that O'Reilly Media's tutorial on vi sells twice as many copies as that on Emacs (which could mean either that vi is more popular or harder to learn).

Even earlier, I used a ed-style non-visual line-oriented text editor.

A joke from here:

Let's look at a typical novice's session with the mighty ed:

Code:
golem$ ed

?
help
?
?
?
quit
?
exit
?
bye
?
hello?
?
eat flaming death
?
^C
?
^C
?
^D
?

---

Note the consistent user interface and error reportage. Ed is generous enough to flag errors, yet prudent enough not to overwhelm the novice with verbosity.
 
  • #3
Vim is the best! i use vim for my main editor to write c code. it is a great editor and for programming and latex. there are lots of plugins for c and latex.

if you use vim on windows from the installer it does not have python support. but on Linux it does. and you can use python plugins. this one works quite nice for quick calculations.

http://www.gregsexton.org/portfolio/vimcalc/

also the nerdtree plugin works nice if you are just starting out.

the trick to vim is to learn how to use normal mode very good. then only use insert mode and visual mode when you need to to. most people never figure this out and spend all there time in insert mode which is much slower and does not use the good features of vim.
 
Last edited:

FAQ: Why Should I Switch to Vim for Editing Code and LaTeX?

What is Vim and why is it important to learn?

Vim is a text editor program that is commonly used in the field of computer science and programming. It is important to learn because it allows for efficient and fast editing of text, making it a valuable tool for developers and researchers.

Is it difficult to learn Vim?

Learning Vim can be challenging at first, but with practice and dedication, anyone can become proficient in using it. There are also many online resources and tutorials available to help with the learning process.

How long does it take to become proficient in Vim?

The time it takes to become proficient in Vim varies depending on the individual's learning style and practice. However, with consistent use and practice, one can become proficient in a few weeks to a few months.

Can Vim be used for tasks other than coding?

Yes, Vim can be used for various tasks such as writing documents, editing configuration files, and even creating presentations. It is a versatile tool that can be used for any task that involves editing text.

Are there any tips for making the learning process easier?

One tip for learning Vim is to start with the basics and gradually add more commands and shortcuts to your repertoire. Also, taking breaks and practicing regularly can help in retaining the knowledge. Additionally, using plugins and customizing settings can make the learning process more enjoyable and efficient.

Back
Top