acarril / StataLinux

Sublime Text 3 plugin that adds support for Stata (all versions) in Linux.
MIT License
7 stars 2 forks source link

Option to prioritize Stata instance running in same workspace as ST3 #2

Open acarril opened 4 years ago

avila commented 4 years ago
winid_stata=$(xdotool search --name --limit 99 "Stata/(IC|SE|MP)? 1[0-9]\.[0-9]" | tail -1)

this solves the issue... it will prioritize the same workspace and then the last focused window... One way to be sure that you always send the code to the correct window would be using the always on top option. (and keeping in the the same workspace...). That way the code always get sent to this window. (of course, if it is the only stata window "always on top". )

--limit 99 might be an overkill but you never know what people are doing at their computer. in any case is fast enough. For my version of stata (16), it only matches stata's main window but I am not sure if this is also the case for other versions. That's why 99 might not be an overkill after all..

image