pry-de 0.0.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.document +5 -0
- data/.rspec +1 -0
- data/Gemfile +18 -0
- data/Gemfile.lock +142 -0
- data/LICENSE.txt +20 -0
- data/README.rdoc +6 -0
- data/Rakefile +49 -0
- data/VERSION +1 -0
- data/lib/pry-de.rb +112 -0
- data/pry-de.gemspec +73 -0
- data/spec/pry-de_spec.rb +5 -0
- data/spec/spec_helper.rb +11 -0
- data/vim/pry-de.vim +63 -0
- metadata +194 -0
data/.document
ADDED
data/.rspec
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
--color
|
data/Gemfile
ADDED
@@ -0,0 +1,18 @@
|
|
1
|
+
source 'http://rubygems.org'
|
2
|
+
|
3
|
+
def hubgem user_repo, branch = 'master'
|
4
|
+
user, repo = user_repo.split ?/
|
5
|
+
gem repo, git: "git@github.com:#{user}/#{repo}", branch: branch
|
6
|
+
end
|
7
|
+
|
8
|
+
hubgem 'pry/pry'
|
9
|
+
hubgem 'guard/guard', 'interactor/pry'
|
10
|
+
gem 'pry-full'
|
11
|
+
|
12
|
+
group :development do
|
13
|
+
gem 'rspec'
|
14
|
+
gem 'yard'
|
15
|
+
gem 'rdoc'
|
16
|
+
gem 'bundler'
|
17
|
+
gem 'jeweler'
|
18
|
+
end
|
data/Gemfile.lock
ADDED
@@ -0,0 +1,142 @@
|
|
1
|
+
GIT
|
2
|
+
remote: git@github.com:guard/guard
|
3
|
+
revision: 2837fbd084b4e8e2127ecea92a50d71fec3e4aa7
|
4
|
+
branch: interactor/pry
|
5
|
+
specs:
|
6
|
+
guard (1.3.2)
|
7
|
+
listen (>= 0.4.2)
|
8
|
+
pry
|
9
|
+
thor (>= 0.14.6)
|
10
|
+
|
11
|
+
GIT
|
12
|
+
remote: git@github.com:pry/pry
|
13
|
+
revision: bc4fb838eb48b5fb7419c5f2320e88ec1101e95c
|
14
|
+
branch: master
|
15
|
+
specs:
|
16
|
+
pry (0.9.10)
|
17
|
+
coderay (~> 1.0.5)
|
18
|
+
method_source (~> 0.8)
|
19
|
+
slop (~> 3.3.1)
|
20
|
+
|
21
|
+
GEM
|
22
|
+
remote: http://rubygems.org/
|
23
|
+
specs:
|
24
|
+
awesome_print (1.1.0)
|
25
|
+
binding_of_caller (0.6.8)
|
26
|
+
bond (0.4.2)
|
27
|
+
coderay (1.0.7)
|
28
|
+
columnize (0.3.6)
|
29
|
+
debugger (1.1.4)
|
30
|
+
columnize (>= 0.3.1)
|
31
|
+
debugger-linecache (~> 1.1.1)
|
32
|
+
debugger-ruby_core_source (~> 1.1.3)
|
33
|
+
debugger-linecache (1.1.2)
|
34
|
+
debugger-ruby_core_source (>= 1.1.1)
|
35
|
+
debugger-ruby_core_source (1.1.3)
|
36
|
+
diff-lcs (1.1.3)
|
37
|
+
diffy (2.0.8)
|
38
|
+
eventmachine (1.0.0)
|
39
|
+
git (1.2.5)
|
40
|
+
grit (2.5.0)
|
41
|
+
diff-lcs (~> 1.1)
|
42
|
+
mime-types (~> 1.15)
|
43
|
+
posix-spawn (~> 0.3.6)
|
44
|
+
highline (1.6.15)
|
45
|
+
interception (0.1)
|
46
|
+
jeweler (1.8.4)
|
47
|
+
bundler (~> 1.0)
|
48
|
+
git (>= 1.2.5)
|
49
|
+
rake
|
50
|
+
rdoc
|
51
|
+
jist (1.0.1)
|
52
|
+
json
|
53
|
+
json (1.7.3)
|
54
|
+
listen (0.5.1)
|
55
|
+
method_source (0.8)
|
56
|
+
mime-types (1.19)
|
57
|
+
nokogiri (1.5.5)
|
58
|
+
plymouth (0.3.2)
|
59
|
+
pry-exception_explorer (>= 0.1.7)
|
60
|
+
posix-spawn (0.3.6)
|
61
|
+
pry-awesome_print (9.6.5)
|
62
|
+
awesome_print (~> 1.1.0)
|
63
|
+
pry-debugger (0.2.0)
|
64
|
+
debugger (~> 1.1.3)
|
65
|
+
pry (~> 0.9.9)
|
66
|
+
pry-developer_tools (0.1.1)
|
67
|
+
pry (>= 0.9.8.pre, < 0.11)
|
68
|
+
pry-doc (0.4.4)
|
69
|
+
pry (>= 0.9.9.6)
|
70
|
+
yard (~> 0.8.1)
|
71
|
+
pry-editline (1.1.1)
|
72
|
+
pry-exception_explorer (0.1.9)
|
73
|
+
pry-stack_explorer (>= 0.3.9)
|
74
|
+
pry-full (0.6)
|
75
|
+
bond
|
76
|
+
jist
|
77
|
+
plymouth
|
78
|
+
pry-awesome_print
|
79
|
+
pry-debugger
|
80
|
+
pry-developer_tools
|
81
|
+
pry-doc
|
82
|
+
pry-editline
|
83
|
+
pry-exception_explorer
|
84
|
+
pry-git
|
85
|
+
pry-highlight
|
86
|
+
pry-pretty-numeric
|
87
|
+
pry-remote-em
|
88
|
+
pry-rescue
|
89
|
+
pry-stack_explorer
|
90
|
+
pry-syntax-hacks
|
91
|
+
pry-theme
|
92
|
+
pry-git (0.2.3)
|
93
|
+
diffy
|
94
|
+
grit
|
95
|
+
pry (>= 0.9.8)
|
96
|
+
pry-highlight (0.0.1)
|
97
|
+
coderay
|
98
|
+
json
|
99
|
+
nokogiri
|
100
|
+
pry
|
101
|
+
pry-pretty-numeric (0.1.1)
|
102
|
+
pry
|
103
|
+
pry-remote-em (0.7.3)
|
104
|
+
eventmachine
|
105
|
+
highline
|
106
|
+
pry (~> 0.9)
|
107
|
+
pry-rescue (0.8)
|
108
|
+
interception
|
109
|
+
pry
|
110
|
+
pry-stack_explorer (0.4.6)
|
111
|
+
binding_of_caller (~> 0.6.2)
|
112
|
+
pry-syntax-hacks (0.0.6)
|
113
|
+
pry (>= 0.9.8)
|
114
|
+
pry-theme (0.1.2)
|
115
|
+
json
|
116
|
+
rake (0.9.2.2)
|
117
|
+
rdoc (3.12)
|
118
|
+
json (~> 1.4)
|
119
|
+
rspec (2.11.0)
|
120
|
+
rspec-core (~> 2.11.0)
|
121
|
+
rspec-expectations (~> 2.11.0)
|
122
|
+
rspec-mocks (~> 2.11.0)
|
123
|
+
rspec-core (2.11.1)
|
124
|
+
rspec-expectations (2.11.1)
|
125
|
+
diff-lcs (~> 1.1.3)
|
126
|
+
rspec-mocks (2.11.1)
|
127
|
+
slop (3.3.3)
|
128
|
+
thor (0.16.0)
|
129
|
+
yard (0.8.2.1)
|
130
|
+
|
131
|
+
PLATFORMS
|
132
|
+
ruby
|
133
|
+
|
134
|
+
DEPENDENCIES
|
135
|
+
bundler
|
136
|
+
guard!
|
137
|
+
jeweler
|
138
|
+
pry!
|
139
|
+
pry-full
|
140
|
+
rdoc
|
141
|
+
rspec
|
142
|
+
yard
|
data/LICENSE.txt
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
Copyright (c) 2012 ☈king
|
2
|
+
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
4
|
+
a copy of this software and associated documentation files (the
|
5
|
+
"Software"), to deal in the Software without restriction, including
|
6
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
7
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
8
|
+
permit persons to whom the Software is furnished to do so, subject to
|
9
|
+
the following conditions:
|
10
|
+
|
11
|
+
The above copyright notice and this permission notice shall be
|
12
|
+
included in all copies or substantial portions of the Software.
|
13
|
+
|
14
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
15
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
16
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
17
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
18
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
19
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
20
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.rdoc
ADDED
data/Rakefile
ADDED
@@ -0,0 +1,49 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
|
3
|
+
task :'pry-de' do
|
4
|
+
sh *%w(bundle exec pry -Ilib -rpry-de) + ARGV[1..-1]
|
5
|
+
end
|
6
|
+
|
7
|
+
require 'bundler'
|
8
|
+
begin
|
9
|
+
Bundler.setup(:default, :development)
|
10
|
+
rescue Bundler::BundlerError => e
|
11
|
+
$stderr.puts e.message
|
12
|
+
$stderr.puts "Run `bundle install` to install missing gems"
|
13
|
+
exit e.status_code
|
14
|
+
end
|
15
|
+
require 'rake'
|
16
|
+
|
17
|
+
require 'jeweler'
|
18
|
+
Jeweler::Tasks.new do |gem|
|
19
|
+
gem.name = 'pry-de'
|
20
|
+
gem.homepage = 'http://github.com/rking/pry-de'
|
21
|
+
gem.license = 'CC0'
|
22
|
+
gem.summary = %Q{Run-time Ruby Development Environment based on Pry. [Maturity: Fœtal. Only use if you're adventurous]}
|
23
|
+
gem.description = %Q{For the concept, see: https://github.com/pry/pry/wiki/pry-de}
|
24
|
+
gem.email = 'pry-de@sharpsaw.org'
|
25
|
+
gem.authors = ['☈king', 'Banisterfiend']
|
26
|
+
end
|
27
|
+
Jeweler::RubygemsDotOrgTasks.new
|
28
|
+
|
29
|
+
task :default => :spec
|
30
|
+
|
31
|
+
require 'rspec/core'
|
32
|
+
require 'rspec/core/rake_task'
|
33
|
+
RSpec::Core::RakeTask.new(:spec) do |spec|
|
34
|
+
spec.pattern = FileList['spec/**/*_spec.rb']
|
35
|
+
end
|
36
|
+
|
37
|
+
RSpec::Core::RakeTask.new(:rcov) do |spec|
|
38
|
+
spec.pattern = 'spec/**/*_spec.rb'
|
39
|
+
spec.rcov = true
|
40
|
+
end
|
41
|
+
|
42
|
+
#require 'yard'
|
43
|
+
#YARD::Rake::YardocTask.new
|
44
|
+
|
45
|
+
task :install do
|
46
|
+
Rake::Task['gemspec'].invoke
|
47
|
+
sh 'gem build *.gemspec'
|
48
|
+
sh 'gem install *.gem'
|
49
|
+
end
|
data/VERSION
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
0.0.0
|
data/lib/pry-de.rb
ADDED
@@ -0,0 +1,112 @@
|
|
1
|
+
require 'pry'
|
2
|
+
|
3
|
+
module PryDe
|
4
|
+
|
5
|
+
Commands = Pry::CommandSet.new do
|
6
|
+
# pry-debugger shortcuts:
|
7
|
+
Pry.commands.alias_command ',b', 'break'
|
8
|
+
Pry.commands.alias_command ',s', 'step'
|
9
|
+
Pry.commands.alias_command ',n', 'next'
|
10
|
+
Pry.commands.alias_command ',c', 'continue'
|
11
|
+
Pry.commands.alias_command ',f', 'finish'
|
12
|
+
|
13
|
+
Pry.commands.command ',-',
|
14
|
+
'Remove last item from history, in preparation for a `play` command' do
|
15
|
+
fail 'Newer (possibly Github) pry needed' unless
|
16
|
+
_pry_.input_array.respond_to? :pop!
|
17
|
+
_pry_.input_array.pop!
|
18
|
+
end
|
19
|
+
|
20
|
+
Pry.commands.command ',m', 'play method body only' do
|
21
|
+
run_command 'play --lines 2..-2 -m'
|
22
|
+
end
|
23
|
+
|
24
|
+
# Hackish, but comes in handy, e.g. due to vim's dir browsing (:Ex)
|
25
|
+
Pry.commands.command ',l', 'edit lib/' do
|
26
|
+
run 'edit lib/'
|
27
|
+
IO.popen('git status --porcelain -- lib').readlines.each do |dirty|
|
28
|
+
load dirty.split(' ').last
|
29
|
+
end
|
30
|
+
end
|
31
|
+
|
32
|
+
Pry.commands.command ',r', 'Rerun previous command, like "r" in zsh' do
|
33
|
+
run 'history --replay -1'
|
34
|
+
end
|
35
|
+
|
36
|
+
Pry.commands.command '?$', 'show-doc + show-source' do
|
37
|
+
run '? ' + arg_string
|
38
|
+
run '$ ' + arg_string
|
39
|
+
end
|
40
|
+
|
41
|
+
# TODO: ,clip ⇒ cat -i; clipit -i $stdin.readline.chomp
|
42
|
+
|
43
|
+
# ,, aliases all the ",cmd"s to "cmd". Undo with a second ",,"
|
44
|
+
# I'll promise not to use x and y, so they can always be metasyntactic.
|
45
|
+
# …but the rest are fair game.
|
46
|
+
Pry.commands.command ',,',
|
47
|
+
'toggle ,-prefixes off/on commands, for terse input' do
|
48
|
+
abbreviations = []
|
49
|
+
Pry.commands.commands.keys.reject do |cmd|
|
50
|
+
cmd.class != String or cmd[0] != ',' or cmd == ',,'
|
51
|
+
end.each do |e|
|
52
|
+
terse = e[1..-1]
|
53
|
+
# TODO: check to see if you're stomping on something, first.
|
54
|
+
Pry.commands.alias_command terse, e
|
55
|
+
abbreviations << terse
|
56
|
+
end
|
57
|
+
Pry.commands.command ',,', 'unsplat all ,-commands' do
|
58
|
+
abbreviations.each do |too_terse|
|
59
|
+
Pry.commands.delete too_terse
|
60
|
+
end
|
61
|
+
end
|
62
|
+
Pry.output.puts "Added commands: #{abbreviations.join ' '}"
|
63
|
+
end
|
64
|
+
|
65
|
+
Pry.commands.block_command /[$?]?\s*(.*?)\s*,,e\s*(.*)/,
|
66
|
+
'edit from anywhere on the line' do |a,b|
|
67
|
+
run "edit #{a} #{b}"
|
68
|
+
end
|
69
|
+
|
70
|
+
# I want this upstreamed as cat --EX
|
71
|
+
Pry.commands.command 'cat--EX', 'show whole backtrace' do
|
72
|
+
ex = _pry_.last_exception
|
73
|
+
count = ex.backtrace.count
|
74
|
+
(0...count).each do |v|
|
75
|
+
break if ex.backtrace[v].match /gems\/pry/
|
76
|
+
run "cat --ex #{v}"
|
77
|
+
end
|
78
|
+
end
|
79
|
+
|
80
|
+
# TODO: promote to pry-docmore.
|
81
|
+
# Follow pry-doc further, e.g.:
|
82
|
+
# $ [].push
|
83
|
+
# C$ rb_ary_modify
|
84
|
+
Pry.commands.command 'C$', 'Hop to tag in the Ruby C source' do
|
85
|
+
# TODO: Also check the dirs where rvm and ruby-build place trees.
|
86
|
+
src_dir = ENV['RUBY_SRC_DIR'] || ENV['HOME']+'/pkg'
|
87
|
+
unless Dir.exist? src_dir
|
88
|
+
Pry.output.puts "Need either $RUBY_SRC_DIR (env var) or ~/pkg/ to exist"
|
89
|
+
return
|
90
|
+
end
|
91
|
+
ruby_dir = src_dir + '/ruby'
|
92
|
+
unless Dir.exist? ruby_dir
|
93
|
+
Pry.output.puts "Need ruby source checkout."
|
94
|
+
ruby_repo = 'https://github.com/ruby/ruby.git'
|
95
|
+
Pry.output.puts \
|
96
|
+
"Consider: .git clone --depth 1 #{ruby_repo} #{ruby_dir}"
|
97
|
+
"(which takes <1min on a decent connection)"
|
98
|
+
end
|
99
|
+
Dir.chdir ruby_dir do
|
100
|
+
unless File.exist? 'tags'
|
101
|
+
puts "Building tags file with ctags -R"
|
102
|
+
system 'ctags -R'
|
103
|
+
end
|
104
|
+
# Please let me know how to jump to a tag from your favorite $EDITOR
|
105
|
+
system 'vim', '-t', arg_string
|
106
|
+
end
|
107
|
+
end
|
108
|
+
|
109
|
+
end
|
110
|
+
end
|
111
|
+
|
112
|
+
Pry.commands.import PryDe::Commands
|
data/pry-de.gemspec
ADDED
@@ -0,0 +1,73 @@
|
|
1
|
+
# Generated by jeweler
|
2
|
+
# DO NOT EDIT THIS FILE DIRECTLY
|
3
|
+
# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
|
4
|
+
# -*- encoding: utf-8 -*-
|
5
|
+
|
6
|
+
Gem::Specification.new do |s|
|
7
|
+
s.name = "pry-de"
|
8
|
+
s.version = "0.0.0"
|
9
|
+
|
10
|
+
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
|
+
s.authors = ["\u{2608}king", "Banisterfiend"]
|
12
|
+
s.date = "2012-09-20"
|
13
|
+
s.description = "For the concept, see: https://github.com/pry/pry/wiki/pry-de"
|
14
|
+
s.email = "pry-de@sharpsaw.org"
|
15
|
+
s.extra_rdoc_files = [
|
16
|
+
"LICENSE.txt",
|
17
|
+
"README.rdoc"
|
18
|
+
]
|
19
|
+
s.files = [
|
20
|
+
".document",
|
21
|
+
".rspec",
|
22
|
+
"Gemfile",
|
23
|
+
"Gemfile.lock",
|
24
|
+
"LICENSE.txt",
|
25
|
+
"README.rdoc",
|
26
|
+
"Rakefile",
|
27
|
+
"VERSION",
|
28
|
+
"lib/pry-de.rb",
|
29
|
+
"pry-de.gemspec",
|
30
|
+
"spec/pry-de_spec.rb",
|
31
|
+
"spec/spec_helper.rb",
|
32
|
+
"vim/pry-de.vim"
|
33
|
+
]
|
34
|
+
s.homepage = "http://github.com/rking/pry-de"
|
35
|
+
s.licenses = ["CC0"]
|
36
|
+
s.require_paths = ["lib"]
|
37
|
+
s.rubygems_version = "1.8.24"
|
38
|
+
s.summary = "Run-time Ruby Development Environment based on Pry. [Maturity: F\u{153}tal. Only use if you're adventurous]"
|
39
|
+
|
40
|
+
if s.respond_to? :specification_version then
|
41
|
+
s.specification_version = 3
|
42
|
+
|
43
|
+
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
44
|
+
s.add_runtime_dependency(%q<pry>, [">= 0"])
|
45
|
+
s.add_runtime_dependency(%q<guard>, [">= 0"])
|
46
|
+
s.add_runtime_dependency(%q<pry-full>, [">= 0"])
|
47
|
+
s.add_development_dependency(%q<rspec>, [">= 0"])
|
48
|
+
s.add_development_dependency(%q<yard>, [">= 0"])
|
49
|
+
s.add_development_dependency(%q<rdoc>, [">= 0"])
|
50
|
+
s.add_development_dependency(%q<bundler>, [">= 0"])
|
51
|
+
s.add_development_dependency(%q<jeweler>, [">= 0"])
|
52
|
+
else
|
53
|
+
s.add_dependency(%q<pry>, [">= 0"])
|
54
|
+
s.add_dependency(%q<guard>, [">= 0"])
|
55
|
+
s.add_dependency(%q<pry-full>, [">= 0"])
|
56
|
+
s.add_dependency(%q<rspec>, [">= 0"])
|
57
|
+
s.add_dependency(%q<yard>, [">= 0"])
|
58
|
+
s.add_dependency(%q<rdoc>, [">= 0"])
|
59
|
+
s.add_dependency(%q<bundler>, [">= 0"])
|
60
|
+
s.add_dependency(%q<jeweler>, [">= 0"])
|
61
|
+
end
|
62
|
+
else
|
63
|
+
s.add_dependency(%q<pry>, [">= 0"])
|
64
|
+
s.add_dependency(%q<guard>, [">= 0"])
|
65
|
+
s.add_dependency(%q<pry-full>, [">= 0"])
|
66
|
+
s.add_dependency(%q<rspec>, [">= 0"])
|
67
|
+
s.add_dependency(%q<yard>, [">= 0"])
|
68
|
+
s.add_dependency(%q<rdoc>, [">= 0"])
|
69
|
+
s.add_dependency(%q<bundler>, [">= 0"])
|
70
|
+
s.add_dependency(%q<jeweler>, [">= 0"])
|
71
|
+
end
|
72
|
+
end
|
73
|
+
|
data/spec/pry-de_spec.rb
ADDED
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1,11 @@
|
|
1
|
+
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
|
2
|
+
$LOAD_PATH.unshift(File.dirname(__FILE__))
|
3
|
+
require 'rspec'
|
4
|
+
require 'pry-de'
|
5
|
+
|
6
|
+
# Requires supporting files with custom matchers and macros, etc,
|
7
|
+
# in ./support/ and its subdirectories.
|
8
|
+
Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each {|f| require f}
|
9
|
+
|
10
|
+
RSpec.configure do |config|
|
11
|
+
end
|
data/vim/pry-de.vim
ADDED
@@ -0,0 +1,63 @@
|
|
1
|
+
" Tslime.vim. Send portion of buffer to tmux instance
|
2
|
+
" Maintainer: C.Coutinho <kikijump [at] gmail [dot] com>
|
3
|
+
" Licence: DWTFYWTPL
|
4
|
+
|
5
|
+
if exists("g:tslime_loaded")
|
6
|
+
finish
|
7
|
+
endif
|
8
|
+
|
9
|
+
let g:tslime_loaded = 1
|
10
|
+
|
11
|
+
" Main function.
|
12
|
+
" Use it in your script if you want to send text to a tmux session.
|
13
|
+
function! Send_to_Tmux(text)
|
14
|
+
if !exists("b:tmux_sessionname") || !exists("b:tmux_windowname") || !exists("b:tmux_panenumber")
|
15
|
+
if exists("g:tmux_sessionname") && exists("g:tmux_windowname") && exist("g:tmux_panenumber")
|
16
|
+
let b:tmux_sessionname = g:tmux_sessionname
|
17
|
+
let b:tmux_windowname = g:tmux_windowname
|
18
|
+
let b:tmux_panenumber = g:tmux_panenumber
|
19
|
+
else
|
20
|
+
call <SID>Tmux_Vars()
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
24
|
+
let target = b:tmux_sessionname . ":" . b:tmux_windowname . "." . b:tmux_panenumber
|
25
|
+
|
26
|
+
call system("tmux set-buffer '" . substitute(a:text, "'", "'\\\\''", 'g') . "'" )
|
27
|
+
call system("tmux paste-buffer -t " . target)
|
28
|
+
endfunction
|
29
|
+
|
30
|
+
" Session completion
|
31
|
+
function! Tmux_Session_Names(A,L,P)
|
32
|
+
return system("tmux list-sessions | sed -e 's/:.*$//'")
|
33
|
+
endfunction
|
34
|
+
|
35
|
+
" Window completion
|
36
|
+
function! Tmux_Window_Names(A,L,P)
|
37
|
+
return system("tmux list-windows -t" . b:tmux_sessionname . ' | grep -e "^\w:" | sed -e "s/ \[[0-9x]*\]$//"')
|
38
|
+
endfunction
|
39
|
+
|
40
|
+
" Pane completion
|
41
|
+
function! Tmux_Pane_Numbers(A,L,P)
|
42
|
+
return system("tmux list-panes -t " . b:tmux_sessionname . ":" . b:tmux_windowname . " | sed -e 's/:.*$//'")
|
43
|
+
endfunction
|
44
|
+
|
45
|
+
" set tslime.vim variables
|
46
|
+
function! s:Tmux_Vars()
|
47
|
+
let b:tmux_sessionname = input("session name: ", "", "custom,Tmux_Session_Names")
|
48
|
+
let b:tmux_windowname = substitute(input("window name: ", "", "custom,Tmux_Window_Names"), ":.*$" , '', 'g')
|
49
|
+
let b:tmux_panenumber = input("pane number: ", "", "custom,Tmux_Pane_Numbers")
|
50
|
+
|
51
|
+
if !exists("g:tmux_sessionname") || !exists("g:tmux_windowname") || !exists("g:tmux_panenumber")
|
52
|
+
let g:tmux_sessionname = b:tmux_sessionname
|
53
|
+
let g:tmux_windowname = b:tmux_windowname
|
54
|
+
let g:tmux_panenumber = b:tmux_panenumber
|
55
|
+
end
|
56
|
+
endfunction
|
57
|
+
|
58
|
+
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
59
|
+
|
60
|
+
vmap <C-c><C-c> "ry :call Send_to_Tmux(@r)<CR>
|
61
|
+
nmap <C-c><C-c> vip<C-c><C-c>
|
62
|
+
|
63
|
+
nmap <C-c>v :call <SID>Tmux_Vars()<CR>
|
metadata
ADDED
@@ -0,0 +1,194 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: pry-de
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.0
|
5
|
+
prerelease:
|
6
|
+
platform: ruby
|
7
|
+
authors:
|
8
|
+
- ☈king
|
9
|
+
- Banisterfiend
|
10
|
+
autorequire:
|
11
|
+
bindir: bin
|
12
|
+
cert_chain: []
|
13
|
+
date: 2012-09-20 00:00:00.000000000 Z
|
14
|
+
dependencies:
|
15
|
+
- !ruby/object:Gem::Dependency
|
16
|
+
name: pry
|
17
|
+
requirement: !ruby/object:Gem::Requirement
|
18
|
+
none: false
|
19
|
+
requirements:
|
20
|
+
- - ! '>='
|
21
|
+
- !ruby/object:Gem::Version
|
22
|
+
version: '0'
|
23
|
+
type: :runtime
|
24
|
+
prerelease: false
|
25
|
+
version_requirements: !ruby/object:Gem::Requirement
|
26
|
+
none: false
|
27
|
+
requirements:
|
28
|
+
- - ! '>='
|
29
|
+
- !ruby/object:Gem::Version
|
30
|
+
version: '0'
|
31
|
+
- !ruby/object:Gem::Dependency
|
32
|
+
name: guard
|
33
|
+
requirement: !ruby/object:Gem::Requirement
|
34
|
+
none: false
|
35
|
+
requirements:
|
36
|
+
- - ! '>='
|
37
|
+
- !ruby/object:Gem::Version
|
38
|
+
version: '0'
|
39
|
+
type: :runtime
|
40
|
+
prerelease: false
|
41
|
+
version_requirements: !ruby/object:Gem::Requirement
|
42
|
+
none: false
|
43
|
+
requirements:
|
44
|
+
- - ! '>='
|
45
|
+
- !ruby/object:Gem::Version
|
46
|
+
version: '0'
|
47
|
+
- !ruby/object:Gem::Dependency
|
48
|
+
name: pry-full
|
49
|
+
requirement: !ruby/object:Gem::Requirement
|
50
|
+
none: false
|
51
|
+
requirements:
|
52
|
+
- - ! '>='
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
55
|
+
type: :runtime
|
56
|
+
prerelease: false
|
57
|
+
version_requirements: !ruby/object:Gem::Requirement
|
58
|
+
none: false
|
59
|
+
requirements:
|
60
|
+
- - ! '>='
|
61
|
+
- !ruby/object:Gem::Version
|
62
|
+
version: '0'
|
63
|
+
- !ruby/object:Gem::Dependency
|
64
|
+
name: rspec
|
65
|
+
requirement: !ruby/object:Gem::Requirement
|
66
|
+
none: false
|
67
|
+
requirements:
|
68
|
+
- - ! '>='
|
69
|
+
- !ruby/object:Gem::Version
|
70
|
+
version: '0'
|
71
|
+
type: :development
|
72
|
+
prerelease: false
|
73
|
+
version_requirements: !ruby/object:Gem::Requirement
|
74
|
+
none: false
|
75
|
+
requirements:
|
76
|
+
- - ! '>='
|
77
|
+
- !ruby/object:Gem::Version
|
78
|
+
version: '0'
|
79
|
+
- !ruby/object:Gem::Dependency
|
80
|
+
name: yard
|
81
|
+
requirement: !ruby/object:Gem::Requirement
|
82
|
+
none: false
|
83
|
+
requirements:
|
84
|
+
- - ! '>='
|
85
|
+
- !ruby/object:Gem::Version
|
86
|
+
version: '0'
|
87
|
+
type: :development
|
88
|
+
prerelease: false
|
89
|
+
version_requirements: !ruby/object:Gem::Requirement
|
90
|
+
none: false
|
91
|
+
requirements:
|
92
|
+
- - ! '>='
|
93
|
+
- !ruby/object:Gem::Version
|
94
|
+
version: '0'
|
95
|
+
- !ruby/object:Gem::Dependency
|
96
|
+
name: rdoc
|
97
|
+
requirement: !ruby/object:Gem::Requirement
|
98
|
+
none: false
|
99
|
+
requirements:
|
100
|
+
- - ! '>='
|
101
|
+
- !ruby/object:Gem::Version
|
102
|
+
version: '0'
|
103
|
+
type: :development
|
104
|
+
prerelease: false
|
105
|
+
version_requirements: !ruby/object:Gem::Requirement
|
106
|
+
none: false
|
107
|
+
requirements:
|
108
|
+
- - ! '>='
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '0'
|
111
|
+
- !ruby/object:Gem::Dependency
|
112
|
+
name: bundler
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
114
|
+
none: false
|
115
|
+
requirements:
|
116
|
+
- - ! '>='
|
117
|
+
- !ruby/object:Gem::Version
|
118
|
+
version: '0'
|
119
|
+
type: :development
|
120
|
+
prerelease: false
|
121
|
+
version_requirements: !ruby/object:Gem::Requirement
|
122
|
+
none: false
|
123
|
+
requirements:
|
124
|
+
- - ! '>='
|
125
|
+
- !ruby/object:Gem::Version
|
126
|
+
version: '0'
|
127
|
+
- !ruby/object:Gem::Dependency
|
128
|
+
name: jeweler
|
129
|
+
requirement: !ruby/object:Gem::Requirement
|
130
|
+
none: false
|
131
|
+
requirements:
|
132
|
+
- - ! '>='
|
133
|
+
- !ruby/object:Gem::Version
|
134
|
+
version: '0'
|
135
|
+
type: :development
|
136
|
+
prerelease: false
|
137
|
+
version_requirements: !ruby/object:Gem::Requirement
|
138
|
+
none: false
|
139
|
+
requirements:
|
140
|
+
- - ! '>='
|
141
|
+
- !ruby/object:Gem::Version
|
142
|
+
version: '0'
|
143
|
+
description: ! 'For the concept, see: https://github.com/pry/pry/wiki/pry-de'
|
144
|
+
email: pry-de@sharpsaw.org
|
145
|
+
executables: []
|
146
|
+
extensions: []
|
147
|
+
extra_rdoc_files:
|
148
|
+
- LICENSE.txt
|
149
|
+
- README.rdoc
|
150
|
+
files:
|
151
|
+
- .document
|
152
|
+
- .rspec
|
153
|
+
- Gemfile
|
154
|
+
- Gemfile.lock
|
155
|
+
- LICENSE.txt
|
156
|
+
- README.rdoc
|
157
|
+
- Rakefile
|
158
|
+
- VERSION
|
159
|
+
- lib/pry-de.rb
|
160
|
+
- pry-de.gemspec
|
161
|
+
- spec/pry-de_spec.rb
|
162
|
+
- spec/spec_helper.rb
|
163
|
+
- vim/pry-de.vim
|
164
|
+
homepage: http://github.com/rking/pry-de
|
165
|
+
licenses:
|
166
|
+
- CC0
|
167
|
+
post_install_message:
|
168
|
+
rdoc_options: []
|
169
|
+
require_paths:
|
170
|
+
- lib
|
171
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
172
|
+
none: false
|
173
|
+
requirements:
|
174
|
+
- - ! '>='
|
175
|
+
- !ruby/object:Gem::Version
|
176
|
+
version: '0'
|
177
|
+
segments:
|
178
|
+
- 0
|
179
|
+
hash: 3429421329060892323
|
180
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
181
|
+
none: false
|
182
|
+
requirements:
|
183
|
+
- - ! '>='
|
184
|
+
- !ruby/object:Gem::Version
|
185
|
+
version: '0'
|
186
|
+
requirements: []
|
187
|
+
rubyforge_project:
|
188
|
+
rubygems_version: 1.8.24
|
189
|
+
signing_key:
|
190
|
+
specification_version: 3
|
191
|
+
summary: ! 'Run-time Ruby Development Environment based on Pry. [Maturity: Fœtal.
|
192
|
+
Only use if you''re adventurous]'
|
193
|
+
test_files: []
|
194
|
+
has_rdoc:
|