mirror of
https://github.com/jbranchaud/til
synced 2026-01-08 01:28:02 +00:00
Add Open Vim To A Tag Definition 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
|
warrant a full blog post. These are mostly things I learn by pairing with
|
||||||
smart people at [Hashrocket](http://hashrocket.com/).
|
smart people at [Hashrocket](http://hashrocket.com/).
|
||||||
|
|
||||||
_363 TILs and counting..._
|
_364 TILs and counting..._
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
@@ -401,6 +401,7 @@ _363 TILs and counting..._
|
|||||||
- [Open Routes File With vim-rails](vim/open-routes-file-with-vim-rails.md)
|
- [Open Routes File With vim-rails](vim/open-routes-file-with-vim-rails.md)
|
||||||
- [Open The Gemfile](vim/open-the-gemfile.md)
|
- [Open The Gemfile](vim/open-the-gemfile.md)
|
||||||
- [Open The Latest Rails Migration](vim/open-the-latest-rails-migration.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)
|
||||||
- [Opening a URL](vim/opening-a-url.md)
|
- [Opening a URL](vim/opening-a-url.md)
|
||||||
- [Opening Man Pages In Vim](vim/opening-man-pages-in-vim.md)
|
- [Opening Man Pages In Vim](vim/opening-man-pages-in-vim.md)
|
||||||
- [Paste A Register From Insert Mode](vim/paste-a-register-from-insert-mode.md)
|
- [Paste A Register From Insert Mode](vim/paste-a-register-from-insert-mode.md)
|
||||||
|
|||||||
14
vim/open-vim-to-a-tag-definition.md
Normal file
14
vim/open-vim-to-a-tag-definition.md
Normal 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.
|
||||||
Reference in New Issue
Block a user