Last active
April 6, 2024 10:28
-
-
Save benoittgt/c26c3cccc23ed178e43c126794c73b7a to your computer and use it in GitHub Desktop.
iamaputsemojidebugger
This file contains 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
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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Jun-23-2022.10-03-20.mp4