Questions tagged [netrw]

Netrw adds directory listing to Vim, and allows you to open files over the network (ftp, http, scp, etc). It is a plugin bundled with Vim.

Filter by
Sorted by
Tagged with
0
votes
0answers
3 views

How can I go back from vimdiff to netrw?

I list files using vim ., which uses netrw. Then I select two files using mf, 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
3 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
62 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
138 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
1answer
36 views

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

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 ...
6
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 ...
2
votes
3answers
657 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?
0
votes
1answer
28 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
27 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
19 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
52 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
283 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
6k 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
39 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, ...
1
vote
1answer
125 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'...
2
votes
1answer
1k 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 ...
0
votes
1answer
14 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....
3
votes
1answer
357 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
2answers
90 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
24 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
324 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
21 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
59 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
36 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
103 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
35 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://...
0
votes
0answers
58 views

How to keep directories expanded after toggle netrw?

I have an "almost" perfect netrw workflow. With my internet search, I: Solved <C-l> problem; Splits Right/Bottom (without resize netrw); Toggle netrw (but has an issue); In my ...
1
vote
0answers
25 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
53 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
157 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
635 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 ...
0
votes
0answers
44 views

How do I prevent NetrwTreeListing from appearing in the buffer list

Trying to figure out how to use netrw (:E) correctly with :Rex and CTRL+O. To reproduce, create 2 files in a /tmp/newdir directory. mkdir /tmp/newdir cd /tmp/newdir echo "blabla 1" > ...
0
votes
0answers
22 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 ...
0
votes
0answers
25 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 ...
2
votes
1answer
166 views

Remapping `v` in netrw/calling NetrwSplit(5) directly

So I've created some helper functions to help work around netrw. They are some keybind simplifications that help with things like window/cursor management when opening files, where to open them, ...
1
vote
1answer
183 views

How to open directory in toggled netrw window?

I've toggled netrw explorer window by adding the following commands found in an answer posted to this question to the vimrc file. let g:NetrwIsOpen=0 function! ToggleNetrw() if g:NetrwIsOpen ...
18
votes
3answers
11k views

How do I copy a file in netrw?

The current working directory is ./A/B/. An empty document is opened when I type vim, and the netrw is opened with command :e. The window is split by vs., and I can navigate to the upper level ...
1
vote
1answer
62 views

Netrw discards changes without asking

When I Execute vim A command from shell Edit the file A in some way (now &modified == 1) Execute :Lexplore †1 to enable the side pane of netrw Press Enter on an arbitary file B , the file B is ...
0
votes
0answers
13 views

Multichar commands not working on netrw

I would like to hide files using gh in netrw. However, it seems like none of the g- or m- commands are working for me. All of the other commands seem to be working, however, whenever I enter one of ...
0
votes
1answer
51 views

Keybind for moving a file using netrw from outside of netrw

I wanted to be able to move/rename a currently open file using netrw. The typical concerns are: Closing the old buffer Actually moving to preserve file attributes (so no :saveas) I'm aware of some ...
0
votes
0answers
35 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 ...
3
votes
0answers
58 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 ...
1
vote
0answers
80 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 ...
5
votes
3answers
586 views

Is there a workaround for Vim's Netrw :bprev bug?

This didn't get much love on stackoverflow (https://stackoverflow.com/q/48269793/2512141), but I think it's important so I'm reposting here. I think this could be a major barrier to people using Vim's ...
0
votes
1answer
135 views

Trouble with netrw ftp protocol, file won’t save

I am trying to create and edit a file remotely from my iPad using iVim to my Linux box which is on the same network. I am trying to use the ftp protocol from the netrw utility that comes with vim. I ...
1
vote
2answers
96 views

explicitly call netrw function in binding

I'm trying to bind the key ^ so that it runs ^ in normal mode by default, but calls the function bound to - in netrw. - is bound to NetrwBrowseUpDir in netrw.vim, definition here . Here's my first ...
3
votes
1answer
175 views

gx doesn't open the url and complains: netrw --No Line In Buffer--

My issue happens with the key combination gx in normal mode. The problems happens in Vim, (I have also tried in NeoVim and it correctly opens the link in firefox directly). I have a test file /tmp/...
1
vote
2answers
312 views

How to override netrw-delete behavior

I'm currently using Vim 8.1 on Ubuntu 18.04, and I would like to override the default behavior of deleting local files/directories 'forever' when using netrw. The doc says that this plugin uses a ...