~dricottone/vim-markdown-preview

ecf29f3fdabced25fed2b5fc3540158497762849 — Jamshed Vesuna 10 years ago e6729c0
Fixed background bug via longer delay and background process. Closes #2
1 files changed, 3 insertions(+), 3 deletions(-)

M plugin/vim-markdown-preview.vim
M plugin/vim-markdown-preview.vim => plugin/vim-markdown-preview.vim +3 -3
@@ 7,9 7,9 @@ function! Vim_Markdown_Preview()
  let curr_file = expand('%:t')
  call system('markdown ' . curr_file . ' > /tmp/vim-markdown-preview.html')
  let chrome_wid = system("xdotool search --name 'vim-markdown-preview.html - Google Chrome'")
  sleep 300m
  if !chrome_wid
    call system('see -g /tmp/vim-markdown-preview.html')
    sleep 300m
    call system('see /tmp/vim-markdown-preview.html & > /dev/null &')
  else
    let curr_wid = system('xdotool getwindowfocus')
    call system('xdotool windowmap ' . chrome_wid)


@@ 17,7 17,7 @@ function! Vim_Markdown_Preview()
    call system("xdotool key 'ctrl+r'")
    call system('xdotool windowactivate ' . curr_wid)
  endif
  sleep 31m
  sleep 700m
  call system('rm /tmp/vim-markdown-preview.html')
endfunction