mirror of
https://github.com/jbranchaud/til
synced 2026-01-04 23:58:01 +00:00
Add Deleting Directories Of Files From netrw as a vim til.
This commit is contained in:
@@ -161,6 +161,7 @@ smart people at [Hashrocket](http://hashrocket.com/).
|
||||
- [Count the Number of Matches](vim/count-the-number-of-matches.md)
|
||||
- [Create A New Directory In netrw](vim/create-a-new-directory-in-netrw.md)
|
||||
- [Create A New File In A New Directory](vim/create-a-new-file-in-a-new-directory.md)
|
||||
- [Deleting Directories Of Files From netrw](vim/deleting-directories-of-files-from-netrw.md)
|
||||
- [Edges Of The Selection](vim/edges-of-the-selection.md)
|
||||
- [End Of The Word](vim/end-of-the-word.md)
|
||||
- [Filter Lines Through An External Program](vim/filter-lines-through-an-external-program.md)
|
||||
|
||||
17
vim/deleting-directories-of-files-from-netrw.md
Normal file
17
vim/deleting-directories-of-files-from-netrw.md
Normal file
@@ -0,0 +1,17 @@
|
||||
# Deleting Directories Of Files From netrw
|
||||
|
||||
In `netrw`, you can delete files and directories by navigating over the
|
||||
target of deletion and hitting `D`.
|
||||
|
||||
By default, `netrw` will use `rmdir` when deleting directories. This means
|
||||
that if a directory has files in it, then it won't be deleted. `rmdir`
|
||||
rightly gives an error when the target directory isn't empty.
|
||||
|
||||
`netrw` can be configured to use `rm -r` instead of `rmdir` when deleting
|
||||
directories.
|
||||
|
||||
```
|
||||
:let g:netrw_localrmdir='rm -r'
|
||||
```
|
||||
|
||||
[source](https://gist.github.com/KevinSjoberg/5068370)
|
||||
Reference in New Issue
Block a user