Skip to content
Shuai YUAN edited this page May 29, 2015 · 1 revision

Table of Contents

Tip 41: Open a File by Its Filepath Using :edit

Return to the top: <> %toc

Open a File Relative to the Current Working Directory

Open a File Relative to the Active File Directory

  • `:edit %`: reveal the absolute path of the active buffer
* `%`: shorthand for the filepath of the active buffer

References

  • `:edit %:h`: remove the filename while preserving the rest of the path

References

Easy Expansion of the Active File Directory

map `%%` to `%h:h`

References

Table of Contents


Clone this wiki locally