added link to VSCode plugin#5
Conversation
|
Thank you for taking the time to create a plugin. I appreciate the help here. I was just about to embark on creating a Visual Code plugin. I noticed there are a few things you need to add to allow gtm to track accurately. For events, you will need to subscribe to more than the When recording events, to reduce the frequency of updates you can define your logic to allow updates only if the file name has changed from the last recorded file name or it's been more than 30 seconds. Here's some examples of how to do that. I also think it would be great to add the work in process (uncommitted) time to the status bar. If you want I can help you with this and testing. Just let me know. Once we get this updated, we can definitely add your plugin to the README. Thanks again for your help. |
|
HI Michael, I have created a new PR( nexus-uw/vscode-gtm#1) that adds the additional editor events you mentioned as well as the reduced frequency of updates to gtm. Could you take a look and tell me what you think? I'll get around to the status bar text latter this week (hopefully). I'm guessing it is just displaying the result of All the best, PS. the atom plugin appears to implement a different update frequency logic than the sublime + vim plugins. but I could be wrong since I am not well versed in coffee-script. |
|
Hey Simon, Yes, you can get the data you need from that command. As of gtm-1.0-beta.6 (I think), the Can you explain what you found different in the atom plugin? It's very possible it's different, as it had a different author than the other two, but the overall logic should be the same. |
|
Hi Brandon, that flag works great. I created another PR that will check that gtm is at least beta 6, nexus-uw/vscode-gtm#3 (nexus-uw/vscode-gtm@2126320, more specifically) . feel free to take a look The atom plugin has up to 2 calls to log-event per each subscribed editor event:
|
|
Oh yeah, that's a good point, I do that... I'm not sure if it's necessary, honestly. My thought was that I wanted to log one last event on the last file before switching to the new file. @mschenk42, can you clarify if that logic is correct or if I might be causing invalid timings by doing that? |
|
Simon, I did some testing on your sub-to-more-events branch on my Mac. It's finding gtm and firing based on the new events. Looking good. You need to make a small change in regards to when you update the last file and last update time. Just move it within the if. |
|
@gradymke to answer your question, I wouldn't log the file you moved away from, because it may give more time to the last file than it deserves. So if I'm understanding this correctly below, I'd remove the @logevent(@lastFile) |
|
@mschenk42, I appended your suggestion to the PR, and merged it in. |
Hello,
I just released a gtm plugin for Visual Studio Code. It would great if it was included in the list of editor plugins.
All the best,
Simon R