Add vim-plugin for opening files like this `vim Rakefile:110` #269

Merged
merged 1 commit into from Mar 22, 2013

Conversation

Projects
None yet
3 participants
@petRUShka
Contributor

petRUShka commented Mar 22, 2013

Plugin: http://www.vim.org/scripts/script.php?script_id=2184

You can just copy output from rspec and paste it into :e spec/models/user_spec.rb:14 command or into vim spec/models/user_spec.rb:14. You can feel powerful of such feature with any command line tool that yield output like this:
<file_path>:<line_number>

Vim instantly opens <file_path> and jumps to <line_number>. Very cool!

@skwp

This comment has been minimized.

Show comment Hide comment
@skwp

skwp Mar 22, 2013

Owner

I believe we already have something similar. hit gf or gF over a line like that. yadr knows to go to the line num

thanks,
Yan Pritzker
reverb.com

On Fri, Mar 22, 2013 at 12:53 AM, petRUShka notifications@github.com
wrote:

Plugin: http://www.vim.org/scripts/script.php?script_id=2184
You can just copy output from rspec and paste it into :e spec/models/user_spec.rb:14 command or into vim spec/models/user_spec.rb:14. You can feel powerful of such feature with any command line tool that yield output like this:
<file_path>:<line_number>
Vim instantly opens <file_path> and jumps to <line_number>. Very cool!
You can merge this Pull Request by running:
git pull https://github.com/petRUShka/dotfiles master
Or you can view, comment on it, or merge it online at:
#269
-- Commit Summary --

Owner

skwp commented Mar 22, 2013

I believe we already have something similar. hit gf or gF over a line like that. yadr knows to go to the line num

thanks,
Yan Pritzker
reverb.com

On Fri, Mar 22, 2013 at 12:53 AM, petRUShka notifications@github.com
wrote:

Plugin: http://www.vim.org/scripts/script.php?script_id=2184
You can just copy output from rspec and paste it into :e spec/models/user_spec.rb:14 command or into vim spec/models/user_spec.rb:14. You can feel powerful of such feature with any command line tool that yield output like this:
<file_path>:<line_number>
Vim instantly opens <file_path> and jumps to <line_number>. Very cool!
You can merge this Pull Request by running:
git pull https://github.com/petRUShka/dotfiles master
Or you can view, comment on it, or merge it online at:
#269
-- Commit Summary --

@petRUShka

This comment has been minimized.

Show comment Hide comment
@petRUShka

petRUShka Mar 22, 2013

Contributor

Let try to open file with vim like this: vim path/to/file:<linenumber>. It isn't possible with original yadr. With such plugin I'm able to do something like this in zsh: $ vim my_file.rb:113. Vim will open file and will jump to 113 line instantly. Very cool and very useful. I've lived with it for a while and now I can't image workflow without it future.

Or let try to open file inside vim using :e my_file.rb:113 . Vim will open new blank file with name my_file.rb:113 like in example above. It's definitely not cool :)

Contributor

petRUShka commented Mar 22, 2013

Let try to open file with vim like this: vim path/to/file:<linenumber>. It isn't possible with original yadr. With such plugin I'm able to do something like this in zsh: $ vim my_file.rb:113. Vim will open file and will jump to 113 line instantly. Very cool and very useful. I've lived with it for a while and now I can't image workflow without it future.

Or let try to open file inside vim using :e my_file.rb:113 . Vim will open new blank file with name my_file.rb:113 like in example above. It's definitely not cool :)

skwp added a commit that referenced this pull request Mar 22, 2013

Merge pull request #269 from petRUShka/master
Add vim-plugin for opening files like this `vim Rakefile:110`

@skwp skwp merged commit 8d9f526 into skwp:master Mar 22, 2013

@petRUShka

This comment has been minimized.

Show comment Hide comment
@petRUShka

petRUShka Mar 22, 2013

Contributor

Nice choice, thanks!

Contributor

petRUShka commented Mar 22, 2013

Nice choice, thanks!

@taybin

This comment has been minimized.

Show comment Hide comment
@taybin

taybin Mar 25, 2013

Contributor

Why is this better than vim path/to/file +<linenumber>? It's a little more scriptable?

Contributor

taybin commented Mar 25, 2013

Why is this better than vim path/to/file +<linenumber>? It's a little more scriptable?

@petRUShka

This comment has been minimized.

Show comment Hide comment
@petRUShka

petRUShka Mar 25, 2013

Contributor

You can't copy something like this /home/user/.rvm/gems/ruby-1.9.3-p194/gems/rspec-core-2.12.2/lib/rspec/core/command_line.rb:22, paste it to command line and open without changes. In your way you should always change :22 to +22.

Contributor

petRUShka commented Mar 25, 2013

You can't copy something like this /home/user/.rvm/gems/ruby-1.9.3-p194/gems/rspec-core-2.12.2/lib/rspec/core/command_line.rb:22, paste it to command line and open without changes. In your way you should always change :22 to +22.

chrisnankervis pushed a commit to chrisnankervis/dotfiles that referenced this pull request Oct 5, 2014

Merge pull request #269 from petRUShka/master
Add vim-plugin for opening files like this `vim Rakefile:110`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment