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

Filter by
Sorted by
Tagged with
0
votes
1answer
29 views

Automatically getting diff between netrw preview window and fixed file

Say I am in a directory with the filetree below, where gold.txt is a file I would like to compare each of the other .txt files against, one at a time. . ├── gold.txt └── to-compare ├── compare1....
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/...
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 ...
2
votes
3answers
754 views

Copying absolute filepath of selected file in Netrw

Is it possible to copy the absolute filepath of the file under the cursor in Netrw?
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 ...
18
votes
2answers
4k views

Vim cannot find medical spell files

Problem specification I would love to have a medical spell dictionary in vim. Currently, I have a lot of medical terms in my own personal English dictionary right now. However, using an official ...
1
vote
1answer
65 views

Explore command not working in Terminal normal mode

In vim, I open a terminal using :term and enter the normal mode using <C-w> <N>. Then, :Explore does not open the vim's file navigation view, but creates a another split window of the ...
4
votes
3answers
508 views

how to stop vim suspending when using gx

When I press gx over a link in vim, it opens it in an external application, when it does this it also suspends Vim. How do I prevent it from suspending Vim, so that I can use Vim while browsing ...
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/...
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 ...
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
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, ...
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
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 ...
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
45 views

How can I apply shell command on the selected files in netrw

I want to apply a shell command on two selected files, my command is: convert +append image1.png image2.png output.png How can I do that for two selected images in netrw? However, to make the process ...
5
votes
3answers
1k views

How can I move netrw's default keybindings to other keys?

Let's say I'm a terrible person and I'm thinking about remapping <CR> to do what : normally does (start command-line mode). Vim's built-in netrw plugin also remaps <CR> to open the ...
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 ...
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 ...
0
votes
1answer
25 views

How can I go back from vimdiff to netrw?

I list files using vim ., which uses netrw. Then I select two files using md, and open them in diff mode using mf. Now how can I go back to the list of files? I use :q to exit the second file, and :E ...
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 ...
2
votes
1answer
84 views

How to select multipe files for vimdif using netrw?

Suppose I have some files in a folder. I browse the folder using vim vim myfolder. It opens netrw with a list of the files in the directory. Now I want to select two or more files and then open them ...
1
vote
1answer
135 views

Using vim-vinegar or trying to use :e . will crash nvim [closed]

I have recently transitioned from vim8.X to nvim0.4.4 and so far I've been extremely impressed with the development experience. One feature I'm really missing is using vim-vinegar to exit the current ...
7
votes
8answers
6k views

Toggle explorer window

neovim 0.2-dev :Lexplore opens up explorer window and entering :Lexplore again toggles it. However, if I interact with the explorer window(i.e. expand a directory), then typing :Lexplore opens up ...
1
vote
3answers
1k views

try catch with :Rexplore

I want to be able to hit a single key to see the netrw buffer for the directory of the file I'm in. Rex will handily move your cursor to where it was previously, but only works if you opened the file ...
1
vote
1answer
70 views

How do I enable mouse in netrw only (terminal vim)?

I would like to be able to use my mouse to scroll and click on directories to expand them in netrw. I don't want the mouse to be on for any other filetype/buffertype, so that I can still highlight/...
2
votes
1answer
40 views

How to make :Vex act like :Lex, and limit Vex buffer to 40 width?

I'd like :Vexplore to be toggleable. ie if netrw is open in a visible buffer, close it. If netrw is not open in a visible buffer, open it. Upon opening netrw with :Vexplore, change the width of the ...
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+...
1
vote
1answer
120 views

Why isn't netrw (:Explore) loaded, when starting vim using `vim -u NONE`?

I wonder why netrw (:Explore) is not loaded after starting vim using vim -u NONE. Inspecting my runtimepath yields: /Users/shuz/.vim,/usr/share/vim/vimfiles,/usr/share/vim/vim82,/usr/share/vim/...
1
vote
2answers
409 views

How to close the netrw buffer/window from any other window

I would like to have the behavior where I can run :Vex<CR> when pressing <Tab> in normal mode: nnoremap <Tab> :Vex<CR> ... to open the netrw file tree window and then I would ...
17
votes
4answers
7k views

How can I close the Netrw buffer?

How can I close the Netrw buffer? I tried both :bd and :bw and neither work.
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
1answer
207 views

Vim-based alternative for Emacs tramp-mode

Disclaimer: this question was posted prior to unix.se but, as recommended by a moderator, was reposted here. The original question was not (yet) deleted since some good comments were posted there. I'...
0
votes
1answer
22 views

netrw `Ex` sometimes creates a split

I'm usually in 2 vertical splits, in each one I jump in an out of files using :Ex. When a split shows a file and I type :Ex I expect this split to show me the netrw UI, where I can choose another file....
1
vote
2answers
137 views

Pipe file list to vim and browser them like a folder

Is it possible to pipe list of files e.g. from grep and have this file list opened in vim file manager in similar fashion like when you open a folder with vim? Note that I do not want to just write ...
1
vote
1answer
40 views

Can Netrw use [host] type notation to look in .ssh/config and find the host to connect to?

Short Question: This is failing. Is it valid syntax? :tabedit scp://[home]/~/stuff/01234567/update/notes.txt Alternatively, can I easily use a longish somewhat complex shell command in vim to get ...
1
vote
1answer
379 views

How could I explore the files when using netrw to edit remote files

I can use :Explore to go through the current directory and open new files when I use vim locally. But when I use netrw to edit remote files, I cannot do it. For example, I opened a remote file with ...
1
vote
1answer
46 views

How configure netrw to use 'l' instead <CR> to open files?

By default, netrw uses l to move the cursor one letter to the right in the file name. How can I configure netrw to use the letter l to open the file instead of <CR>
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 ...
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
1answer
58 views

Is it possible to view the current file content during directory navigation in vi (command line, not GUI)?

(Originally asked in a wrong place - https://stackoverflow.com/questions/63780235/is-it-possible-to-view-the-current-file-content-during-directory-navigation-in-v) I am watching this Pluralsight ...
22
votes
2answers
3k views

How can I make gx recognise full URLs in vim?

By default, if a buffer in vim contains a URL such as http://www.google.com, gx in normal mode will open a browser with that URL. That's very handy. However, if the URL has URL parameters (e.g. http://...
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 ...
3
votes
1answer
63 views

Why Netrw use rcp internally when I use scp protocol

I want to use netrw to edit remote files on my vps. Unfortunately, when I enter vim scp://cydiater_server:~/demo/sol.cpp and try to save something with :w Vim prompts me with :!rcp '/var/folders/...
3
votes
1answer
242 views

How to mark multiple files in netrw?

I tried using MF *.h for example to select all the files in the current directory that end with .h but this doesnt work. What are good ways to mark multiple files using netrw?
6
votes
1answer
853 views

Find and highlight current file in netrw

I want to use netrw as a project drawer. Not for opening/closing files or general file management, but only as a way to get a visual overview over the project structure. I open netrw automatically ...