使用IAR的外置编辑器配置

IAR默认的编辑器看着眼睛痛, 缺少典型配色方案, 逐个改每个元素太繁琐. 索性直接引用配置好的外置编辑器, 例如sublime text或者notepad++.

官方的做法

参见iar官方的例子:

https://www.iar.com/support/tech-notes/ide/problem-getting-external-editor-to-jump-to-specific-code-line/

Introduction

How do I get the external editor to jump to the specific code line of my compilation warning or error?

Solution

Give the correct command line arguments for the external editor you are using.

Example using Notepad++

In IAR Embedded Workbench, open the 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$

Details

For other editors you have to look in the documentation of that editor to see what the specific arguments for your editor should be.

将多个文件在一个窗口中显示

使用外置编辑器后, 外置编辑器不会嵌入到iar的环境中. 每次在项目的文件树中点开文件时, 都是单独激活一个编辑器程序, 每个窗口显示一个文件.

PS: 我目前使用的是sublime text, 后面抽空研究一下如何在sublime界面中增量显示新打开的文件.

感谢一个国外的工程师提供了正确答案, https://stackoverflow.com/questions/30446877/sublime-text-as-an-external-editor-for-iar-ewb, 应该使用正确的参数:

$FILE_PATH$:$CUR_LINE$ 

最终的做法

调试的时候不能在外置编辑器上设置断点. 最后还是切换回iar自带的编辑器, 然后用sublime text额外打开源代码工程及源文件. 回归最原始的做法.

这真tmd是从入门到放弃的过程.

 

  • 4
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值