When I file drop a .shp file, the cursor jumps to the line below. How can I have the cursor jump to before the <- ?
Also, once I have dropped the file into TextMate, how can I make TextMate the active window (rather than the active window being Finder)?
Attached show the file drop and the code that does the file drop
Ross Ahmed Ecologist — 07875533906 Twitter: @RossAhmed https://twitter.com/RossAhmed LinkedIn: Ross Ahmed https://www.linkedin.com/pub/ross-ahmed/2a/775/590
Hi,
On 03 Aug 2016, at 11:14, Ross Ahmed rossahmed@googlemail.com wrote:
When I file drop a .shp file, the cursor jumps to the line below. How can I have the cursor jump to before the <- ?
actually simple and it follows the TextMate logic. Think of Snippets.
In your case you can try the following:
echo -n "${1:my_shape_var} <- readShapeSpatial("$TM_DROPPED_FILE")"
After dragging "my_shape_var" is highlighted, change the name, and press TAB
Apply this to the other ones as well.
Also, once I have dropped the file into TextMate, how can I make TextMate the active window (rather than the active window being Finder)?
Hmm, one option via AppleScript:
osascript -e "tell application "TextMate" to activate" & echo -n "${1:my_shape_var} <- readShapeSpatial("$TM_DROPPED_FILE")"
Cheers, Hans