最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

VSCode sync on specific code between two windows - Stack Overflow

programmeradmin0浏览0评论

I use VSCode for editing CNC code for multipath machines. These programs will typically have wait codes (Mxxx for example) in each program that will control the synchronization of both paths on the machine. I cannot find a way or extension to do this in VSCode. Does anyone know if it's possible or how to implement?

I use VSCode for editing CNC code for multipath machines. These programs will typically have wait codes (Mxxx for example) in each program that will control the synchronization of both paths on the machine. I cannot find a way or extension to do this in VSCode. Does anyone know if it's possible or how to implement?

Share Improve this question edited Jan 31 at 20:22 rioV8 28.9k4 gold badges42 silver badges61 bronze badges asked Jan 31 at 19:17 Chris MacalusoChris Macaluso 1,4823 gold badges17 silver badges37 bronze badges 2
  • 1 what do you want VSC to do with these M codes – rioV8 Commented Jan 31 at 20:22
  • Syncronize the spacing and scrolling between two or more Windows. Picture two Windows open side by side, if the window on the left has 3 lines of code then M123, and the window on the right had 5 lines of code then M123, when synced correctly the window on the left would have two empty lines after it's code so the M123's are in line together, then when scrolled those M123's would stay together. The codes themselves would sync as well, for example it would look for M123 in both windows, not M123 on the left and M124 on the right. It allows the code after the sync command to execute together – Chris Macaluso Commented Feb 1 at 21:52
Add a comment  | 

1 Answer 1

Reset to default 0

In the VSC File Explorer:

  • right click the first file and select: Select for Compare
  • right click the second file and select: Compare with Selected

Now you get a Diff window with 2 panes that scroll together and have the Mxxx lines lined up.

Both files are editable.

If you customize the theme colors for the diff, make them transparent, it looks like you have a fancy edit window.

发布评论

评论列表(0)

  1. 暂无评论