'Gets the prefix for the command assuming it takes a form like:
\cite_prefix
ef_prefix
These are also supported:
\cite_prefix{
ef_prefix{
The prefix is defined by everything *after* the underscore
:param view:
the current view
:param location:
either a point or a sublime.Region that defines the caret position
or current selection'

def get_fancy_prefix(self, view, location):

    if isinstance(location, sublime.Region):
        start = location.begin()
    else:
        start = location
    start_line = view.line(start)
    line_prefix = view.substr(getRegion(start_line.begin(), start))[::(-1)]
    m = self.FANCY_PREFIX_RX.match(line_prefix)
    if (not m):
        return getRegion(start, start)
    return getRegion((start - len(m.group(0))), (start - m.start()))
