mirror of
https://github.com/jbranchaud/til
synced 2026-01-03 15:18:01 +00:00
Add Rename A File Through netrw as a vim til
This commit is contained in:
@@ -9,7 +9,7 @@ and pairing with smart people at Hashrocket.
|
||||
|
||||
For a steady stream of TILs, [sign up for my newsletter](https://tinyletter.com/jbranchaud).
|
||||
|
||||
_871 TILs and counting..._
|
||||
_872 TILs and counting..._
|
||||
|
||||
---
|
||||
|
||||
@@ -933,6 +933,7 @@ _871 TILs and counting..._
|
||||
- [Quit When There Is An Argument List](vim/quit-when-there-is-an-argument-list.md)
|
||||
- [Re-indenting Your Code](vim/reindenting-your-code.md)
|
||||
- [Read In The Contents Of A Rails File](vim/read-in-the-contents-of-a-rails-file.md)
|
||||
- [Rename A File Through netrw](vim/rename-a-file-through-netrw.md)
|
||||
- [Rename Current File](vim/rename-current-file.md)
|
||||
- [Repeat The Previous Change](vim/repeat-the-previous-change.md)
|
||||
- [Repeating Characters](vim/repeating-characters.md)
|
||||
|
||||
23
vim/rename-a-file-through-netrw.md
Normal file
23
vim/rename-a-file-through-netrw.md
Normal file
@@ -0,0 +1,23 @@
|
||||
# Rename A File Through netrw
|
||||
|
||||
You can browse files in a directory through Vim using netrw. This can be done
|
||||
by _editing_ a directory with Vim:
|
||||
|
||||
```bash
|
||||
$ vim src/
|
||||
```
|
||||
|
||||
You'll see a listing of the files and directories in `src`:
|
||||
|
||||
```
|
||||
app/
|
||||
index.js
|
||||
README.md
|
||||
utils/
|
||||
```
|
||||
|
||||
You can move your cursor over one of those files and hit `R` to rename it. A
|
||||
prompt will appear at the bottom of your Vim session with the file's current
|
||||
name spelled out. You can edit inline and then hit enter to apply the renaming.
|
||||
|
||||
[source](https://superuser.com/questions/767026/can-i-rename-files-in-a-directory-with-vim#)
|
||||
Reference in New Issue
Block a user