Skip to content

Instantly share code, notes, and snippets.

@benoittgt
Last active April 6, 2024 10:28
Show Gist options
  • Save benoittgt/c26c3cccc23ed178e43c126794c73b7a to your computer and use it in GitHub Desktop.
Save benoittgt/c26c3cccc23ed178e43c126794c73b7a to your computer and use it in GitHub Desktop.
iamaputsemojidebugger
function! IAmAPutsEmojiDebugger()
ruby <<EOS
separator = rand(0x1F601..0x1F64F).chr('UTF-8')
VIM::command("normal! oputs '#{separator}' * (`tput cols`.to_i / 2)")
VIM::command('normal! oputs "#{__FILE__}:#{__LINE__}"')
VIM::command("normal! oputs '#{separator}' * (`tput cols`.to_i / 2)")
EOS
endfunction
endfunction
:command! IAmAPutsEmojiDebugger :call IAmAPutsEmojiDebugger()
augroup filetype_ruby
autocmd!
" setlocal iskeyword+=!,?
autocmd Filetype ruby :nnoremap <Leader>F :IAmAPutsEmojiDebugger<CR>
autocmd Filetype ruby :nnoremap <Leader>ww oputs "#" * 90<c-m>puts caller<c-m>puts "#" * 90<esc>
augroup END
abbreviate descrive describe
let ruby_space_errors = 1
@benoittgt
Copy link
Author

Jun-23-2022.10-03-20.mp4

@benoittgt
Copy link
Author

Untitled.mov

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment