Skip to content

New action for handling closing character of a pair (of brackets, quotes, parentheses) #158

@GoogleCodeExporter

Description

@GoogleCodeExporter
Here's the code for an action which makes handling of parentheses, quotes etc. 
more comfortable:

Right now, if you type some code in JSyntaxPane, PairAction will neatly add the 
closing character of a pair when you type the opening character.
However, there's no special handling yet for typing the closing character - 
e.g. when you're typing code it often happens to me that I enter the closing 
parenthesis because I forgot that it had been added automatically, so I end up 
with two closing parentheses...

The new action takes care of that: when the action determines that the 
character you typed is the closing character of such a pair, and the character 
at the caret position is that same character, it simply skip over that 
character. 

I attached the code for the new action and a patch for the 
(JavaSyntaxKit-)config.properties I used to test it.

Cheers,
  Martin

Original issue reported on code.google.com by [email protected] on 8 Jul 2010 at 10:03

Attachments:

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions