Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

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.

4
votes
1answer
33 views

How to display rwx permissions with netrw?

In vim, how can I display the rwx (i.e., permissions) of files and/or directories using netrw? For example, I'd like to do this: vim :Ex (see output like ls -l) The closest thing I know is, in step ...
2
votes
2answers
94 views

copy a file in netrw

I often find the need to start a new file by making a copy of another similar file within the same directory. netrw has several commands for copying files from one directory to another (ie: :h netrw-...
1
vote
1answer
52 views

Netrw error: “Illegal PORT command”

I installed Vim 8.1.1 on Windows 10. My _vimrc in C:\Users\Maggyero has the following lines: set spell set spelllang=en,fr set spellsuggest=5 When I open Vim, I get the following message: Alerte ...
0
votes
0answers
48 views

Lots of NetrwTreeListing in my buffers list

I'm using Netrw plugin to explore files in my Vim. After using it for a while in a single sessions I have literally hundreds of unlisted buffers named NetrwTreeListing <number>. Why is it ...
0
votes
0answers
37 views

gx doesn't work on visually selected text

I have a link to a pdf file in my vim which contains spaces. I'm trying to open it with external app. While with gf I can visually select the text (e.g. a b.pdf) and open the pdf as a text file but ...
1
vote
0answers
44 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
votes
1answer
158 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 ...
1
vote
2answers
74 views

How to enable disabled movement keys in netrw?

Recently I started using and learning Vim. I turned off movement keys in my .vimrc file like this: noremap <Up> <NOP> noremap <Down> <NOP> noremap <Left> <NOP> ...
4
votes
2answers
101 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 ...
2
votes
1answer
51 views

netrw: This security scheme is not implemented

Since some days ago I stumbled upon an annoying situation every time I tried to edit some files on a server with Vim. It won't open the files, and a split appeared on each buffer saying: This ...
0
votes
1answer
210 views

Netrw how to hide line?

My Netrw config here. let g:netrw_banner = 0 let g:netrw_liststyle = 3 let g:netrw_browse_split = 4 let g:netrw_altv = 1 let g:netrw_winsize = 25 Just i want to hide "|" and "/". But how? I try :...
2
votes
2answers
798 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
1answer
324 views

Change to a specific directory in :Explorer

How do I change the directory when I'm already in :Explorer? Sometimes I open it up by saying :vs . and from there I want to go to ~/vim/ or something. I'm not sure how to do that without traversing ...
1
vote
1answer
29 views

How to make netrw ignore new local files?

I've set up an autocmd to automatically create directories of the filepath I'm writing to: au BufWritePre,FileWritePre * call <SID>EnsureDir(expand('<afile>:p:h')). This prevents creating ...
1
vote
1answer
84 views

Focus on file when when opening when permanent window for file explorer is enabled

I have a permanent window for file explorer enabled by netrw_altv=1 option. The problem is that when I run vim with file or directory as an argument the window with file explorer is focused. How can I ...
4
votes
2answers
147 views

How to escape from file browsing mode?

I just found out that we can use :e . to enter the browsing mode and then can choose file what we like. But I don't know how to get back to already opened file without choosing it again. I tried &...
2
votes
3answers
2k views

Open multiple files in tabs from Explore mode

While navigating file system in :Explore mode, is it possible to select and open multiple files, each in a new tab? Edit: I ended up using a function proposed by Jair López, because it works pretty ...
7
votes
1answer
152 views

Is there a way to edit secure data in vim without accessing the filesystem?

I am interested in using vim to edit a "secure" file, one that is stored encrypted elsewhere (say, somewhere in the cloud), and should not be written as plaintext to the local disk. So the sequence of ...
2
votes
1answer
1k views

Automatically close netrw after opening a file

I would like to automatically close the netrw window when I open a file. I've found a similar question (NERDTree How to open a file and automatically close the explorer buffer), but it refers to ...
4
votes
2answers
261 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 ...
0
votes
0answers
37 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 ...
1
vote
0answers
151 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
1answer
154 views

Is it possible to clone a directory with netrw?

When I mark a directory with mf, then use mc to copy into the target directory, it copies the contents only rather than the directory itself. I know I could make a new directory with d, then copy the ...
3
votes
1answer
559 views

Netrw tree listing style opening files in other directories creates new empty files in current directory

When using netrw with the tree style listing (netrw_liststyle = 3), if I expand a directory, open a file in that directory, then try to open a file above that directory, it creates a new empty file in ...
2
votes
1answer
486 views

Update netrw to newer version [duplicate]

I use Vim from this ppa http://ppa.launchpad.net/jonathonf/vim/ubuntu which includes netrw v156 How can I update to a newer netrw --> Do I have to remove netrw installed --> Can I simply install a ...
3
votes
1answer
201 views

How could I preserve netrw :Lexplore in Vim sessions?

I use netrw :Lexplore as my file browser and I also use vim sessions. However, whenever I open a session file, :Lexplore is closed and I have to re-open. Is there a way to keep netrw :Lexplore open ...
1
vote
3answers
947 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
1answer
153 views

How can I open a file from netrw into a new buffer without making it active?

I'd like to add the file to the buffer list without changing the currently active netrw window. I'd also love to make this the default behaviour for netrw. Any advice? I've searched around and looked ...
8
votes
1answer
495 views

vim 8.0 file explorer only allows specific locations

I'm running Vim 8.0 on a Windows 7 system and I'm having this issue whenever I open gvim (the one that runs in a window as opposed to running in cmd) the default path in :pwd is c:\users\"user". If I ...
1
vote
1answer
236 views

How to display netrw's current path? The default banner is to stuffed

I use the following settings to hide the netrw banner: let g:netrw_banner=0 I know that this also displays the current directory, but it also displays a bunch of other things I'm not interested in. ...
2
votes
4answers
566 views

Autocmd on directory to replace netrw

I use the ranger plugin wich I can trigger with a shortcut. But when I open a directory I would like to use the plugin instead of netrw. So I have found that the filetype of directories is netrw, ...
3
votes
1answer
441 views

Strange behavior between autochdir and netrw

This has been plaguing me for a while now, but I've only just recently been able to come up with an MCVE. The problem is that when autochdir is on and I use :Explore to open netrw sometimes it will ...
1
vote
2answers
155 views

.swp swap files for directories while browsing with netrw

Sometimes I browse around the directory of the current buffer by using :Ex. On one of my development machines, this results in a .swp file being created in every directory I visit. I've checked the ...
0
votes
1answer
327 views

How do I script Vim to download a thesaurus file and save it?

I want to create a command that will download a large file and save it to my local system. I am not interested in editing this file. I also would like to avoid a huge if block to see what downloaders ...
0
votes
2answers
129 views

Gvim: gx to {the same, a new, a vertical-split} window

Say in Gvim I have a line in the current buffer: ~/.bashrc How can I access this file (~/.bashrc) in the same, or a new, or a vertical-split window? I tried gx, which opens the file with xdg-open. ...
5
votes
1answer
157 views

open salt://whatever as somedir/whatever [closed]

I like having netrw loaded for browsing directory contents when I open '.' and for downloading webpages when I split http://host/path, but it's really getting in the way of opening files with gF or ^...
0
votes
0answers
87 views

One and only one buffer at time when I need numerous

After a reinstall, vim ONLY opens one buffer at a time. This is the only way I know how to phrase it. I open a file, it is listed as :buffers 1 %a ".r/.vim/....
2
votes
3answers
3k views

how to use Netrw Directory Listing in VIM split window without exiting it when a file has been read

When using VIM, it is possible to get a file listing in one split window by doing this: :vsp :e. Then you have something that looks like this: However if you open a file then how can you get back ...
0
votes
1answer
235 views

Unmap netrw-c in vinegar.vim

I am using following vim plugins vinegar and unimpaired. When I enter a netrw directory listing with -, the mappings of unimpaired starting with c (e.g. toggle line numbers with con) do not work ...
0
votes
0answers
266 views

how to open netrw(nerdtree) when start gvim with folder address as file to open

I have a hotkey to start gvim in current folder, but it always opening in parent folder with buffer named as folder name. How I can start gvim and pass them command to open netrw if it's valid folder ...
2
votes
2answers
631 views

How do I make netrw behave with respects to cycling through buffers with :bprevious/:bnext

I have my vim setup according to "Solution #1: Replicating Tabs with Buffers" on this site buffers-vs-tabs with the vim-airline plugin. If I open numerous files in buffer 'tabs' :bprevious/:bnext ...
-1
votes
1answer
478 views

What does “toggle” mean in the context of Lexplore?

The description of Lexplore says that it "toggles" a directory window on the left side, but I don't see the difference between that and Vexplore, which seems to do exactly the same thing. If I do :Lex ...
1
vote
1answer
82 views

How to navigate when using netrw-R (rename)

Often I rename files using netrw-R. It opens a rename confirmation on the commandline(?). E.g. Moving /home/ber/Documenten/xxx/xxx/test/services/member_balance_calculator_test.rb to : /home/ber/...
3
votes
2answers
344 views

How do I properly manage a directory listing within a buffer?

I use a mix of buffers and split panes to manage my workflow. Sometimes, I (perhaps accidentally) open a directory listing instead of a file. My buffers may look like this then: At this point, I can :...
1
vote
0answers
49 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
0answers
604 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 ...
0
votes
2answers
376 views

Customize syntax highlighting in netrw

Right now I am working on a latex project. When I open a netrw/vinegar window, I get following coloring: Apparently, certain filetypes are grayed out and other are not. I like the idea to emphasize ...
6
votes
2answers
180 views

au FileType netrw echom “ft is now netrw” does not show up in :messages

Entering in vim :au FileType netrw echom "ft is now netrw" Afterwards, I open a netrw window with :E . Now, I expect to have a message entry in :messages. However, no message is there. Why is there ...
1
vote
1answer
390 views

Changing of disk partition with netrw on Windows

I guess this is not a problem for Linux users, but in Windows disks have drive letters. How can I switch drive letters in netrw on Window?
1
vote
1answer
149 views

explore, netrw: How to navigate to a file / folder starting with “abc”

Is there any way to jump to a file / folder starting with a given set of characters?