Display Zoom Rate on Status Bar

  • Hi Everyone,

    Is someone know how to display Zoom rate on the status bar ?
    As I am often working with 2 files side-by-side, I change zoom using CTRL+wheel mouse but I never know the zoom %.
    Thank you

  • @zeufparis

    afaik, there is no buitlin feature but you could use python script plugin and a
    script like Scotts one to achieve what you want


  • Thank you for the reply but… I am not good enough to do it :(

  • @zeufparis

    Install Python Script plugin from here.
    Once installed, goto

    Plugins->Python Script-New Script

    and create a script called


    and copy the following content into the newly created document.

    import locale
    locale.setlocale(locale.LC_ALL, '')
    def StatusbarSelOverride(args):
        _length = "{0:n}".format(editor.getTextLength())
        _lines = "{0:n}".format(editor.getLineCount())
        _zoom = editor.getZoom()
        notepad.setStatusBar(STATUSBARSECTION.DOCSIZE, 'length:{}  lines:{}  zoom:{}'.format(_length, _lines, _zoom))
    editor.callback(StatusbarSelOverride, [SCINTILLANOTIFICATION.UPDATEUI, SCINTILLANOTIFICATION.ZOOM])  # register callback

    Save it. (DO NOT reformat code - python is strict about indention)
    Goto Plugins->Python Script->Configuration and
    change Initialisation from Lazy to ATSTARTUP
    press ok
    Restart npp


Log in to reply