Bug 414335 - Editor autocompletion of brackets and quotations
Summary: Editor autocompletion of brackets and quotations
Status: RESOLVED FIXED
Alias: None
Product: Orion (Archived)
Classification: ECD
Component: Editor (show other bugs)
Version: 4.0   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: 4.0 M1   Edit
Assignee: Gabriel Luong CLA
QA Contact:
URL:
Whiteboard:
Keywords: noteworthy
Depends on:
Blocks: 414618
  Show dependency tree
 
Reported: 2013-08-02 14:40 EDT by Gabriel Luong CLA
Modified: 2013-09-21 12:50 EDT (History)
1 user (show)

See Also:
Silenio_Quarti: review+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Gabriel Luong CLA 2013-08-02 14:40:17 EDT
Add autocompletion of parens/brackets ( {}, (), <> ) to the editor actions.
Comment 2 Gabriel Luong CLA 2013-08-08 11:44:06 EDT
So, this editor feature works when you type any opening brackets ('{', '(', '<', '[') or single / double quotations, and the bracket / quotation will automatically be closed with the cursor remaining in between.

When text is selected, the brackets / quotations will be appended around the text and the text selection will remain.
Comment 3 Gabriel Luong CLA 2013-08-10 04:12:21 EDT
https://github.com/gabrielluong/orion.client/commit/8ae96b5cb7ff57fb105d64372cfa264aa9c0f786

Added handling of backspace and entering of closing brackets and additional quotation marks.
Comment 4 Gabriel Luong CLA 2013-08-12 10:59:40 EDT
https://github.com/gabrielluong/orion.client/commit/ef9abdfd895a0a171f7033a725cac88585e829b2

Undo removal _lastEditListener (that was an accidental mistake)
Comment 5 Gabriel Luong CLA 2013-08-13 10:11:28 EDT
^ Dismiss the latest patch. There is some additional edge cases I still need to work out.
Comment 6 Gabriel Luong CLA 2013-08-14 02:09:01 EDT
https://github.com/gabrielluong/orion.client/commit/3825f3bc5ae646c8e3a418cca20f8c963736c350

This should be the final patch. The autocompletion of brackets and quotations should behave similarly to sublime.

Adding Simon and Ken to see if they have any feedback.