Fixing annoyances help


#1

Hi all,

I am a recent user of Atom, after using CodeLite for many years. In comparison, Atom is modern, sleek, and more adaptable, however, I’m having a few problems fixing some problems/annoyances that were easily achieved in CodeLite. Specifically:

  1. For PHP I always prefer my brackets on new lines, instead of nested. Everytime Atom populates code for me, such as my if{} and try{} statements, the brackets are always nested. Does anyone know how to change this?

  2. In CodeLite, I could create a function and annotate it with comments to tag it with @params and @return values. When I went to call this function, these comments would appear so that anywhere in the app I could see what values the functions expect. This also applied to hard coded PHP functions and was an incredibly useful feature. Atom seems not to support this level of detail, but does anyone know of any packages that address this?

  3. A minor feature, but in CodeLite I could tag code with //Note: anywhere in the code, and it would all go into a convenient “to do list”… Anything like this for Atom?

Thanks for your help :smiley:


#2

What do you mean by Atom populating code for you? Are you activating a snippet? Using the autocomplete function?

A minor feature, but in CodeLite I could tag code with //Note: anywhere in the code, and it would all go into a convenient “to do list”… Anything like this for Atom?

There’s a package todo-show that opens a pane with a table of notes from throughout the document.


#3

I think it must be the autocomplete function. If I start to write an if{} statement and press tab, then the full function template populates.

On this, I find that I get asked to autocomplete for everything, even when I’m typing notes /* … */ and its incredibly difficult to type when you get an autocomplete prompt right before a line break. Any way to disable autocomplete when typing notes?

Thanks for tip about the todo list, that’s great!


#4

This should not happen. You can get to the autocomplete-plus settings by going to Settings -> Packages, clicking on the grey box with the package details (it’s under Core Packages), and scrolling down to a field entitled Scope Blacklist. The default entry in there is .comment, and all languages with /* */ as comment tags should use the .comment selector. Is there anything in that field? If not, try adding .comment and seeing what happens. If so, then I’ll need to see the document that you’re editing to know what’s going on.


#5

This is great! There was no .comments in the field, but adding this solves the issue. I also changed accepting the autocomplete to tab only, so returning lines isn’t affected.

THanks!


#6

No problem. :slight_smile:


#7

Just chiming in here: by default, there are no scopes blacklisted. See https://github.com/atom/autocomplete-plus/issues/377 for a discussion on it.


#8

Damn. I didn’t think I had changed anything there.