mirror of
https://github.com/jbranchaud/til
synced 2026-01-03 07:08:01 +00:00
Add Open The Directory Of The Current File as a vim til
This commit is contained in:
@@ -7,7 +7,7 @@ variety of languages and technologies. These are things that don't really
|
||||
warrant a full blog post. These are mostly things I learn by pairing with
|
||||
smart people at [Hashrocket](http://hashrocket.com/).
|
||||
|
||||
_479 TILs and counting..._
|
||||
_480 TILs and counting..._
|
||||
|
||||
---
|
||||
|
||||
@@ -517,6 +517,7 @@ _479 TILs and counting..._
|
||||
- [Open A Tag In A Split Window](vim/open-a-tag-in-a-split-window.md)
|
||||
- [Open an Unnamed Buffer](vim/open-an-unnamed-buffer.md)
|
||||
- [Open Routes File With vim-rails](vim/open-routes-file-with-vim-rails.md)
|
||||
- [Open The Directory Of The Current File](vim/open-the-directory-of-the-current-file.md)
|
||||
- [Open The Gemfile](vim/open-the-gemfile.md)
|
||||
- [Open The Latest Rails Migration](vim/open-the-latest-rails-migration.md)
|
||||
- [Open Vim To A Tag Definition](vim/open-vim-to-a-tag-definition.md)
|
||||
|
||||
28
vim/open-the-directory-of-the-current-file.md
Normal file
28
vim/open-the-directory-of-the-current-file.md
Normal file
@@ -0,0 +1,28 @@
|
||||
# Open The Directory Of The Current File
|
||||
|
||||
In one of my first TILs ever, [Head Of File
|
||||
Name](https://github.com/jbranchaud/til/blob/master/vim/head-of-file-name.md),
|
||||
I wrote about a fancy, archaic way of popping open a netrw view for the
|
||||
directory of the current file. To this day, I still use it all the time when
|
||||
I'm curious about the other files co-located with the file I'm editing.
|
||||
|
||||
There are a couple other ways to do this that arguably require less finger
|
||||
gymnastics.
|
||||
|
||||
```
|
||||
:Explore
|
||||
```
|
||||
|
||||
This has the same behavior `:e %:h` at the cost of a few extra (easier to
|
||||
reach) keys.
|
||||
|
||||
There is also
|
||||
|
||||
```
|
||||
:Sex
|
||||
```
|
||||
|
||||
which opens it up in a split. And as you'd expect, you can also use `:Vex`
|
||||
for a vertical split.
|
||||
|
||||
[source](http://superuser.com/questions/31677/how-do-i-open-the-directory-of-the-current-open-file)
|
||||
Reference in New Issue
Block a user