From d57002c61fe5b34985bd120266261adeb3ebbad4 Mon Sep 17 00:00:00 2001 From: jbranchaud Date: Thu, 9 Aug 2018 14:29:29 -0500 Subject: [PATCH] Add Print The Relative Path Of The Current File as a vim til --- README.md | 3 ++- vim/print-the-relative-path-of-the-current-file.md | 13 +++++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 vim/print-the-relative-path-of-the-current-file.md diff --git a/README.md b/README.md index 1d02728..cbec074 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ smart people at [Hashrocket](http://hashrocket.com/). For a steady stream of TILs from a variety of rocketeers, checkout [til.hashrocket.com](https://til.hashrocket.com/). -_697 TILs and counting..._ +_698 TILs and counting..._ --- @@ -757,6 +757,7 @@ _697 TILs and counting..._ - [Preventing Typos with Abbreviations](vim/preventing-typos-with-abbreviations.md) - [Previous Buffer](vim/previous-buffer.md) - [Previous Visual Selection](vim/previous-visual-selection.md) +- [Print The Relative Path Of The Current File](vim/print-the-relative-path-of-the-current-file.md) - [Print Version Information](vim/print-version-information.md) - [Quick File Info](vim/quick-file-info.md) - [Quick Man Pages](vim/quick-man-pages.md) diff --git a/vim/print-the-relative-path-of-the-current-file.md b/vim/print-the-relative-path-of-the-current-file.md new file mode 100644 index 0000000..903cd44 --- /dev/null +++ b/vim/print-the-relative-path-of-the-current-file.md @@ -0,0 +1,13 @@ +# Print The Relative Path Of The Current File + +As a project grows and there are many directories and long path names, Vim +will not always have enough room to display the full relative path of the +current file. It may have to cut off the initial directories which can make +it hard to know where you are. + +You can hit `Ctrl-g` to quickly display the relative path of the current +file below the status bar. + +![example of using ctrl-g](https://i.imgur.com/w7gzIIV.gif) + +See `:help Ctrl-g` for more details.