When should a beginner programmer learn vims/emacs?

  • Thread starter Thread starter elias001
  • Start date Start date
AI Thread Summary
Beginner programmers should consider learning Vim or Emacs after gaining basic programming skills, as these tools enhance text editing capabilities but do not replace the functionality of IDEs for larger projects. Both editors can be customized and are available in Unix-like environments, but they do not come with built-in compilers or interpreters for specific languages. While IDEs provide integrated features like error highlighting and auto-completion, Vim and Emacs are more suited for smaller tasks or personal preference. Users are encouraged to try both editors to determine which aligns best with their workflow. Ultimately, the choice of tools should support the programmer's learning and project needs.
elias001
Messages
389
Reaction score
26
Dear peeps

I want to ask as a beginning programmer, when should one learn to use vim/emacs beyond using an ide for a particular programming language?

I know there are passionate debates over which of the two are better. For the purpose of my question, such debate would go over my head. I am only interested to know say if I started out in C, C++/Matlab, then plan to go onto assembly, and Haskell. But if I need to know an object oriented language or go to some other language in a different programming language paradigm, does using vim/emacs help with anything. I understand each language comes with their own under its equivalent, regardless how old the language is.

Thank you in advance.
 
Last edited:
Technology news on Phys.org
Try them both. After enough use, you will pick the one best for whatever task you're approaching.
Since these are "personal choice" tools, you likely wouldn't put them on your resume. In most Unix-style development environments, both will be available - or could be made available will little effort.
 
@scott I was under the impression both of them can be used in a windows environment. Also, do either come with compulers, interpreters, etc for all the languages one can use them to write code in for whatever languages one has in mind? How do they compare to any specific language ide in terms of errors (like it will accept python 1.0 to its latest iteration or, from first version of C to the latest in language features updates) reliability and user friendly informative error messages?
 
For writing large C and C++ computer programs, no stand alone text editor equals an IDE.
That being said, for text editing or simple, small programs, an IDE does not help much and is not necessary.

I have always been a Vim (actually GVim) user, but I have known very expert programmers who prefer EMACS.
I would not recommend Vim as opposed to GVim (I think it's the same as vim -g). You will probably want the GUI window features of GVim. You will probably also want to customize the behavior of Vim by making/modifying your own vimrc file. I always want it to display line numbers and to allow Ctrl-c, Ctrl-v for cut and paste.
 
IDE's, Integrated Development Environments, integrate editor, compile, build, perhaps version control, and other tools into a single package. Vim and Emacs are only editors - which may be part of an IDE. And even if they are not part of the IDE, the can still be used independently to edit the code. If you do this with a file open in the IDE open, the IDE will commonly ask you if you want to update your IDE view of that changed file.

Unlike your choice of a text editor, experience working with any particular IDE is worth noting in your resume.

The other thing about Vim and Emacs is that they have been around for quite some time. Vim is based on vi which was created in 1976. Emacs also came out of the 1970's. Their creations roughly mark the time when it was practical to have a whole software source code module in memory at once.
 
@FactChecker I am still a bit confused. What is the difference between a text editor vs a dedicated language ide? So if I want to write a program using Go in either vim or emacs, do I have to download extra plug ins for either due to me using Go instead of writing the program in Haskell pr C/C++?
 
@.Scott so vim or emacs don't come with language specific dedicated compiler/interpreters or Java virtual machines. I know there are also ms visual studio and code blocks, those two are even more confusing.
 
elias001 said:
@.Scott so vim or emacs don't come with language specific dedicated compiler/interpreters or Java virtual machines. I know there are also ms visual studio and code blocks, those two are even more confusing.
At a minimum, they are just editors. They can be extended - but I have not been keeping track of them. I do like the MS Visual Studio editor (ie, the editor that is part of the MS VS IDE). One feature I especially like is the ctrl-} that jumps the cursor from an open squiggly brace to its matching close squiggly brace - or vice versa. Perhaps you could make me a version of emacs with that feature. Or perhaps there already is one.
Although I've used both vim and emacs in the past, I have also used dozens of others. But generally speaking, if an editor supports a build function, it is promoted to "IDE" status and given a new name.
 
@.Scott one other thing, for either vim or emacs on windows, I should stick to the classic vanilla versions and see if I like it. I know there is something call neovim. I am guessing if I don't like vim, then I won't probably like its descendants.
 
  • #10
elias001 said:
@FactChecker I am still a bit confused. What is the difference between a text editor vs a dedicated language ide?
I am not an expert in this, but here is the situation as I was using them:
A text editor like Vim will have language options to color-code things in any popular language. So you will know what are comments, variables, language keywords, etc. But they will not parse the language so much that they suggest autofill for what you have typed. They will not suggest autofills of variable names, function names, etc. And they will not have looked through the linked libraries to know what are valid functions that you can call, based on the parameter variable types that you have entered. They will also not know the process for compiling and linking the new code into an executable program.
An IDE will do all of that. In a large program, with a lot of functions and variables, that is a big help. In small programs it is not so helpful, and in text files it is not relevant.
 
  • #11
Old school, you would write code using a text editor and save the file. You would then run a compiler, telling it to process the file(s) of source code that you saved. It would produce binaries that you could run or, more commonly, a lot of errors telling you why it couldn't compile it.

IDEs combine that into one package, so they will look at the error output of the compiler and highlight the problems in your code so you don't have to manually hunt down line 123 in foo.java. They can also often understand the language themselves and recognise what variables (etc) are in scope, so it can offer auto-completion and look up help text and auto-generate standard code and all these quality of life improvements.

🦖🦖🦖🦖🦖🦖
Possible dinosaur warning: I think there's value in doing a small project or two using basic tools. It gets not fun quickly when the project gets big, but having a bit of experience with manually editing and compiling gives you some insight into what the IDE is doing and helps you understand why it sometimes doesn't do it and what that tells you about your broken code.

Also, I have gvim on my phone. It was developed for systems operated by dumb terminals with small keyboards, and works well with very limited onscreen phone keyboards. I don't do a lot of editing text on my phone but it's occasionally useful.
 
  • Like
Likes FactChecker
  • #12
elias001 said:
@.Scott one other thing, for either vim or emacs on windows, I should stick to the classic vanilla versions and see if I like it. I know there is something call neovim. I am guessing if I don't like vim, then I won't probably like its descendants.
I just Googled "text editors for coding". It responded with a list of 51 such editors. In a single hour, I may use Notepad, Notepad++, gedit, and the eclipse IDE editor - and then I might create a script file with lines that use sed. And if I need to automate the extraction of data from a text file, I generally use Python.

As a student programmer, I expect you will adopt a favorite editor, a favorite computer language, a favorite IDE, and a favorite OS. But you aren't marrying them. Don't get the notion that these are life-long choices.

So find a set of tools that works for you now - on whatever your next project is. Try them out. Get something actually working. Then move on to your next adventure.
 
  • Like
Likes FactChecker
  • #13
@FactChecker So a text editor is basically help people have the equivalent of flying business class or staying ay a five star hotel with the casinos and beaches down the street with three star michelin chefs, $10,000 per bottle wine service, the comps, etc etc, but for writing code with all the bells and whistles. Then one can copy the entire code documentat to an ide with a compiler to run it?
 
  • #14
elias001 said:
@FactChecker So a text editor is basically help people have the equivalent of flying business class or staying ay a five star hotel with the casinos and beaches down the street with three star michelin chefs, $10,000 per bottle wine service, the comps, etc etc, but for writing code with all the bells and whistles. Then one can copy the entire code documentat to an ide with a compiler to run it?
If you don't want to use the editor (or editors) available in the IDE, you can use the editor of your choice.
You don't need to copy anything. The IDE will build whatever source code is part of the project.

And as I said earlier, if you have a file open in the IDE for editing, and then edit that file using emacs, the IDE will probably notice and ask if you want to reload that file so that what is being displayed is the most recent version.

But even if you decline to refresh the IDE editor with the latest version of the source code, if you build, you will build with the edits made in emacs.
 
Last edited:
  • #15
@.Scott ah kk thank you. I think I have a better sense of what the text editors do from talking to you and @FactChecker.
 
  • #16
I know I'm a bit late to the party and haven't read through all the previous posts (yeah, I know) but just my $0.02. If you are just beginning learning programming, stay away from GUI based IDEs. Why? because the IDEs are designed more for rapid development that provide tools in this regard. This will impede your learning as you will become reliant on the IDE. As far as Vim vs Emacs, I know I could be insufferable as Richard Hendricks on Silicon Valley but I will not and say try both and whichever you like best, use that.
 
  • #17
uhh...
anyone else a VSCode fan? Am I missing something here? You can probably get extensions to make VSCode to everything vim/emachs can do and more... right?
 
  • #18
I use vi for one simple reason. It is always there. Drop me into a shell prompt and I can start using vi immediately. If you drop me down at a DOS command prompt, I'll use notepad for the same reason. First thing I'll do from a windowed environment is to open a command prompt.

I sometimes fire up wordpad to deal with extraneous carriage returns in migrated text files.

If push comes to shove, I also know how to use cat.
 
  • #19
TensorCalculus said:
anyone else a VSCode fan?

Yes, I am and so are 75% of the rest of the developer community.

In 2025 learning either Vim or EMACS (or Eclipse for that matter) is a waste of time and effort for someone starting out in development: there are MUCH more important challenges to cope with.

Use VS Code with the appropriate language plugins and when that is not available (e.g. configuring a linux server over ssh) use nano which is much simpler than Vi[m] or EMACS.

A possible exception to this is Python, particularly under Windows, where PyCharm does a good job of managing paths and library packages which can otherwise be a pain.
 
  • Like
Likes Mark44, berkeman and TensorCalculus
  • #20
As luck would have it, MS have screwed up the latest VS code Windows release yesterday (auto-updated for most people): the 'Open with code' option is removed from the Explorer 'right click' context menu - see this issue.

To fix this, download and install the previous, June 2025, version 102, making sure the 'Add "Open with Code' options are ticked.

