Hot answers tagged

47 votes
Accepted

Vim cannot find medical spell files

The "medical" spell file does not exist, it is just an example of a name that is longer than two characters. You would have to generate one yourself.
Bram Moolenaar's user avatar
27 votes
Accepted

How do I copy a file in netrw?

You cannot use y, p etc., to copy files in netrw - it comes with its own commands. See :h netrw-mc: MARKED FILES: COPYING netrw-mc {{{2 (See ...
muru's user avatar
  • 24.7k
26 votes

Vim cannot find medical spell files

In response to Bram's answer, I have found, modified, and compiled a medical spell file that can be used with Vim. I've made the full instructions and the source code available under a GPL3 license ...
melvio's user avatar
  • 599
17 votes

Navigating using SSH

Instead of pointing Vim/Netrw to a file: scp://host/path/file point it to a directory: scp://host/path/ This gives you the same listing and the same shortcuts as if you were browsing your machine.
romainl's user avatar
  • 39.3k
16 votes

Using :Explore without closing current buffer

In :help netrw-explore they mention several other commands to explore your files. Among them are :Texplore which opens the file explorer window in a new tab instead of using your current window. ...
saginaw's user avatar
  • 6,706
13 votes
Accepted

Cannot exit Vim even using q!

To solve this nuisance with netrw permanently, I added this to my .vimrc: " Per default, netrw leaves unmodified buffers open. This autocommand " deletes netrw's buffer once it's hidden (using ':q', ...
Matthias Braun's user avatar
13 votes

Open multiple files in tabs from Explore mode

From :h netrw-t: BROWSING WITH A NEW TAB netrw-t Normally one enters a file or directory using the <cr>. The "t" map allows one to open a new window holding the new directory ...
statox's user avatar
  • 49.4k
13 votes

How can I close the Netrw buffer?

The autocmd FileType netrw setl bufhidden=wipe still leaves one buffer open. I found this solution, which closes it after opening the file: let g:netrw_fastbrowse = 0 over at the discussion on https:...
Brian C. Lane's user avatar
12 votes
Accepted

How to make netrw start with dotfiles hidden?

gh works by modifying netrw_list_hide, rather than by toggling a separate flag. It appends or removes the regex \(^\|\s\s\)\zs\.\S\+. As far as I can tell, said regex matches "a dot followed by any ...
Andrew's user avatar
  • 373
11 votes

How do I copy a file in netrw?

I would do this from the command line mode: Select the file you need in netrw Open command the line and type - :!mv <C-R><C-F> ../<C-R><C-F> Here <C-R><C-F> ...
Borys Serebrov's user avatar
11 votes
Accepted

how to use Netrw Directory Listing in VIM split window without exiting it when a file has been read

There is a dedicated command for opening a netrw listing in a vertical split: :Vex[plore] There is a dedicated command for going back to the latest netrw listing: :Rex[plore] Netrw comes with a ...
romainl's user avatar
  • 39.3k
11 votes

Toggle explorer window

I followed this script (https://www.reddit.com/r/vim/comments/6jcyfj/toggle_lexplore_properly/djdmsal/) and it works as expected. let g:NetrwIsOpen=0 function! ToggleNetrw() if g:NetrwIsOpen ...
alwc's user avatar
  • 111
11 votes

copy a file in netrw

According to following thread on the mailing list vim_use from 03.10.15 (https://groups.google.com/forum/#!topic/vim_use/6yqU3RX2CWA): How to copy and rename a file with netrw where the target and ...
Hotschke's user avatar
  • 4,640
10 votes
Accepted

Using :Explore without closing current buffer

I usually use a following flow when I want to open the file (while keeping the current file): Make a new vertical / horizontal split Open netrw from in the new split Select another file As mentioned ...
Borys Serebrov's user avatar
10 votes

Cannot exit Vim even using q!

This usually happens, if there are two or more buffers which are modified and Vim then usually toggles between them and shows the error message. So when :q! would abort the current buffer, it wouldn't ...
Christian Brabandt's user avatar
8 votes
Accepted

How to escape from file browsing mode?

You can use any of Vim's many buffer-switching commands to return to the file you were previously working on. Here's a few possibilities: Use the :buffer command to jump to the alternate buffer: :b #...
Rich's user avatar
  • 31.3k
6 votes

Using :Explore without closing current buffer

If you have netrw v153 or later, you'll have :Lexplore available. This command opens a window on the side of the display, and <cr> will cause editing to occur in window#2 (by default). You can ...
user21497's user avatar
  • 776
6 votes

What does "toggle" mean in the context of Lexplore?

With :Vexplore, the current window is split in two and a netrw buffer is displayed in the new window. Repeating that command again and again will keep splitting the current window until the left half ...
romainl's user avatar
  • 39.3k
6 votes

Automatically close netrw after opening a file

I think your problem comes from the following line of your .vimrc: let g:netrw_browse_split = 4 From the doc :h g:netrw_browse_split you can read: *g:netrw_browse_split* when browsing, <cr&...
statox's user avatar
  • 49.4k
5 votes

How do I copy a file in netrw?

Set cursor on ./ (or directory in which you want to copy) , press mt Set cursor on file you want copy, press mf, then mc, type a name of new file, enter
itsnikolay's user avatar
5 votes

Cannot exit Vim even using q!

Try :bdelete! or :bd! for short. This stands for "buffer delete" and will close the buffer you have open. (Credit goes to Emil Asmussen) After that, you should be able to do :q! as normal.
DJMcMayhem's user avatar
  • 17.4k
5 votes
Accepted

:Explore shows the "." directory

You could hide the dot directory (./) by setting the global variables g:netrw_list_hide and g:netrw_hide in your vimrc like this: let g:netrw_list_hide = '^\./$' let g:netrw_hide = 1 The first ...
saginaw's user avatar
  • 6,706
5 votes
Accepted

au FileType netrw echom "ft is now netrw" does not show up in :messages

Your autocmd is clearly correct, as you can see that the message is printed if you explicitly set the 'ft' with setl ft=netrw. The problem you are facing is that something is blocking the messages (...
mMontu's user avatar
  • 6,600
5 votes
Accepted

Autocmd on directory to replace netrw

I had a look at how Dirvish did it, and tested this: augroup ranger au! au VimEnter * sil! au! FileExplorer * au BufEnter * if s:isdir(expand('%')) | bd | exe 'Ranger' | endif augroup END ...
user9433424's user avatar
  • 6,118
5 votes

Toggle explorer window

Once this works, each time Lexplore is toggled on, it will create a new buffer but not wipe the previous one. A solution is to wipeout netrw buffers when they are hidden. augroup ...
Biggybi's user avatar
  • 2,700
5 votes
Accepted

Update netrw to newer version

Newrw is distributed as a Vimball. After you download the new version, move netrw.vba.gz to ~/.vim. Then open it with vim, e.g., $ vim netrw.vba.gz You will see this message at the bottom of the ...
garyjohn's user avatar
  • 6,284
5 votes

How to delete non-empty directories in netrw (Vim 8 or Neovim)?

There's a way to delete non-empty directories with netrw in vim 8+ or nvim? You could do :!rm -rf directory That warning means, you have files still in that directory. So if a file in that directory ...
chriz's user avatar
  • 221
4 votes
Accepted

How to display line numbers in netrw v125 (vim7.0)?

Is there any reason that :set number doesn't work? Edit: I see what you mean @user3813057. Netrw has a lot of control over its buffer, so we have to be a bit tricky when doing things that it doesn't ...
Tumbler41's user avatar
  • 7,706
4 votes

Using :Explore without closing current buffer

How do I avoid this? You don't. The previous buffer is still there, you only need to pull it from the buffer list: :b <Tab>
romainl's user avatar
  • 39.3k

Only top scored, non community-wiki answers of a minimum length are eligible