Skip to content

Instantly share code, notes, and snippets.

@choplin
Created August 22, 2012 07:39
Show Gist options
  • Save choplin/3423467 to your computer and use it in GitHub Desktop.
Save choplin/3423467 to your computer and use it in GitHub Desktop.
nnoremap <buffer> <SID>[ghcmod] <Nop>
nmap <buffer> <Leader>h <SID>[ghcmod]
nnoremap <buffer> <silent> <SID>[ghcmod]y :<C-u>call <SID>paste_type_signature()<CR>
function! s:paste_type_signature()
try
let signature = expand('<cword>').' :: '.ghcmod#type()[1]
catch
return
endtry
call ghcmod#type_clear()
silent .-1 put =signature
endfunction
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment