Introduction
If youāve used Vim for some time now, you must already know how deeper and deeper you can get in Vim, when itās about text manipulation. Actually, Vim by itself is pretty much about the manipulation thing, because if it werenāt prominent enough in this, you probably have no reason to choose Vim over a modern text editor anyway (unless weāre talking about lightweightness and accessibility).
In this article, weāll try to cover pretty much everything you can expect to do with the letter āeā inside of Vim. Sounds pretty weird doesnāt it? A whole article just for a single letter use-case in a text editor? Absolutely! This is why Vim has been a mighty editor all along, and will persist to be.
:edit Modified Files in Vim
Sometimes when working with large project files, we may wish to use different programs and commands at the same time on the same file. Letās say, youāre compiling some heavy code in C++, inside of Vim, and now youāre using a separate terminal to run make on that file. In this scenario, the contents and the code in that file may be changed. If you now look at Vim, you may see that the contents have not been yet updated inside Vim. This is because Vim does not sync the changes in the file in real-time, to maintain its speed and efficiency.
But worry not. Vim has a command just for everything you may need from a text editor. I donāt current have any complex situation to demonstrate this feature, but a simple example will do just fine!
In the gif below, I have Vim and Mousepad Editor open up at the same time with the same file. Now, if you notice properly, you can see that When I edit the contents of the file inside of Mousepad, and save the file with Ctrl + s in it, we donāt see any changes in Vim. It stays the same. Now, in order to refresh the current file in Vim, we you probably wouldāve first quit Vim and then return again to get the new contents. But you donāt need to. In Vim, you can type ā:editā in Vim normal mode to refresh the current file, given that you have saved the file in the other editor:

Pretty simple and straightforward, isnāt it?
Notice that Iāve written the full form of this command, which is :edit. You can simply use :e to make the same thing happen, but this would save you a few keystrokes.
However, thatās not the only use of :e. Thereās another very important one you need to know!
:edit other files in Vim
This one is a pretty common use for :edit, which you may not already know about. That is, to open up other files in Vim in a separate buffer than the current one.
To do this, you need to specify the file name, and also itās absolute directory if it is not in the current one, like this:
:edit <filename>

In the above example, you should be able to see that I first used the given syntax for opening a new file in a separate buffer, which in my case was the file dwm.c (apologies for that weird text that popped up, it was just that I didnāt properly save it last time so a swap file as saved. You wonāt need to worry about it if you donāt understand what itās doing there š You wonāt notice any visible difference about different buffers having different files, as Vim usually doesnāt show it in the default interface (youāll need a plugin to show buffers in the form of tabs at the top if you want that). But after that, if you look at the at the commandline in Vim, I typed this:
:bn
It is a command to navigate between open buffers in Vim. This is just a short for ābuffer nextā. Thereās also one that does the opposite of this one, which is to switch to the previous buffer, by typing ā:bpā (buffer previous). This is helpful in case you have a lot of buffers fired up, and switching through files in the forward direction only may slow you down.
Using :e in vim to fix folds
āFoldsā in vim are where a block of code can be expanded or collapsed. This helps with navigating large files with lots of functions.
Sometimes, vim can mess up the folds if youāve been editing a file for a long time.
The easiest way to fix the folds is to just :e
so that vim can reload the folds from start. This is much easier than quitting and editing the file again.
Using :e to reload .vimrc
Using :e may also help you in one other important scenario. Letās say, youāre adding up some settings in your .vimrc, and you want to see if the settings are fine by applying on a file. To do this, you may have done this the traditional way, which is to first quit Vim, and then reenter the file to check out the changes. But hopefully, Vim could help you save some time if you use ā:eā inside of .vimrc to avoid needing to reload it every time.
You should now have a clear understanding of how to use :edit or :e for different use cases. But the letter e wonāt stop there. It has more uses weāre left to cover.
Jumping words with āeā
If you know a little about Vim navigation, and have went through a few tutorials and cheatsheet, you should be no stranger to the different ways you can navigate in Vim. Here in our website, we have a dedicated cheatsheet article that covers only the Navigation commands in Vim, but still being large enough to water your eyes!
If you press w in normal mode, your cursor will jump to the first letter of the next word in front of it. And if you press b, your cursor will jump to the first letter of the previous word. This is pretty useful and yet time saving when youāre navigating through the same column in Vim, and saves you a bunch of time as compared to using h and l or the left and right arrow keys to navigate. However, sometimes this may not be enough to fulfill your Vim navigation shenanigans!
If you press e in Vim normal mode, you can navigate to the end of the next word in front of your cursor:

If there are any punctuations in front of the word youāve jumped, youāll need to press e twice to jump directly on the punctuation. But you probably donāt need to, because you can also use a capital E instead to jump directly to the next wordās punctuation without needing to press e twice:

Still not happy enough? I know you arenāt.
You can also press ge together to navigate to the last letter of the previous word. If the previous word contains a punctuation, you can use gE to navigate to that instead. I wonāt show it to you this time. Why not try it yourself, lazy fella!
Conclusion
If this article has not yet given you an idea of how vast Vim is, nothing else will. Itās just part of the whole package. If you research a little more, youāll find your cheeks growing age-spots, having still not reached the peak of all Vim commands. This is because Vim commands donāt work the same everytime. It doesnāt mean youāll be encountering bugs, but what I essentially mean is that if you pair different command letters together, you can invent new ways of using Vim others may not have found yet.
How cool is that?