技巧42-用:edit命令打开及保存文件
1. 相对于当前工作目录打开一个文件
- :edit {file} 命令可以接受相对于工作目录的文件路径
2. 相对于活动文件目录打开一个文件
- :edit %:h <Tab> M <Tab><Tab>
- %符号代表活动缓冲区的完整文件路径。
- :h 修饰符会去掉文件名,但保留路径中的其他部分(参见 :h ::h)
Press ← or → to navigate between chapters
Press S or / to search in the book
Press ? to show this help
Press Esc to hide this help