Now let's talk about some :Explore variants we have available.
If hidden is enabled Netrw will always occupy the whole window. If we wanted a vertical split we would use the :Explore! command. If we do have unsaved changes in a file it will create a horizontal split and have Netrw in the upper window. If hidden is disabled (this is the default) and there are no unsaved changes in the current file, :Explore will make Netrw occupy the entire window. Depending on your vim config, specifically the hidden option, it will do things differently. If we don't want that we could give it the path to the directory we want. Using it with no arguments will show the directory of the file we are editing. Now that we now how Netrw looks like let's cover some of its basic features. Lastly, we have our files sorted perfectly. And the quick help can show you keymaps for some common tasks.Īfter the banner we have our directories and files./ is the parent directory and. You can order them by name, last update, size or the extension of the file. So, if you put the cursor on the line that says "sorted" and press Enter you'll change the order of the files. In here you can see a few hints about actions that Netrw can perform.įun fact, you can actually interact with some of the "options" in the banner. This time is a sequence that describes the priority it gives to a file according to its suffix.
HOW TO MAKE A NEW FILE IN VIM HOW TO
Today we are going to learn how to use it, how to get around those limitations and in the process we're going to turn it into something more intuitive and easier to use. The reasons for this could include 1) is not very intuitive.
and it's not very popular, at least not if you compare it with something like NERDtree. Using Netrw, vim's builtin file explorer ĭid you know that vim has a file explorer? It's a plugin that comes bundled with vim.