【发布时间】:2021-06-18 15:40:25
【问题描述】:
我习惯于在 Ultraedit 中创建宏来将 cmets 组织在某个列中,例如第 90 列。
为此,我创建了一个宏来搜索行尾,如果存在则清除结尾空格,并将空格添加到行尾,直到它到达第 90 列。
我找不到任何关于 Sublime 文本的参考:
如何检查光标位置,
如何检查光标位置上的字符,
如何创建循环。
这个想法是创建一个宏来做类似的事情
go to the end of line
while the column is not the first {
return one character
if the character under cursor is space or tab {
delete the character
}
else {
break
}
}
if column is before or on column 90 {
while the column is before 90 {
insert space
}
insert "//"
}
【问题讨论】:
标签: loops conditional-statements sublimetext3