def format_variable(variables, name, screen_width):
    """ Format regular variables """
    max_width = int(screen_width / 5)
    if "@<class '" in variables[name]['type']:
        typ = '[inst. ' + variables[name]['type'].split("'")[1] + ']'
    elif "<class '" in variables[name]['type']:
        typ = '[' + variables[name]['type'].split("'")[1] + ']'
    else:
        typ = '[' + variables[name]['type'] + ']'
    if 'module' in variables[name]['value']:
        val = variables[name]['value'].split("'")[1]
    elif 'elem' in variables[name]['value']:
        val1 = variables[name]['value'].split(':')[0]
        val2 = variables[name]['value'].split('`')[1]
        val = val1 + ' [' + val2 + ']'
    elif 'classmethod' in variables[name]['value']:
        val = 'classmethod'
    elif 'staticmethod' in variables[name]['value']:
        val = 'staticmethod'
    elif ' at' in variables[name]['value']:
        val = variables[name]['value'].split(' at ')[0] + '>'
    elif 'frozenset' in variables[name]['value']:
        val = variables[name]['value'].split('(')[1].split(')')[0]
    elif '<...>' in variables[name]['value']:
        val = variables[name]['value'].split('<')[0] + '...'
    else:
        val = variables[name]['value']
    if len(val) > 3 * max_width:
        val = val[0:3 * max_width - 4] + '... '
    if len(name) > max_width:
        name = name[0:max_width - 4] + '... '
    if len(typ) > max_width:
        typ = typ[0:max_width - 4] + '... '
    s1 = '{:{wname}} {:{wval}}'.format(name, val, wname=max_width, wval=3 *
        max_width)
    s2 = '{:{wtype}}'.format(typ, wtype=screen_width - len(s1))
    return s1, s2
