- Mastering Vim
- Ruslan Osipov
- 243字
- 2021-06-10 18:51:29
Netrw
Netrw is a built-in file manager in Vim (if we want to get technical, it's a plugin that ships with Vim). It allows you to browse directories and functions, similar to any other file manager you've worked with in your favorite OS.
Use :Ex (the full command is :Explore) to open the file navigation window:
Here, you can see all of the files within our workspace. Netrw already provides a quick help section in a status bar, but here are the main controls you'll need to know:
- Enter opens files and directories
- - goes up a directory
- D deletes a file or directory
- R renames a file or directory
A Netrw window can be open in split windows or new tabs as well:
- :Vex opens Netrw in a vertical split
- :Sex opens Netrw in a horizontal split
- :Lex opens Netrw in a leftmost full-height vertical split
Netrw is a powerful tool, which supports remote editing as well; for instance, to get a directory listing over SFTP, you can run the following:
:Ex sftp://<domain>/<directory>/
You can substitute :Ex with :e for the same results. You can edit individual files as well. Here's how to open a file over SCP:
:e scp://<domain>/<directory>/<file>
- Learning NServiceBus(Second Edition)
- AngularJS入門與進階
- Django+Vue.js商城項目實戰
- ExtGWT Rich Internet Application Cookbook
- DevOps入門與實踐
- Android 7編程入門經典:使用Android Studio 2(第4版)
- 名師講壇:Java微服務架構實戰(SpringBoot+SpringCloud+Docker+RabbitMQ)
- Spring Boot進階:原理、實戰與面試題分析
- Mastering Backbone.js
- Learning Unreal Engine Android Game Development
- Android應用開發實戰
- Mobile Forensics:Advanced Investigative Strategies
- Python第三方庫開發應用實戰
- Python面試通關寶典
- Elasticsearch搜索引擎構建入門與實戰