Skip to main content

Questions tagged [netrw]

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

51 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
6 votes
0 answers
101 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 ...
xn.'s user avatar
  • 161
4 votes
0 answers
855 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 ...
mbl's user avatar
  • 319
4 votes
1 answer
3k 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 ...
cbaumhardt's user avatar
  • 2,159
4 votes
0 answers
260 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 ...
user62177541's user avatar
3 votes
0 answers
335 views

What's the cleanest way to open directories using FZF instead of netrw?

I have a dirty implementation of using FZF instead of netrw to open directories: " netrw let g:loaded_netrw = 1 let g:loaded_netrwPlugin = 1 " Directories function! MaybeOpenFzfForDir(...
Jeff Pitman's user avatar
3 votes
0 answers
159 views

Showing different directories in multiple netrw instances

I was hoping that I could have splits or tabs in which I would use different netrw instances to see different folders or to use separate hide lists. Unfortunately any change in split/tab A affects ...
user1068352's user avatar
3 votes
0 answers
653 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 ...
user202729's user avatar
3 votes
0 answers
254 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 ...
E. Anikin's user avatar
  • 131
3 votes
0 answers
347 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 ...
raoul59's user avatar
  • 31
2 votes
0 answers
443 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@...
Iel's user avatar
  • 21
2 votes
0 answers
145 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, ...
interfect's user avatar
  • 163
2 votes
0 answers
582 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 ...
paulodiovani's user avatar
2 votes
0 answers
47 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 ...
Vitaly Zdanevich's user avatar
2 votes
0 answers
1k 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?
user5302's user avatar
  • 121
2 votes
0 answers
384 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 * ...
anti-destin's user avatar
2 votes
0 answers
172 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>...
jnbdz's user avatar
  • 173
1 vote
0 answers
147 views

Trouble remapping netrw

I'm using a bépo keyboard, kind of like a dvorak keyboard but for french. One of the most important aspect of using a bépo layout with vim is that I have to hjkl <-> ctsr. To do so I have this ...
BluePyro's user avatar
1 vote
0 answers
110 views

Selecting the directory underneath cursor in netrw

Let's say I am exploring a directory in netrw with many subdirectories: " ============================================================================ " Netrw Directory Listing ...
lewistg's user avatar
  • 111
1 vote
0 answers
258 views

How do I regain control of my Vim session when it hangs while saving a file via netrw?

I edit a lot of files using netrw in gvim. Sometimes, when I mash C-s to save, it will hang my vim session. I'm not sure if this is because of a network error, or because I also sometimes hit C-z at ...
interfect's user avatar
  • 163
1 vote
0 answers
184 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 ...
Max's user avatar
  • 11
1 vote
1 answer
765 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 [...
devstefancho's user avatar
1 vote
0 answers
84 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 ...
ajo's user avatar
  • 123
1 vote
0 answers
271 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 ...
phillbush's user avatar
  • 111
1 vote
0 answers
188 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. ...
Terry's user avatar
  • 111
1 vote
0 answers
143 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 ...
user36800's user avatar
  • 443
1 vote
2 answers
1k views

How to make Vim open empty buffer with CWD set when opening a 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 ...
greduan's user avatar
  • 119
1 vote
0 answers
133 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 ...
ivan's user avatar
  • 1,470
1 vote
0 answers
1k 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 ...
tushar's user avatar
  • 203
1 vote
0 answers
119 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 ...
merlin2011's user avatar
1 vote
0 answers
3k 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 ...
grochmal's user avatar
  • 1,656
0 votes
1 answer
29 views

Why and How to Solve Vim and Gvim Not Listing Content of Specific Folders on Windows 11?

So, I installed Vim 9.1, latest stable version and I'm having some problem in opening a project folder. What's happening is that when I try to open the folder that contains the .cs file, the Netrw ...
Desenplays's user avatar
0 votes
1 answer
179 views

How To Set Initial Settings On netrw in Neovim?

I'm using neovim (v0.8.3) and like it quite well. Recently discovered netrw and it's nice; I wanted to set some default settings for when the netrw pane opens but what I'm trying doesn't seem to work....
Onorio Catenacci's user avatar
0 votes
1 answer
41 views

How to navigate a soft link from netrw?

I just want to navigate the contents of a soft link that points to a directory using netrw. How can I navigate into it? My OS is: Arch Linux and I use: Zsh
Thesevs SCUTULATUS's user avatar
0 votes
1 answer
44 views

Select first file by default in netrw

When I open a directory in netrw, the .. directory at the top is selected by default How can I make netrw always select the first listing that is not .. or . by default instead? Thanks to a comment, ...
minseong's user avatar
  • 2,383
0 votes
0 answers
42 views

netrw: Pressing "x" on folder name doesn't launch Windows Explorer

I am using netrw v171 from Cygwin. As always, the path of the folder being explored is shown in line 3 of the buffer. Before v171, I could press x when on that line, which would open that folder in ...
user2153235's user avatar
0 votes
0 answers
37 views

Neovim :Explore weird behaviour

I'm new to neovim. I've been using the :Explore command to go to netrw, but when this happens the color scheme becomes inverted and my lsp starts trying to process the netrw buffer. This gets fixed ...
Parker D's user avatar
0 votes
0 answers
46 views

Issue after using netrw in normal mode

I'm not sure what's causing this, but on MacOS 13.5/vim 9.0, after entering netrw via :Ex, :Sex, or :Vex and switching between files, upon entering the file, I'm unable to press shift+o or o to insert ...
ThinkingInBits's user avatar
0 votes
0 answers
323 views

Making vim-fugitive compatible with file explorers

I have the vim-fugitive plugin and use :G a lot. If I have NERDTree as a plug or netrw enabled then :G will open either a NERDTree file or a netrw file instead of the usual fugitive file with the ...
hilbor's user avatar
  • 15
0 votes
0 answers
430 views

Error detected while processing function <SNR>68_NetrwOpenFile when creating a new file with %

I get this error when I try to create a new file in netrw. It looks like its coming from netrw but I also get a similar error when I go up the directory tree with vim-vinegar Error detected while ...
Vinn's user avatar
  • 781
0 votes
0 answers
49 views

When alt-tabbing, subfolders in Netrw change appearance and opens in preview window

I'm on macOS Ventura 13.2, using macVim and terminal vim. When I toggle Netrw, open a folder with a subfolder, and then cmd-tab away from vim and back again, that subfolder changes appearance and ...
najjt's user avatar
  • 1
0 votes
0 answers
38 views

Vim: Netrw used to equate "%" to the folder being examined

When I used previous versions of Netrw, I could issue Bash commands like :!mkdir %/NewSubFolder. The % would translate into the folder being examined by Netrw, which isn't necessarily the same as the ...
user2153235's user avatar
0 votes
0 answers
55 views

Vim 8.2 says unwritten changes if I change netrw display views

I recently upgraded to Vim 8.2 (I don't recall what the last version was). When I open a buffer to display the contents of a folder, it uses netrw, which I've enjoyed for years. Now, if I use netrw'...
user2153235's user avatar
0 votes
0 answers
196 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 ...
user2153235's user avatar
0 votes
1 answer
985 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 ...
Allan Chain's user avatar
0 votes
0 answers
442 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 ...
ekiim's user avatar
  • 133
0 votes
0 answers
99 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&...
Ahmad's user avatar
  • 165
0 votes
0 answers
132 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 ...
MattS's user avatar
  • 1
0 votes
0 answers
70 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 ...
Ahmad's user avatar
  • 165
0 votes
0 answers
94 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+...
Shuzheng's user avatar
  • 1,285
0 votes
0 answers
497 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 ...
user419050's user avatar