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

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

How To Set Initial Settings On netrw in Neovim?

I'm using neovim (v0.8.3) and like it quite well. Recently discovered netrw and it's nice; I wanted to set some default settings for when the netrw pane opens but what I'm trying doesn't seem to work....
Onorio Catenacci's user avatar
1 vote
1 answer
42 views

is there a way to drop in my netrw location info into my jumplist

I'm aware that from a file I can type :Rex to go back to my location in Netrw Directory Listing. My muscle memory is deep here, is there a way to drop in my Newrw Directory location into my jump list? ...
lando2319's user avatar
  • 133
0 votes
1 answer
27 views

How to navigate a soft link from netrw?

I just want to navigate the contents of a soft link that points to a directory using netrw. How can I navigate into it? My OS is: Arch Linux and I use: Zsh
Thesevs SCUTULATUS's user avatar
1 vote
1 answer
33 views

clientserver with sockets in regular Vim?

I read somewhere that you can use a socket do clientserver functionality but I can't figure out where the socket is. Is it a file socket in the file system like mysql used to use? Is it a tcp socket? ...
leeand00's user avatar
  • 3,577
0 votes
0 answers
25 views

Select first file by default in netrw

When I open a directory in netrw, the .. directory at the top is selected by default How can I make netrw always select the first listing that is not .. or . by default instead? Thanks to a comment, ...
minseong's user avatar
  • 2,323
2 votes
1 answer
97 views

Netrw: Can't Alt+Tab away & back when composing a command with `q:`

When editing a file, I can issue q: to open a command palette and compose a Vim command using the full power of Vim's normal mode. I can also Alt+Tab to another window to look for information, then ...
user2153235's user avatar
0 votes
0 answers
39 views

netrw: Pressing "x" on folder name doesn't launch Windows Explorer

I am using netrw v171 from Cygwin. As always, the path of the folder being explored is shown in line 3 of the buffer. Before v171, I could press x when on that line, which would open that folder in ...
user2153235's user avatar
0 votes
0 answers
27 views

Neovim :Explore weird behaviour

I'm new to neovim. I've been using the :Explore command to go to netrw, but when this happens the color scheme becomes inverted and my lsp starts trying to process the netrw buffer. This gets fixed ...
Parker D's user avatar
3 votes
1 answer
90 views

Vim syntax highlighting: conceal does not work when opening files from netrw

I use Vim version 8.2.4919 without 3rd party plug-ins on Ubuntu 22.04.2 LTS running via WSL2. I want to have italic syntax highlighting for words encapsulated in underscores in comments of my cpp ...
0x706173696D75's user avatar
1 vote
2 answers
68 views

How to detect netrw directory listing from autocommand?

I want to detect from a BufEnter autocommand whether the buffer is a netrw directory listing. It seems that when the autocommand is fired, the filetype is empty and there are no netrw-related buffer ...
Andy Stewart's user avatar
  • 1,359
0 votes
0 answers
40 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
29 views

Why does `Ex` apply to both splits? [duplicate]

I noticed that when I split multiple times in combination with Ex, for example I run the following commands :Sexplore :q :Sexplore It will open netrw in both splits. I expected it to only open in the ...
slayer's user avatar
  • 11
0 votes
0 answers
292 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
2 answers
237 views

netrw :Sex and :Vex clear the current buffer

If I open a file in Vim and then run :Vex (or :Sex) it opens netrw in both the new split and the existing split. This happens even if I have unsaved changes, meaning the changes are lost. The ...
Hadrian Hughes's user avatar
0 votes
0 answers
45 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
34 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
51 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
1 vote
1 answer
339 views

Vim file explorer - jump to file by letter

In windows file explorer, if you hit a letter like R, you get to a file/folder beginning with R. Especially in directories with many files this is super convenient. Does one of the Vim file explorers ...
weberjn's user avatar
  • 111
2 votes
1 answer
1k views

Changing working directory to current in netrw

My working directory is /a and I open up netrw with :tabe /b. I now want to change my working directory to /b. I read that :cd<CR> should work but it just does the same thing as typing cd in a ...
Hunaphu's user avatar
  • 182
2 votes
1 answer
164 views

Open JIRA issues from inside Vim based on JIRA tag

I just learned about the gx command to open URLs from Vim. Is there a way to do the same thing based on the highlighting. For example, I have this match rule to hightlight JIRA issues: syn match ...
Stephen Rasku's user avatar
1 vote
1 answer
437 views

How can I open netrw in a split when opening a directory?

I have figured out how to open a file browser in a split, using the following in vimrc: let g:netrw_liststyle = 3 let g:netrw_banner = 0 let g:netrw_browse_split = 4 let g:netrw_winsize = 25 let g:...
Christoffer Reijer's user avatar
1 vote
1 answer
174 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
2 votes
1 answer
153 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 ...
cassepipe's user avatar
  • 385
0 votes
1 answer
303 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, ...
Jake's user avatar
  • 213
2 votes
2 answers
428 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 ...
William García's user avatar
1 vote
0 answers
130 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
1 answer
72 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
56 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: ...
Stonks3141's user avatar
1 vote
0 answers
109 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
3 votes
0 answers
310 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
3 votes
1 answer
60 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 ...
user2153235's user avatar
3 votes
0 answers
147 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
1 vote
0 answers
223 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
0 votes
3 answers
678 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 ...
Terry's user avatar
  • 61
0 votes
1 answer
131 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 ...
B1LLP4RK's user avatar
  • 105
0 votes
1 answer
148 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....
postylem's user avatar
  • 103
1 vote
3 answers
1k 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/...
ThunderDream's user avatar
3 votes
0 answers
582 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
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 ...
melvio's user avatar
  • 599
2 votes
1 answer
551 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 ...
B1LLP4RK's user avatar
  • 105
0 votes
0 answers
176 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
1 vote
0 answers
173 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
0 votes
1 answer
939 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
406 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
92 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
1 answer
703 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 ...
Ahmad's user avatar
  • 165
1 vote
1 answer
677 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, ...
Chris's user avatar
  • 243
3 votes
1 answer
593 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 (...
Nikola Atanasov's user avatar
0 votes
0 answers
122 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
3 votes
0 answers
225 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