1754644693242.webp


You can either stay with this, or download and install the current version but untick the 'Add "Open with Code' options like this:

1754644891129.webp


Because this is broken it will actually leave the context menu entries unchanged.

Or just wait for a patch - it is already in the nightly build but no target date for release yet.

YMMV
 
  • #21
A contractor once came to our site to customize a software product we bought.

He opened a terminal session and worked quite well using VIM. I asked him why he used VIM over EMACS. His response was simple because VIM is everywhere. It's true, EMACS is very powerful, but it needs to be installed and configured to work well, whereas Vim is just there, ready to be used.

Ever since, I have become familiar with VIM enough to do my work, especially when the machine you've signed into doesn't have an IDE or EMACS installed. Also, I don't need to worry about X Windows being configured since Vim is text-based.

VIM has a file diff feature:

Bash:
vim -d file1 file2

When switching panes, press Ctrl-W twice.
 
  • Like
Likes FactChecker
  • #22
@jedishrfu on the Pelles C forum, there was an advice that a beginner should learn to use Pelles C before moving onto something call codeblocks. Is codeblocks like Vim/Emacs one of those code writing editors? How is codeblocks differ from Vim/Emacs. I know there are also something call Atom, Sublime, and Note++.
 
  • #23
I started programming in 1968, using punched cards. There were several batch editors for text files stored on a disk drive at the companies I worked for.

The first well known text editor I used for programming was WordStar, which was popular for CP/M programmers.

https://en.wikipedia.org/wiki/WordStar

The next one I used was PE

https://en.wikipedia.org/wiki/Personal_Editor

Then Brief

https://en.wikipedia.org/wiki/Brief_(text_editor)

I'm currently using an ancient copy of CodeWright:

https://en.wikipedia.org/wiki/CodeWright
 
  • #24
@jedishrfu you must use vim and emacs a lot. I mean you remember all those keyboard shortcuts.
 
  • #25
elias001 said:
@jedishrfu on the Pelles C forum, there was an advice that a beginner should learn to use Pelles C before moving onto something call codeblocks. Is codeblocks like Vim/Emacs one of those code writing editors? How is codeblocks differ from Vim/Emacs. I know there are also something call Atom, Sublime, and Note++.

Your posts here are like those from the movie Little Buddha, where Jessie, a young boy and the possible reincarnation of a Tibetan teacher, quizzes the senior monk, Lama Norbu, on Buddhism.

After answering some of his inexhaustible stream of questions, Lama Norbu says to Jessie, "You ask an awful lot of questions," and Jessie replies, "That's how I learn."

Now back to your questions...

---

There's one correction I need to make: the quote is "Vi is everywhere". Every Unix system must carry Vi by the Single UNIX Specification also known as SUS.

Many systems carry Vim as well, but not all. Vim is very popular and has become ubiquitous in Linux. It is a superset of the Vi command.

Vim has these features:
- regular expressions for finding text
- syntax coloring based on the file extension (if the vim edit command ":syntax on" is given)
- a diff mode
- It appears on many but not all flavors of Unix, including Linux.

Vi doesn't have the syntax highlighting or the file diff feature. You need Vim for those.

In some cases, the vi command invokes vim.

Bash:
vi --version

If Vi is aliased, the vi command above will show a Vi-IMproved line, meaning it's actually calling Vim

With respect to what other programmers say about code blocks, I can't say, but I do know learning Vi/Vim is the way to go. Vi is like carrying a Swiss Army knife, always ready to use under any circumstances, so I'd suggest you learn it.

The developer machines at work had NetBeans on them, and we used that to do much of our coding. There are other IDE tools, but NetBeans came with a curated set of plugins that did what we wanted. Even still, some of our machines were stock Linux machines, and vi knowledge was crucial to maintaining and customizing them.

NetBeans was the Cadillac of IDE tools. It even had Matisse, a GUI editor that allowed you to design a GUI display while generating Java code in the backend for use in your application. My officemate was a master of its settings and intricacies, as sometimes it wasn't obvious why your GUI didn't work as expected.

Eclipse is another, but we didn't use it as its plugins were often beta code. Very good beta code, but still beta code. Then, one day, the beta is gone, and now you need to download and pay for the version 1.0 plugin.

Eclipse was a cheap car like the Ford Pinto or a Yugo GV with good third-party plugins that vanished when they went to version 1.0.

IntelliJ IDE was yet another option, which, although superior to Eclipse and Netbeans, we were warned not to install or use it. Concerns exist that the Russian government might have compromised it, since it is from a Russian-based company, as reported in a NY Times article in 2021.

Russia had done that to another piece of code, NotPetya in 2017, that added malware to Ukrainian systems, using the ME Doc tax software.
 
  • #26
elias001 said:
@jedishrfu you must use vim and emacs a lot. I mean you remember all those keyboard shortcuts.
One reason we remember the keyboard shortcuts is that they are quick, easy, and you don't have to keep moving a hand from the keyboard to the mouse.

PS. I only remember the ones that I use a lot. That is a small subset.
 
Back
Top