1
0
mirror of https://github.com/jbranchaud/til synced 2026-01-07 17:18:02 +00:00

Add Open Vim To A Tag Definition as a vim til

This commit is contained in:
jbranchaud
2016-03-14 19:52:38 -05:00
parent cff0083a5c
commit 7d3442e23d
2 changed files with 16 additions and 1 deletions

View File

@@ -0,0 +1,14 @@
# Open Vim To A Tag Definition
If you are using [ctags with Vim](https://andrew.stwrt.ca/posts/vim-ctags/),
you can provide a tag name when opening Vim. This signals to Vim that it
should open to the file and location of the tag's definition. For instance,
if you have a Rails project going and you provide Vim with the
`UsersController` tag name, it will open the
`app/controllers/users_controller.rb`. Just use the `-t` flag like so:
```
$ vim -t UsersController
```
See `man vim` for more details.