Created
February 13, 2009 00:49
-
-
Save codesnik/62976 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# эта хрень подключается так: | |
# vim --servername 'VIM' | |
# rdebug -rvim path/to/script | |
# | |
# команда v - заставит отобразить текущую файл и строку в запущенном vim-е | |
# | |
# Debugger::Command.settings[:autovim]=1 заставит делать это после | |
# каждого шага | |
module Debugger | |
# Implements debugger "list" command. | |
class VimCommand < Command | |
register_setting_get(:autovim) do | |
VimCommand.always_run | |
end | |
register_setting_set(:autovim) do |value| | |
VimCommand.always_run = value | |
end | |
def regexp | |
/^\s* v(?:im)$/x | |
end | |
def execute | |
system "vim --remote +#{@state.line} #{@state.file}" | |
end | |
class << self | |
def help_command | |
'list' | |
end | |
# doesn't work. use Debugger::Command.settings[:autovim] | |
def help(cmd) | |
%{ | |
vim | |
} | |
end | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment