Questions tagged [netrw]

For questions about the plugin Netrw which adds directory listing to Vim, and allows you to open files over the network (ftp, http, scp, etc).

42 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
4
votes
1answer
594 views

How to delete non-empty directories in netrw (vim 8 or nvim)?

I will try to delete some non-empty folder in netrw by pressing SHIFT + d and, after press y, i got this error: (netrw) unable to delete directory {path} I already put this variable in my .config/...
3
votes
0answers
121 views

Netrw problem - 'mt' open new tab instead of marking as target folder

I was playing with netrw and was amazed by the possibility. I'd like to mark some files with 'mf' and move it to a folder using 'mt'. However, when I press 't', vim seems to interprets it as "open a ...
3
votes
0answers
308 views

netrw bug? cannot copy marked file to target

When I try to do the following on Windows 10: go to a directory, set it as the target directory using mt go to a different directory, mark a file in that directory using mf use mc to copy the file to ...
3
votes
0answers
210 views

Directory symlink browsing moves me to new location when autochdir is set

I have a symlinked directory as such: ~/nested Which points to this directory: ~/whatever/yetanother/andanother/nested When I launch gvim or command line vim (7.4, with the standard, built-in ...
3
votes
0answers
76 views

Filetype changes when using :split and :Explore

Why does using :split and :Explore cause the filetype to change? For example, edit a file named text.man, and the filetype is set to man. Change the filetype to txt, then :split and :Explore in the ...
2
votes
0answers
66 views

While copying a file in netrw, why should I be in the directory where the file is located?

In netrw, I want to copy a file /dir/subdir1/file.txt to /dir/subdir2. For that, I do the following: I mark the file /dir/subdir1/file.txt I navigate up directory and mark /dir/subdir2/ as target ...
2
votes
0answers
56 views

How can I use Vim with rmate?

TextMate 2 introudced rmate, which has become a de-facto standard for editing remote files, with multiple implementations of the remote component and client implementations for other editors, ...
2
votes
0answers
29 views

Cannot :Explore public ftp service (I see empty listing with ../ and ./)

The address is ftp://ftp.yandex.ru/ I tried from bash: vim ftp://ftp.yandex.ru/ After that I was asked for username and password (but this is public anonymous server), ok I entered anonymous for ...
2
votes
0answers
405 views

What does "No lines in buffer" mean when editing via scp?

I was using vim scp:// and e scp:// to edit remotes files. Sometimes I failed to open and got message --No lines in buffer--. What does mean and how I should solve?
2
votes
0answers
221 views

Jump to last position when using vim netrw to open a file

I am looking to jump automatically to the last position in any file that I open. I have in my ~/.vimrc file: autocmd BufReadPost * ...
2
votes
1answer
2k views

Open files with "whitespace names" from within Vim with gx

I have a file, e.g. ~/abc def.mp3 that I want to open from within a Vim buffer that already contains these lines. If there were no whitespaces in the filename, I could simply open the file with the ...
2
votes
0answers
131 views

Explore command causing errors

I open vim and then use the command :Explore. Then I got these errors: Error detected while processing function netrw#Explore..netrw#LocalBrowseCheck..<SNR>16_NetrwBrowse..<SNR>...
1
vote
0answers
17 views

How can I use let `g:netrw_keepdir = 0` for folders and `autochdir` for files?

Normally I want to use autochdir to change to the directory containing the file which was opened or selected However, in netrw, there's a warning However, the autochdir option: :set acd is ...
1
vote
0answers
24 views

How can I track the event of opening a file in netrw in an autocommand?

I'm trying to solve this problem by creating an autocommand which will track when a new buffer is opened through netrw, and will then immediately close netrw once the buffer is closed. How can I track ...
1
vote
1answer
39 views

Netrw - Lexplore is not an editor command

I was trying to configure vim to have a file explorer on the side with no plugins. I found the following script: function! ToggleNetrw() if g:NetrwIsOpen let i = bufnr("$") while (...
1
vote
0answers
52 views

Netrw: Can't Explore with scp?

I wish to use netrw :Explore on a remote server via ssh tunnelling, but can't manage to do it. I can access the server perfectly fine using ssh and remotely edit files with vim: vim scp://userid@...
1
vote
0answers
216 views

netrw not open correctly, just open blank with noperm message

I am Neovim user and have serious problem with netrw I find netrw has a bug when trying to open the file, at first it only shows an empty buffer(1st picture), and right bottom corner, you can see [...
1
vote
0answers
39 views

netrw ftp error ("Unknown command^M"; "Line 245:" "E517: No buffers were wiped out: 8bw!"

Until a few days ago, editing remote files worked perfectly OK, but not any more, with strange messages and error windows showing up: a) Loading remote file: When I'm trying to load a remote file with ...
1
vote
0answers
27 views

How to open netrw at each vim session but have the cursor on the code (and not on the tree) when opening

I found the following chunk of command on this blog to have a file browser open by starting vim that I added to my .vimrc. It splits the window into 2 panes: a file browser and the text editor. The ...
1
vote
0answers
103 views

Change behavior of `gx` key

I used to use chromium before and then, I could press gx on an url and vim would open it in a new tab if a chromium instance was already running, otherwise create a new window. But in firefox, when I ...
1
vote
1answer
158 views

Open netrw view of directory with Ctrl-P

Is it possible to use Ctrl-P to search for directories in addition to searching for files? I want to be able to search for directories in my project in whatever mode (CtrlP, CtrlPMRU, or other) and ...
1
vote
0answers
112 views

netrw freezes if vim subwindow includes "beefy" network drive

When one of my vim subwindows is opened to a network drive with many zip files, switching to that subwindows causes vim to hang for 10 seconds or so. The Windows Task Manager shows sustained ...
1
vote
0answers
783 views

netrw expand folders - strange behaviour

I'm getting very strange behaviour when I try to expand the listing of a folder by pressing enter. Take the following screenshot Currently, I have file 2.1 open. But when I press Enter on 1/ to ...
1
vote
0answers
94 views

Is there any documentation available on the internals of netrw?

I have found fairly clear documentation on the usage and customization of netrw, but a perusal of the plugin source code shows only method-level comments, and does not give a good indication of the ...
0
votes
1answer
27 views

Netrw-R Renaming multiple Files with vim

After going through the renaming guides from the doc folder in vim I found a way to replace text with the input :%s/frompattern/topattern/g. Reaching the renaming files with the file browser tutorial/...
0
votes
0answers
11 views

netrw freezes for seconds when entering window for a folder on network drive with many zip files

I have split windows on Vim/Gvim, one of which is opened to a folder rather than an text file. When the folder is on a network drive, Vim/Gvim freezes for 5-10 seconds whenever I change focus to that ...
0
votes
0answers
33 views

Neovim fail to open file via scp - Undefined variable: b:netrw_method

I am opening a remote file with this command: [n]vim scp://user@host/relative_file Vim (8.2) opens the file correctly, but Neovim (v0.5.0-dev+1186-g8665a96b9) just shows a blank file and a blank ...
0
votes
0answers
28 views

Setting ftdetect a given directory

I'm looking for a way to set filetype on load, a loading phase via ftdetect. Right now I can open the files inside a given directory via some utility function that I wrote, and during the opening ...
0
votes
0answers
21 views

Delete a file in netrw without confirmation?

When I press D or <Del> over a file in netrw, it asks confirmation. How to avoid this message?
0
votes
0answers
30 views

Can I map a netrw command and its arguments to a key?

I have this map: nmap <buffer> <F3> mX So one I press <F3> it opens a prompt so I can type a command. Can I give the command also in the map above? something like: nmap <buffer&...
0
votes
1answer
29 views

vim netrw problems on Windows 10

The weird behaviour I was seeing included: :Ex might open an empty window Use of - as a shortcut to go up to the parent directory in netrw, would make the entire shell non-responsive (or at least, ...
0
votes
0answers
34 views

Strange cursorline behavior in Netrw

I'm running Vim 8.2 on macOS 10.14.6 (Mojave) on the native macOS Terminal program. I recently changed my terminal font to Courier 12, Regular weight, and discovered a strangely annoying issue which ...
0
votes
0answers
20 views

How to explore specifc files with wildcards in netrw?

I would like to list files starting with abc in the current directory with netrw. if I use vim . it lists all files. I also could list them using vim -c "E" just I don't know how to filter ...
0
votes
0answers
21 views

Why don't <s-up> and <s-down> work in :Explore (netrw) for going to previous/next match?

After executing :Explore **/*.py to match *.py under the current directory tree, I cannot execute :Pexplore and :Nexplore using <s-up> an <s-down>. I have tried both SHIFT+<up> and s+...
0
votes
0answers
111 views

How to set statusline for specific buffer

I want to use netrwm instead of nerdtree. I have my own statusline but I don't want it to be displayed in netrw. Nerdtree had it's own option for it (let NERDTreeStatusline="") which made it ...
0
votes
0answers
88 views

How make NetRW always open the provided dir, even when there is already an upper dir opened?

I created a Drawer command to use NetRW as a file drawer with two main uses. Note: I always use the tree listing mode. Open the working directory Find a file to allow viewing/opening its siblings ...
0
votes
0answers
42 views

Make netrw not close previous buffer but open a new buffer

I have netrw_browse_split set to 4, so typing <Enter> on a file on netrw will open it on the previous window. But if the previous window have a file, it will be closed. How can I make opening ...
0
votes
0answers
66 views

buffer name of opened directory in netrw disappears sometimes

I usually open a directory in vim with command :e path-of-dir. Because the plugin Netrw is included by default, this will be taken over by it and a netrw window will open with the content of the dir. ...
0
votes
0answers
147 views

Editing file on remote host using scp not working

I'm trying to edit a file on a remote host using vim scp://user@host//path/to/file However, vim just displays "Stopped" and crashes. Here is the log thats produces when I run vim -V9 scp://user@host//...
0
votes
0answers
97 views

netrw: ftplugin double loaded?

I notice an annoying stutter when opening directories. Just a split second, but it's kind of a problem if I'm navigating the directory tree and it hesitates each time I open a different directory. I ...
0
votes
0answers
2k views

How I configure Vim for use with netrw?

I recently started to use netrw as a file manager next to my editing session. But I had a coupe of issues with it. First of all netrw reads unhidden buffers from the disk every time. Which made me ...
-1
votes
1answer
738 views

When provided folder, open default empty screen with CWD set to folder

At the moment when I run nvim path/to/folder/ it opens up the netrw window for it (more accurately, the Dirvish window for it), I'd like this to not be the case. Ideal behaviour is that when I do ...