Hi again,

Thanks for that.  In the end I realised there was no profound reason
for which I was using TeXShop, so I downloaded Skim.  The script at
http://sourceforge.net/apps/mediawiki/skim-app/index.php?title=TeX_and_PDF_Synchronization
didn't work straight out of the box, but was enlightening enough for
me to cobble together something with enough functionality for my needs
(ie a bare minimum!).  I'll paste it in below in case you're
interested.

Thanks again,
Andrew


#!/bin/bash

file="$1"
line="$2"

#[ "${file:0:1}" == "/" ] || file="${PWD}/$file"

exec osascript \
  -e "set ESC to ASCII character 27" \
  -e "tell application \"/Applications/MacVim.app/Contents/MacOS/MacVim
\" to activate" \
  -e "tell application \"System Events\"" \
  -e "  tell process \"/Applications/MacVim.app/Contents/MacOS/MacVim
\"" \
  -e "    keystroke \":$line\" & return " \
  -e "  end tell" \
  -e "end tell"

#Removed because Skim is passing the full path
  #-e "    keystroke \":set hidden\" & return " \
  #-e "    keystroke \":if bufexists('$file')\" & return " \
  #-e "    keystroke \":exe \\\":buffer \\\" . bufnr('$file')\"  &
return " \
  #-e "    keystroke \":else \" & return " \
  #-e "    keystroke \":    edit ${file// /\\\\ }\" & return " \
  #-e "    keystroke \":endif\" & return " \

  #-e "    keystroke \"zO\" " \

# Testing
  #-e "tell application \"/Applications/Utilities/Terminal.app/
Contents/MacOS/Terminal\" to activate" \
  #-e "tell application \"System Events\"" \
  #-e "  tell process \"/Applications/Utilities/Terminal.app/Contents/
MacOS/Terminal\"" \
  #-e "    keystroke \"echo \\\"$file\\\" \\\"$line\\\"\" & return " \
  #-e "  end tell" \
  #-e "end tell"

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_mac" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Reply via email to