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

  • Thread starter Thread starter Ackbach
  • Start date Start date
  • Tags Tags
    Fun
AI Thread Summary
The discussion highlights the transition from traditional text editors to Vim, emphasizing its powerful features for editing, particularly for LaTeX and programming. Users appreciate Vim's efficiency, especially its distinct modes—insert and command—which, while initially confusing, enhance productivity once mastered. Anecdotes illustrate common pitfalls for beginners, such as mistakenly executing commands in command mode. The conversation also touches on the popularity of Vim compared to Emacs, with references to humorous quotes and experiences with other editors like ed. Additionally, it notes that while Vim on Windows lacks Python support, it is fully functional on Linux, allowing for useful plugins like vimcalc and nerdtree, which enhance the editing experience. Mastery of normal mode is emphasized as key to leveraging Vim's capabilities effectively.
Ackbach
Gold Member
MHB
Messages
4,148
Reaction score
93
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
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.
 
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:
Well, the date has now passed, and Windows 10 is no longer supported. Hopefully, the readers of this forum have done one of the many ways this issue can be handled. If not, do a YouTube search and a smorgasbord of solutions will be returned. What I want to mention is that I chose to use a debloated Windows from a debloater. There are many available options, e.g., Chris Titus Utilities (I used a product called Velotic, which also features AI to prevent your computer from overheating etc...
After playing around a bit with making star maps, I found another video which introduced me to another trick that can be done using geometry nodes. This one involves fluids. For background, Blender has a fluid physics simulator, which, as the name suggests simulates the behavior of fluids. What this person did was to use geometry nodes to convert the fluid into a point cloud. Then he added a turbulence force field to "stir it around". He was then able to extract the velocity information...
I have been idly browsing what Apple have to offer with their new iPhone17. There is mention of 'Vapour cooling' to deal with the heat generated. Would that be the same sort of idea that was used in 'Heat Pipes' where water evaporated at the processor end and liquid water was returned from the cool end and back along a wick. At the extreme high power end, Vapour Phase Cooling has been used in multi-kW RF transmitters where (pure) water was pumped to the Anode / or alternative Collector and...
Back
Top