Skip to main content

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
0 answers
18 views

netrw reuse window

Suppose I have 2 windows open, each one with its respective buffer (b1 != b2 meaning two different files), so: w1 -> b1 w2 -> b2 If now I open netrw using Vexplore! thus having a new window w3, ...
0 votes
1 answer
29 views

Why and How to Solve Vim and Gvim Not Listing Content of Specific Folders on Windows 11?

So, I installed Vim 9.1, latest stable version and I'm having some problem in opening a project folder. What's happening is that when I try to open the folder that contains the .cs file, the Netrw ...
0 votes
1 answer
44 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, ...
0 votes
1 answer
984 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 ...
1 vote
1 answer
32 views

Remaps to move across windows do not work when in netrw window

Can someone explain why remaps to navigate across windows like nmap <C-h> <C-w>h does not work when in the netrw window? Is there any reason why? Is there a setting to enable them?
25 votes
2 answers
4k 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
1 answer
172 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....
4 votes
1 answer
3k 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 ...
1 vote
1 answer
265 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
2 answers
1k views

How to make Vim open empty buffer with CWD set when opening a 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
1 answer
232 views

Silent mapping that automatically redraws -- no messages or blank screen

I would like to open a url in vim. Using gx from netrw has been problematic, so I created the following simple mapping: nnoremap <leader>k !open <C-R><C-F><CR> This gets the ...
2 votes
1 answer
714 views

Does Neovim support vimball plugins?

I'm trying to install the last version of netrw, which is distributed as a vimball file, but can't find the way of doing it in Neovim. So far I've tried: Unzip the file Run: :packadd vimball Inside ...
3 votes
1 answer
396 views

How to escape filename containing single and double quotes mix?

Let's say i create a filename with this: xb@dnxb:/tmp/test$ touch '"i'"'"'m noob.mp4"' xb@dnxb:/tmp/test$ ls -1 "i'm noob.mp4" xb@dnxb:/tmp/test$ Then vim . to go inside Netrw directory listing. " ...
4 votes
3 answers
2k views

How do I avoid exiting vim to open a new file?

I usually exit vim to open other files, I know it is not productive and I want to avoid it. I want to use netrw instead to open the files I want. Is there any way to prevent me from exiting vim, using ...
2 votes
2 answers
991 views

vim-fugitive: Netrw not found. Define your own :Browse to use :GBrowse

:GBrowse is giving Netrw not found. Define your own :Browse to use :GBrowse since netrw is disabled by telescope.nvim. I tried to define :Browse like this: :command! -nargs=1 Browse !open <args>...
6 votes
5 answers
6k views

Change $HOME before it gets accessed

I'm using vim 8.1 on windows. The IT department has set $HOME to a slow network drive. Every time a file gets written to $HOME vim slows down. I have $VIM/vimrc with the following content. let $HOME ...
2 votes
1 answer
204 views

Vimscript: fetch list of keymappings containing a prefix?

I'm adding a buffer-local mapping to close netrw windows: " ~/.vim/ftplugin/netrw.vim nnoremap <buffer> q <C-W>c It works, but it hesitates because Netrw has created other mappings with ...
0 votes
1 answer
131 views

<buffer> mapping after opening file from Netrw

I have a line in my vimrc that enables me to save and run python program in a single click while it's opened: nnoremap <buffer> <F9> :w <bar> :exec '!python3' shellescape(@%, 1)<...
0 votes
0 answers
429 views

Error detected while processing function <SNR>68_NetrwOpenFile when creating a new file with %

I get this error when I try to create a new file in netrw. It looks like its coming from netrw but I also get a similar error when I go up the directory tree with vim-vinegar Error detected while ...
8 votes
2 answers
5k views

How to remap "i" in netrw?

I remapped my hjkl keys to ijkl, but in netrw, "i" switches view styles. How to change this? Is it possible to change this?
1 vote
1 answer
764 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
1 answer
48 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? ...
0 votes
1 answer
41 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
2 votes
2 answers
487 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 ...
1 vote
1 answer
187 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 ...
2 votes
2 answers
1k 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
1 answer
52 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? ...
1 vote
2 answers
1k 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 ...
0 votes
3 answers
799 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 ...
9 votes
10 answers
11k 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 ...
2 votes
1 answer
105 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 ...
0 votes
0 answers
42 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 ...
0 votes
0 answers
36 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 ...
3 votes
1 answer
105 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 ...
2 votes
2 answers
3k views

How to display line numbers in netrw v125 (vim7.0)?

I added let g:netrw_bufsettings = 'noma nomod nu nobl nowrap ro' and set nu to my vimrc on my Ubuntu machine. It can display line numbers in netrw (V149). When I use the same vimrc on a remote server ...
1 vote
2 answers
81 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 ...
0 votes
0 answers
46 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 ...
0 votes
2 answers
267 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 ...
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 ...
0 votes
0 answers
323 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 ...
3 votes
0 answers
346 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 ...
10 votes
2 answers
6k views

How to delete non-empty directories in netrw (Vim 8 or Neovim)?

I 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/nvim/init....
2 votes
1 answer
270 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
0 answers
49 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 ...
0 votes
0 answers
38 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 ...
0 votes
0 answers
55 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'...
1 vote
1 answer
391 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 ...
2 votes
1 answer
2k 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 ...
2 votes
1 answer
185 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 ...
1 vote
1 answer
329 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 ...

1
2 3 4 5