Skip to content

Instantly share code, notes, and snippets.

View bcgraham's full-sized avatar

Brian Graham bcgraham

  • Vericred
  • New York, NY
View GitHub Profile
@bcgraham
bcgraham / irbrc
Created August 5, 2022 22:09
Open a source location in vim
class Object
def vim
return unless File.chardev?('.vimpty') && respond_to?(:source_location) && source_location
message = %(\e]51;["call", "IrbApi_OpenBuf", #{source_location.inspect}]\a)
IO.write('.vimpty', message, mode: 'a')
end
end
PryKeybind.register(:FRAMES, "\c_") do |pry_instance|
backt = Byebug.current_context.backtrace
result = Fzf(
delimiter: ":",
preview: 'bat --color=always --style=header, numbers -r ( range {3} $LINES) -H {3} ../{2}',
expect: 'ctrl-v'
) do
backt
.map(&:first)
.map(&:to_s)

Keybase proof

I hereby claim:

  • I am bcgraham on github.
  • I am bcgraham (https://keybase.io/bcgraham) on keybase.
  • I have a public key whose fingerprint is 3BEA 62F5 010C FF57 9F00 7FA9 EDF8 922C 224A EDAE

To claim this, I am signing this object: