我知道這是一個初學者的問題!假設我們有兩個目錄:在Vim中,打開一個與當前文件名相同的文件,但在另一個目錄中
recipes/
apple-pie.txt
blueberry-muffin.txt
disaster-stories/
apple-pie.txt
blueberry-muffin.txt
讓我們也假設Vim的當前目錄設置爲父目錄都recipes/
和disaster-stories/
的。
問:
如果我編輯recipes/apple-pie.txt
,我希望能夠進入一個自定義的命令,如:dsstr
,造成當前文件保存和disaster-stories/apple-pie.txt
被打開。我怎麼能這樣做?
@Robert感謝您的編輯。 – ClosureCowboy
爲什麼不試試::w disaster-stories/apple-pie。txt –
我可以,也許我應該。但我認爲能夠跳轉到相應的文件而不必每次指定其名稱都會很方便。 – ClosureCowboy