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
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 ...
Sayem's user avatar
  • 201
0 votes
2 answers
259 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
20 votes
3 answers
16k views

Cannot exit Vim even using q!

I cannot exit vim even when I type :q!. I get the error E37: No write since last change (add ! to override) E162: No write since last change for buffer... I think the buffer is a NetrwTreeListing ...
Tyler Durden's user avatar
  • 2,131
8 votes
3 answers
3k views

Make :edit {file} use current directory during :Explore

I often use :Ex or :Sex to explore the filesystem from an opened file directory, or just invoke vim passing a directory to start exploring the filesystem and then opening a file. In any case, while ...
guido's user avatar
  • 1,767
8 votes
3 answers
9k 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 ...
Thunderbeef's user avatar
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?
Peret Finctor's user avatar
6 votes
3 answers
3k views

How can I move netrw's default keybindings to other keys?

Let's say I'm a terrible person and I'm thinking about remapping <CR> to do what : normally does (start command-line mode). Vim's built-in netrw plugin also remaps <CR> to open the ...
user avatar
6 votes
2 answers
867 views

No Vim, I don't want to save changes to a directory

I frequently use :e. to navigate folders and open files in gVim. But later, when I try to close the session with a :qall, I am asked by vim whether or not I want to save changes to the folder(s) I ...
Jeff's user avatar
  • 193
5 votes
1 answer
209 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 ^...
jettero's user avatar
  • 109
5 votes
1 answer
776 views

gx doesn't open the url and complains: netrw --No Line In Buffer--

My issue happens with the key combination gx in normal mode. The problems happens in Vim, (I have also tried in NeoVim and it correctly opens the link in firefox directly). I have a test file /tmp/...
Stephane Rolland's user avatar
4 votes
2 answers
2k 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 ...
jshort's user avatar
  • 241
4 votes
1 answer
2k views

Buftype=nofile when switching buffers with :Vexplore

When I open up :Vexplore in a split and open a file in it, the file in the other split ends up with buftype=nofile set so I can't write in that file or anything. But the new buffer that was opened ...
Wednesday's user avatar
3 votes
4 answers
3k 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, ...
Nicolas Scotto Di Perto's user avatar
2 votes
1 answer
385 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/...
wxz's user avatar
  • 155
2 votes
1 answer
2k views

Replace netrw window when opening a file

I'd like to be able to :Sex when editing a file, select a file, press CR, and have that new split populated with the file I just selected. Is there an option for this? I think I became used to this ...
Alex Hirzel's user avatar
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 ...
user3813057's user avatar
  • 1,481
1 vote
1 answer
31 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?
mEm's user avatar
  • 155
1 vote
2 answers
407 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> ...
Igor R.'s user avatar
  • 113
1 vote
1 answer
230 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 ...
David542's user avatar
  • 2,455
0 votes
0 answers
95 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