'Intended to be called from a TextCommand to insert a specified
insert_char, close the nearest bracket, and remove any regions
specified
:param view:
the current view
:param edit:
the current edit
:param insert_char:
the character to insert and possibly automatch
:param remove_regions:
any regions to be removed from the current view'

def complete_brackets(self, view, edit, insert_char='', remove_regions=[]):

    self.insert_at_end(view, edit, insert_char)
    self.complete_auto_match(view, edit, insert_char)
    self.remove_regions(view, edit, remove_regions)
    self.clear_bracket_cache()
