Skip to content

Instantly share code, notes, and snippets.

@syui
Created November 10, 2013 14:28
Show Gist options
  • Save syui/7398926 to your computer and use it in GitHub Desktop.
Save syui/7398926 to your computer and use it in GitHub Desktop.
function! s:update_cbuffer_growl()
ruby << EOC
line = VIM::Buffer.current.line
system("growlnotify -a MacVim -m '#{line}'")
EOC
endfunction
function! s:update_cbuffer()
augroup update-cbuffer
autocmd!
autocmd TextChanged * call <SID>update_cbuffer_growl()
augroup END
endfunction
command! -bar UpdateCbuffer call <SID>update_cbuffer()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment