Tim
13 posts
TODO, NOTE, etc. highlighting for sublime text
I really like Casey's TODO and NOTE highlights. Does anyone know of a way to get the same functionality in Sublime Text? I went through sublime text package control but didn't find anything that seemed right.
Gus Waldo
10 posts
TODO, NOTE, etc. highlighting for sublime text
Hi, I struggled a bit with this as well.
First thing I tried was using sublime linter, it kinda works but IMO looks ugly and is a bit limited if you want to add or modify stuff.

So I ended up modding the language file and theme I was using.
I'm using C Improved(you can find it in package control) as the tmLanguage. You'll have to add this to your tmLanguage file:

[color=#008888]
  1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18  match (?i)\b(TODO)\b name annotation.todo.c match (?i)\b(NOTE)\b name annotation.note.c match (?i)\b(IMPORTANT)\b name annotation.important.c 
[/color]

It matters where you put it.
I put it after this part at around line 1070 in CImproved.tmLanguage.
[color=#008888]
 1 2 3 4 lex-continuation patterns 
[/color]

So with that we've added a scope for the keywords we're looking to highlight. Next we just have to make it so that our theme actually highlight the keywords by adding this to the tmTheme file:

[color=#008888]
  1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39  name TODO scope annotation.todo settings fontStyle bold foreground #C42F0E name NOTE scope annotation.note settings fontStyle bold foreground #008900 name IMPORTANT scope annotation.important settings fontStyle bold foreground #CFC927 
[/color]

final result:

let me know if there's anything else you want to adjust. I've managed to somewhat mirror caseys editor workflow using sublime.
Andre Bauland
12 posts
TODO, NOTE, etc. highlighting for sublime text
Edited by Andre Bauland on
There is also a plugin for that with the SublimeLinter

https://github.com/SublimeLinter/SublimeLinter-annotations

:)
Gus Waldo
10 posts
TODO, NOTE, etc. highlighting for sublime text
thrahistan
There is also a plugin for that with the SublimeLinter

https://github.com/SublimeLinter/SublimeLinter-annotations

:)

it will only allow you to do stuff like change background color, add underlines or a border, not change the color of the text and make it bold. That's what I mean by sublime linter looking ugly. I used annotations before doing it myself and the ugliness of it annoyed me to no end.
Tim
13 posts
TODO, NOTE, etc. highlighting for sublime text
@Skinpop: you are awesome!
Gus Waldo
10 posts
TODO, NOTE, etc. highlighting for sublime text
Glad I could help!
Andre Bauland
12 posts
TODO, NOTE, etc. highlighting for sublime text
Skinpop
thrahistan
There is also a plugin for that with the SublimeLinter

https://github.com/SublimeLinter/SublimeLinter-annotations

:)

it will only allow you to do stuff like change background color, add underlines or a border, not change the color of the text and make it bold. That's what I mean by sublime linter looking ugly. I used annotations before doing it myself and the ugliness of it annoyed me to no end.

yeah, thats true.
I'll gonna use yours now, looks nicer to me :D
1 posts
TODO, NOTE, etc. highlighting for sublime text
I went searching for this feature as well.

My day to day is in Javascript mostly is there tmLanguage file associated with Javascript in Sublime?

Or would I have to find something along the lines of CImproved but for JS to be able to have these tmLanguage files.

Thanks!
Zenn
19 posts
TODO, NOTE, etc. highlighting for sublime text
I try following the instruction above but can not get it to work.... I'm new to this and only on the first week so I'm not sure were I went wrong.

I am using sublime 3 the only difference I made was to use package viewer to make a copy of the colour scheme and save it in the user folder and use that one instead.

If anyone can help that would be good thank you.
Zenn
19 posts
TODO, NOTE, etc. highlighting for sublime text
Edited by Zenn on
Update....

ok so I got NOTE to be green just like in the example but the other 2 stayed the same color as say the int keyword.... So fiddled around to try to get it and I made things worse note is no longer green and is the same colour as the other two, No matter what I do the colour will not change

Can anyone help? I am wondering if i should just reinstall Sublime?
Zenn
19 posts
TODO, NOTE, etc. highlighting for sublime text
Edited by Zenn on
OK... After about 10 hrs of research plus trial and error I got it!!!!!
  1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39  name TODO scope storage.type.class.todo settings fontStyle italic foreground #C42F0E name NOTE scope storage.type.class.note settings fontStyle italic foreground #008900 name IMPORTANT scope storage.type.class.important settings fontStyle italic foreground #CFC927 

This is in combination with the C improved.
You will have to modify whatever theme you are using and paste it in there.
I did a search for storage.type and pasted the code in after the last </dict>.
 1 2 3 4 5  foreground #66D9EF [paste code here] 

Gianluca Alloisio
33 posts
TODO, NOTE, etc. highlighting for sublime text
I used this plugin, I modified a little to include more keywords and to fix a bug. https://bitbucket.org/theGiallo/t...on_sublime_plugins/pull-requests/