Search code examples
ideembeddededitorsublimetext3iar

Sublime Text as an external editor for IAR EWB


I've been using IAR EWB for ARM quite a some time now, despite its fiddly IDE features such as code completion and jump to definitions etc. Sometimes they work in IAR editor but most of the times no. GCC+Eclipse is not an option for me as I'm using some pre-compiled library binaries that are only working with IAR. However, I noticed that it is possible to use an external editor with IAR.

For notepad++, the settings are,

In Embedded Workbench open this settings dialog - Tools > Options... > Editor > External Editor

  • Tick 'Use External Editor'
  • Type: Command Line Editor: C:\Program Files (x86)\Notepad++\notepad++.exe
  • Arguments: "$FILE_PATH$"-n$CUR_LINE$ (These arguments will make notepad++ to jump to the particular line of code once when click a message in the IAR debug log)

I want to use Sublime text as the external editor with IAR. However, I was unable to find the arguments that I need to set in IAR to jump Sublime to a particular line of code once when an error message in the IAR debug window is clicked. Also, I do not want to use a new instance of sublime every time I clicked an error message in IAR build log, but reuse the instance that is already open.

Can anyone please point me out the relevant information?


Solution

  • Based on this link, "$FILE_PATH$":$CUR_LINE$ should work for the arguments.

    Whether Sublime starts a new instance is probably an application setting/preference.