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).

46 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
6 votes
0 answers
99 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
686 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
0 answers
259 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
134 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
440 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
174 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
311 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
3 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,089
2 votes
0 answers
261 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
2 votes
0 answers
347 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
133 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
519 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
43 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
354 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
166 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
134 views

"netrw" mishandling long filenames

I see an odd problem with netrw for file names that are long enough to run into the next column (which is for the file size). When I press "Return" or "o" to view the file, it ...
user2153235's user avatar
1 vote
0 answers
96 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
105 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
166 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
150 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
674 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
76 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
163 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
139 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
  • 403
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
132 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,430
1 vote
0 answers
982 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
  • 193
1 vote
0 answers
115 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
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 ...
grochmal's user avatar
  • 1,646
0 votes
0 answers
26 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
175 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
32 views

Hiding multiple netrw files not working

I am trying to hide all dotfiles and all .jsx files from netrw When I update the variable g:netrw_list_hide, nothing happens. let ghregex = '\(^\|\s\s\)\zs\.\S\+' let jsxregex = '.*\.jsx$' let g:...
Vinn's user avatar
  • 627
0 votes
0 answers
31 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
23 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
40 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
138 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
847 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
366 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
82 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
110 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
65 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
79 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,195
0 votes
0 answers
453 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
0 votes
0 answers
216 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
  • 101
0 votes
0 answers
235 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//...
Tristan Wiesepape's user avatar