abo-abo / auto-yasnippet

quickly create disposable yasnippets
246 stars 15 forks source link

Fix creating snippet on region #9

Closed YorkZ closed 9 years ago

YorkZ commented 9 years ago

Hi Oleh,

First of all, thank you very much for this cool package!

This pull request includes two commits, the first commit is white space changes only which improves indentation to shorten the super long lines. The second commit fixes creating snippet on region.

Thanks, York

abo-abo commented 9 years ago

The second commit fixes creating snippet on region.

It works fine for me without the change. Can you specify a scenario where it didn't work before?

YorkZ commented 9 years ago

Have you tried the java example in README.md, or in the commentary section of auto-yasnippet.el?

class Light~On implements Runnable {
  public Light~On() {}
  public void run() {
    System.out.println("Turning ~on lights");
    light = ~true;
  }
}

In this example if you select this multi-line block of code and run aya-create, it won't find the region because the region would have been deactivated by aya-create-symbol (which is called by aya-create).

York

abo-abo commented 9 years ago

In this example if you select this multi-line block of code and run aya-create, it won't find the region because the region would have been deactivated by aya-create-symbol (which is called by aya-create).

You're right. Thanks.