Atom Package


Hello, I am new to atom and am trying to create a package that when toggled, finds all the lines beginning with “if” and puts an icon next to them. can anyone give me advice on how to go about this?


I haven’t done this myself, but you’re going to want to create a Gutter when your package activates, add a marker to each if instance, and use the decorateMarker() method to add your icon. Put this all inside an onDidStopChanging() callback.

Here’s where atom-ide-ui creates its gutter items. At the moment, I can’t think of a simpler package that does it.


Any specific reason why?

The search-and-replace function can use regular expressions such as ^\s*if. Then after finding all occurrences, pressing Alt+Enter places a cursor at each location. Thereafter Ctrl+Alt+F2 to place bookmarks. **

** … for a Windows PC