Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

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

Merged
merged 1 commit into from

3 participants

petRUShka Yan Pritzker Taybin Rutkin
petRUShka

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:
:

Vim instantly opens and jumps to . Very cool!

Yan Pritzker
Owner
petRUShka

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 :)

Yan Pritzker skwp merged commit 8d9f526 into from
petRUShka

Nice choice, thanks!

Taybin Rutkin

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

petRUShka

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Mar 22, 2013
  1. petRUShka

    New: [VIM] added file-line plugin. Allows to open file and move to ce…

    petRUShka authored
    …rtain line like this vim Rakefile:110
This page is out of date. Refresh to see the latest.
Showing with 4 additions and 0 deletions.
  1. +3 −0  .gitmodules
  2. +1 −0  vim/bundle/bogado-file-line
3  .gitmodules
View
@@ -353,3 +353,6 @@
[submodule "vim/bundle/airblade-vim-gitgutter"]
path = vim/bundle/airblade-vim-gitgutter
url = https://github.com/airblade/vim-gitgutter
+[submodule "vim/bundle/bogado-file-line"]
+ path = vim/bundle/bogado-file-line
+ url = https://github.com/bogado/file-line.git
1  vim/bundle/bogado-file-line
@@ -0,0 +1 @@
+Subproject commit 06d6c0e22647e9907389ce6e37dfb5be3ef11777
Something went wrong with that request. Please try again.