47
votes
Accepted
Vim cannot find medical spell files
The "medical" spell file does not exist, it is just an example of a name that is longer than two characters. You would have to generate one yourself.
27
votes
Accepted
How do I copy a file in netrw?
You cannot use y, p etc., to copy files in netrw - it comes with its own commands. See :h netrw-mc:
MARKED FILES: COPYING netrw-mc {{{2
(See ...
26
votes
Vim cannot find medical spell files
In response to Bram's answer, I have found, modified, and compiled a medical spell file that can be used with Vim.
I've made the full instructions and the source code available under a GPL3 license ...
17
votes
Navigating using SSH
Instead of pointing Vim/Netrw to a file:
scp://host/path/file
point it to a directory:
scp://host/path/
This gives you the same listing and the same shortcuts as if you were browsing your machine.
16
votes
Using :Explore without closing current buffer
In :help netrw-explore they mention several other commands to explore your files.
Among them are :Texplore which opens the file explorer window in a new tab instead of using your current window.
...
13
votes
Accepted
Cannot exit Vim even using q!
To solve this nuisance with netrw permanently, I added this to my .vimrc:
" Per default, netrw leaves unmodified buffers open. This autocommand
" deletes netrw's buffer once it's hidden (using ':q', ...
13
votes
Open multiple files in tabs from Explore mode
From :h netrw-t:
BROWSING WITH A NEW TAB netrw-t
Normally one enters a file or directory using the <cr>. The "t" map
allows one to open a new window holding the new directory ...
13
votes
How can I close the Netrw buffer?
The autocmd FileType netrw setl bufhidden=wipe still leaves one buffer open. I found this solution, which closes it after opening the file:
let g:netrw_fastbrowse = 0
over at the discussion on https:...
12
votes
Accepted
How to make netrw start with dotfiles hidden?
gh works by modifying netrw_list_hide, rather than by toggling a separate flag. It appends or removes the regex \(^\|\s\s\)\zs\.\S\+. As far as I can tell, said regex matches "a dot followed by any ...
11
votes
How do I copy a file in netrw?
I would do this from the command line mode:
Select the file you need in netrw
Open command the line and type - :!mv <C-R><C-F> ../<C-R><C-F>
Here <C-R><C-F> ...
11
votes
Accepted
how to use Netrw Directory Listing in VIM split window without exiting it when a file has been read
There is a dedicated command for opening a netrw listing in a vertical split:
:Vex[plore]
There is a dedicated command for going back to the latest netrw listing:
:Rex[plore]
Netrw comes with a ...
11
votes
Toggle explorer window
I followed this script (https://www.reddit.com/r/vim/comments/6jcyfj/toggle_lexplore_properly/djdmsal/) and it works as expected.
let g:NetrwIsOpen=0
function! ToggleNetrw()
if g:NetrwIsOpen
...
11
votes
copy a file in netrw
According to following thread on the mailing list vim_use from 03.10.15
(https://groups.google.com/forum/#!topic/vim_use/6yqU3RX2CWA):
How to copy and rename a file with netrw where the target and ...
10
votes
Accepted
Using :Explore without closing current buffer
I usually use a following flow when I want to open the file (while keeping the current file):
Make a new vertical / horizontal split
Open netrw from in the new split
Select another file
As mentioned ...
10
votes
Cannot exit Vim even using q!
This usually happens, if there are two or more buffers which are modified and Vim then usually toggles between them and shows the error message. So when :q! would abort the current buffer, it wouldn't ...
8
votes
Accepted
How to escape from file browsing mode?
You can use any of Vim's many buffer-switching commands to return to the file you were previously working on.
Here's a few possibilities:
Use the :buffer command to jump to the alternate buffer: :b #...
6
votes
Using :Explore without closing current buffer
If you have netrw v153 or later, you'll have :Lexplore available. This command opens a window on the side of the display, and <cr> will cause editing to occur in window#2 (by default). You can ...
6
votes
What does "toggle" mean in the context of Lexplore?
With :Vexplore, the current window is split in two and a netrw buffer is displayed in the new window.
Repeating that command again and again will keep splitting the current window until the left half ...
6
votes
Automatically close netrw after opening a file
I think your problem comes from the following line of your .vimrc:
let g:netrw_browse_split = 4
From the doc :h g:netrw_browse_split
you can read:
*g:netrw_browse_split* when browsing, <cr&...
5
votes
How do I copy a file in netrw?
Set cursor on
./ (or directory in which you want to copy)
, press mt
Set cursor on file you want copy, press mf, then mc, type a name of new file, enter
5
votes
Cannot exit Vim even using q!
Try
:bdelete!
or
:bd!
for short. This stands for "buffer delete" and will close the buffer you have open. (Credit goes to Emil Asmussen)
After that, you should be able to do :q! as normal.
5
votes
Accepted
:Explore shows the "." directory
You could hide the dot directory (./) by setting the global variables g:netrw_list_hide and g:netrw_hide in your vimrc like this:
let g:netrw_list_hide = '^\./$'
let g:netrw_hide = 1
The first ...
5
votes
Accepted
au FileType netrw echom "ft is now netrw" does not show up in :messages
Your autocmd is clearly correct, as you can see that the message is printed if you explicitly set the 'ft' with setl ft=netrw.
The problem you are facing is that something is blocking the messages (...
5
votes
Accepted
Autocmd on directory to replace netrw
I had a look at how Dirvish did it, and tested this:
augroup ranger
au!
au VimEnter * sil! au! FileExplorer *
au BufEnter * if s:isdir(expand('%')) | bd | exe 'Ranger' | endif
augroup END
...
5
votes
Toggle explorer window
Once this works, each time Lexplore is toggled on, it will create a new buffer but not wipe the previous one.
A solution is to wipeout netrw buffers when they are hidden.
augroup ...
5
votes
Accepted
Update netrw to newer version
Newrw is distributed as a Vimball. After you download the new version, move netrw.vba.gz to ~/.vim. Then open it with vim, e.g.,
$ vim netrw.vba.gz
You will see this message at the bottom of the ...
5
votes
How to delete non-empty directories in netrw (Vim 8 or Neovim)?
There's a way to delete non-empty directories with netrw in vim 8+ or nvim?
You could do
:!rm -rf directory
That warning means, you have files still in that directory. So if a file in that directory ...
4
votes
Accepted
How to display line numbers in netrw v125 (vim7.0)?
Is there any reason that :set number doesn't work?
Edit: I see what you mean @user3813057. Netrw has a lot of control over its buffer, so we have to be a bit tricky when doing things that it doesn't ...
4
votes
Using :Explore without closing current buffer
How do I avoid this?
You don't. The previous buffer is still there, you only need to pull it from the buffer list:
:b <Tab>
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
netrw × 187vimscript × 15
buffers × 15
vimrc × 13
key-bindings × 13
filesystem × 13
autocmd × 9
neovim × 8
vim-windows × 7
split × 7
ssh × 7
plugin-nerdtree × 4
gvim × 3
cut-copy-paste × 3
external-command × 3
filetype × 3
multiple-files × 3
startup × 3
syntax-highlighting × 2
cursor-movement × 2
microsoft-windows × 2
macvim × 2
spell-checking × 2
linux × 2
save × 2