DEV Community

loading...
Cover image for Vim, the best tool for Programmers

Vim, the best tool for Programmers

jones268 profile image jones268 ・2 min read

Vim is the best text editor/IDE out there. It is the "editor of choice of old-time Unix hackers".

Vim is one of the most popular programming editors out there. It's loved by geeks for its speed, extensive feature set, and flexibility.

Vim is very powerful, and very efficient. It is fast, lightweight. It has been around for nearly 20 years, and when I'm editing text files on a remote server I always reach for vim first .

Does learning vim make sense?

Vim can be used anywhere. In the terminal, in GUI (gvim) and inside your IDE (Jetbrains, VSCode etc). It increases your productivity when writing code.

vim isn't going away either: it has grown in popularity over the last 10 years or so thanks to the efforts of a small group of dedicated developers who are working tirelessly to keep vim alive and relevant.

Since its creation in 1990 by Bram Moolenaar, a Dutch programmer who continues to develop it today, vim has evolved to be one of the most flexible text editors out there. The name vim is an acronym for "Vi IMproved" because Vim was forked from an earlier text editor called vi.

If you are new to vim, I recommend these exercises

productivity with vim

What can I do with vim?

Vim is a text editor that’s more powerful than notepad. It can do anything from editing small files to programming software. It’s been optimized for speed and efficiency which makes it great for developers.

You can do many things with Vim. Some of these features include:

  • Available on every OS you can imagine
  • Supports most popular programming languages
  • Syntax highlighting and folding
  • Unlimited Undo/Redo
  • Edit files over SSH
  • Record and replay keystrokes
  • Jump cursor through code in ways that are not possible with other editors
  • Super fast, super small editor
  • Excellent file browser built-in, with easy navigation and file operations
  • Supports plugins like NerdTree

Vim includes a GUI, visual selection mode, Unicode support, fast browsing, flexible syntax highlighting and search patterns and regular expressions.

vim

Most importantly, Vim uses a natural keyboard-oriented interface for all commands.

Some commands include:

:e filename - read file
w - jump to next word
:w - write file
:q! - quit a file without saving it
:q - quit, saving changes
:wq - write (save) and quit
Enter fullscreen mode Exit fullscreen mode

Discussion (7)

Collapse
shekhars094 profile image
Shashi shekhar

Again the illusion that every vimmer is faster in coding. reality is far from truth. any modern IDE or text editor with some extension can be as much productive from start as any Vimmer who used vim for 10 years. Every Vimmer justify there time waste. use Metago and bracket select in vscode with default vscode keybindings and then tell me how vim is better than vscode.

Collapse
waylonwalker profile image
Waylon Walker

Any great vimmer will tell you that its more about the fact that vim speaks their language the ability to wrap complex operations around simple pneumonics makes editing simple, leaving more brainpower for the actual work at hand.

Collapse
shekhars094 profile image
Shashi shekhar

but to become great vimmer it takes a lot of time. I don't think that is worth the time.IMO Vim was a great text editor but not now.

Thread Thread
waylonwalker profile image
Waylon Walker

Can't argue about that. It is something that you need to understand at more than a surface level to become effective. It's definitely not for everyone, I would not push it on anyone. I completely get the argument for wanting something that just works well out of the box sot that you can focus on your work.

Collapse
waylonwalker profile image
Waylon Walker

How did you highlight the ,'s in the gif?

Collapse
jones268 profile image
jones268 Author

Using the vim-multiple-cursors plugin github.com/terryma/vim-multiple-cu...

It's deprecated, but vim-multi is a replacement github.com/mg979/vim-visual-multi

Collapse
waylonwalker profile image
Waylon Walker

The multiple cursors looks super trick, thanks for the links. I would do the same edit with a substitute. Substitutes are super powerful when you get the hang of them. They can do whild things that would be tricky too do otherwiise.

Forem Open with the Forem app