The Computer Oracle

How can I view old status messages in Vim?

--------------------------------------------------
Rise to the top 3% as a developer or hire one of them at Toptal: https://topt.al/25cXVn
--------------------------------------------------

Music by Eric Matyas
https://www.soundimage.org
Track title: Future Grid Looping

--

Chapters
00:00 How Can I View Old Status Messages In Vim?
00:51 Accepted Answer Score 3
01:43 Answer 2 Score 0
01:53 Answer 3 Score 26
02:07 Thank you

--

Full question
https://superuser.com/questions/340945/h...

--

Content licensed under CC BY-SA
https://meta.stackexchange.com/help/lice...

--

Tags
#vim

#avk47



ANSWER 1

Score 26


I was looking for any answer for your question due to a different plugin. I stumbled upon the name of the message output in :h message.

If your vim window is still open, it looks like you can hit g< to see the last message.

I think :messages works too.




ACCEPTED ANSWER

Score 3


In :help Gist, there is a setting that automatically copies the gist link to your clipboard with :Gist -c

If you set g:gist_clip_command, gist.vim will copy the gist code with option '-c'.

Mac:

let g:gist_clip_command = 'pbcopy'

Linux:

let g:gist_clip_command = 'xclip -selection clipboard'

Others (cygwin?):

let g:gist_clip_command = 'putclip'

Add this to your ~/.vimrc and you're good to go.

Edit:

Found a hackish solution.

Go to gist.vim and find this function.

function! s:GistPost(user, token, content, private)

  " find GistID: in content, then we should just update

  ...  

  let location = substitute(location, '^[^:]\+: ', '', '')
  if len(location) > 0 && location =~ '^\(http\|https\):\/\/gist\.github\.com\/'
    redraw
    echo 'Done: '.location
  else

  ...

  return location
endfunction

Change echo to echomsg.

  if len(location) > 0 && location =~ '^\(http\|https\):\/\/gist\.github\.com\/'
    redraw
    echomsg 'Done: '.location

Now restart vim, and after entering :Gist, type :message to get the link from the message-history. The message-history logs everything from echomsg and echoerr for that session.




ANSWER 3

Score 0


Sent a fix to the plugin author about this. https://github.com/mattn/gist-vim/pull/49