2022 Developer Survey is open! Take survey.

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
2 votes
1 answer
15 views

How to have netrw ignore executables?

When I use netrw with the :Explore command I see that binary/executable files are highlighted in orange and have a little * start next to them, so I guess it can recognize them without having to rely ...
user avatar
  • 165
0 votes
1 answer
36 views

How can I get netrw to not move the cursor when I return to it

When I open a directory in netrw by opening vim like vim ., it will show me a list of files in the current directory. If I find a file then press t it will open that file in a new tab, when I'm done, ...
user avatar
  • 193
0 votes
0 answers
7 views

netrw's Explore can't do both filepat AND content matching?

help Explore: one of the following four patterns Explore generates a list of files which satisfy the request for the local file system. */filepat files in current directory which satisfy filepat **...
user avatar
  • 101
1 vote
1 answer
31 views

Vim hides files inside directories with brackets in the name

I've been dealing with a huge problem of NeoVim for weeks (also applies to Vim a GVim) and I failed to find the solution on my own. What's happening is that NERDTree is hiding the content of any ...
user avatar
0 votes
0 answers
17 views

netrw: NetrwMessage.swp blocks simultaneous edit of multiple remote files

Launching Vim with a remote file... vim scp://foo.example.com//etc/foo.conf seems to create a swapfile... ~/.local/share/nvim/swap//%usr%home%georg%NetrwMessage.swp Launching another instance of Vim,...
user avatar
  • 1
1 vote
0 answers
20 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 ...
user avatar
1 vote
1 answer
20 views

how to overwrite netwr default file handler keybinding and still use it?

I'd like to overwrite netrw plugin's default file handler keybinding gx but still be able to use it: " should remap netrw's gx to gX xnoremap gX gx " map gx to something else xmap gx :...
user avatar
1 vote
1 answer
20 views

Unexpected TabNew behavior

I want to create a netrw sidebar whenever I open a new tab. I tried this: au TabNew,VimEnter * \ | :Vex \ | :vert res 40 but this makes a layout like this when I :tabe file2: tab1: ...
user avatar
1 vote
0 answers
34 views

Selecting the directory underneath cursor in netrw

Let's say I am exploring a directory in netrw with many subdirectories: " ============================================================================ " Netrw Directory Listing ...
user avatar
  • 111
2 votes
0 answers
73 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(...
user avatar
3 votes
1 answer
40 views

Netrw doesn't recognize "~/"

I installed ubuntu-20.04.3-desktop-amd64.iso on VirtualBox 6.1.28. It is my first foray into virtual machines and Linux. I installed Vim 8.1 according to this page. The command :e ~/tmp/tmp.txt opens ...
user avatar
3 votes
0 answers
50 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 ...
user avatar
1 vote
0 answers
39 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 ...
user avatar
  • 163
0 votes
1 answer
29 views

How to get path in NetRW?

I want to override NetRW's response to <CR>. When I hit enter, I want to: get the path of the file or directory of the line with the cursor in the :Lex window test if path is a file if the ...
user avatar
  • 23
0 votes
1 answer
49 views

how to install this? NerdTree visual selection

I've been trying to install this package called nerdTree-visual-selection. It is a package that 'defines key mappings that will work on nodes contained in a Visual selection in NERDTree'. It was weird ...
user avatar
0 votes
0 answers
15 views

Handling softlink directories in Windows

I'll edit the title as soon as I think of a way to succinctly word my question. I have the following for my statusline: set stl=%{expand('%:~:.') It gets the current filename's fullpath and truncate ...
user avatar
  • 2,830
0 votes
1 answer
66 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....
user avatar
  • 103
1 vote
1 answer
209 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/...
user avatar
1 vote
0 answers
68 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 ...
user avatar
18 votes
2 answers
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 ...
user avatar
  • 567
1 vote
1 answer
120 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 ...
user avatar
0 votes
0 answers
15 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 ...
user avatar
1 vote
0 answers
54 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 ...
user avatar
  • 11
0 votes
1 answer
241 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 ...
user avatar
0 votes
0 answers
101 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 ...
user avatar
  • 121
0 votes
0 answers
37 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?
user avatar
  • 165
0 votes
0 answers
34 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&...
user avatar
  • 165
0 votes
1 answer
88 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 ...
user avatar
  • 165
0 votes
1 answer
95 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, ...
user avatar
  • 163
2 votes
1 answer
145 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 (...
user avatar
0 votes
0 answers
51 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 ...
user avatar
  • 1
2 votes
0 answers
72 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 ...
user avatar
0 votes
1 answer
39 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 ...
user avatar
  • 165
0 votes
0 answers
25 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 ...
user avatar
  • 165
2 votes
1 answer
145 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 ...
user avatar
  • 165
1 vote
1 answer
233 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 ...
user avatar
  • 121
1 vote
1 answer
145 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/...
user avatar
  • 131
1 vote
1 answer
220 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/...
user avatar
  • 995
0 votes
0 answers
32 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+...
user avatar
  • 995
2 votes
1 answer
97 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 ...
user avatar
  • 183
0 votes
1 answer
44 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....
user avatar
  • 103
1 vote
2 answers
229 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 ...
user avatar
  • 13
1 vote
1 answer
56 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 ...
user avatar
  • 131
1 vote
1 answer
86 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>
user avatar
0 votes
0 answers
245 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 ...
user avatar
1 vote
0 answers
105 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@...
user avatar
  • 11
1 vote
0 answers
349 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 [...
user avatar
  • 111
2 votes
1 answer
321 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'...
user avatar
1 vote
1 answer
171 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 ...
user avatar
  • 113
2 votes
0 answers
84 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, ...
user avatar
  • 163