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
1 vote
1 answer
59 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:...
0 votes
0 answers
37 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
1 answer
24 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 ...
  • 307
0 votes
1 answer
53 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, ...
  • 203
0 votes
0 answers
9 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 **...
  • 101
1 vote
1 answer
44 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 ...
0 votes
0 answers
29 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,...
  • 1
1 vote
0 answers
31 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 ...
1 vote
1 answer
23 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 :...
1 vote
1 answer
28 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: ...
1 vote
0 answers
55 views

Selecting the directory underneath cursor in netrw

Let's say I am exploring a directory in netrw with many subdirectories: " ============================================================================ " Netrw Directory Listing ...
  • 111
2 votes
0 answers
113 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(...
3 votes
1 answer
44 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 ...
3 votes
0 answers
62 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 ...
1 vote
0 answers
52 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 ...
  • 163
0 votes
1 answer
55 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 ...
  • 23
0 votes
1 answer
76 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 ...
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 ...
  • 3,391
0 votes
1 answer
83 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....
  • 103
1 vote
3 answers
344 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/...
2 votes
0 answers
115 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 ...
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 ...
  • 577
1 vote
1 answer
164 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 ...
0 votes
0 answers
22 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 ...
1 vote
0 answers
67 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 ...
  • 11
0 votes
1 answer
372 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 ...
0 votes
0 answers
159 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 ...
  • 121
0 votes
0 answers
38 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&...
  • 165
0 votes
1 answer
147 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 ...
  • 165
1 vote
1 answer
158 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, ...
  • 193
3 votes
1 answer
236 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 (...
0 votes
0 answers
71 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 ...
  • 1
2 votes
0 answers
81 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 ...
0 votes
1 answer
54 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 ...
  • 165
0 votes
0 answers
26 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 ...
  • 165
2 votes
1 answer
214 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 ...
  • 165
1 vote
1 answer
285 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 ...
  • 121
1 vote
1 answer
179 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/...
  • 131
1 vote
1 answer
313 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,075
0 votes
0 answers
46 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,075
2 votes
1 answer
127 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 ...
  • 183
1 vote
1 answer
80 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....
  • 113
1 vote
2 answers
281 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 ...
  • 13
1 vote
1 answer
68 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 ...
  • 131
1 vote
1 answer
130 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
0 answers
296 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
0 answers
132 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@...
  • 11
1 vote
1 answer
438 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 [...
  • 111
2 votes
1 answer
374 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'...
  • 151
1 vote
1 answer
258 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 ...
  • 113