Community
    • Login

    Display Zoom Rate on Status Bar

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    zoom
    4 Posts 2 Posters 3.3k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • zeufparisZ
      zeufparis
      last edited by

      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

      Claudia FrankC 1 Reply Last reply Reply Quote 0
      • Claudia FrankC
        Claudia Frank @zeufparis
        last edited by

        @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

        Cheers
        Claudia

        1 Reply Last reply Reply Quote 0
        • zeufparisZ
          zeufparis
          last edited by

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

          Claudia FrankC 1 Reply Last reply Reply Quote 0
          • Claudia FrankC
            Claudia Frank @zeufparis
            last edited by Claudia Frank

            @zeufparis

            Install Python Script plugin from here.
            Once installed, goto

            Plugins->Python Script-New Script

            and create a script called

            startup.py

            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

            Cheers
            Claudia

            1 Reply Last reply Reply Quote 0
            • First post
              Last post
            The Community of users of the Notepad++ text editor.
            Powered by NodeBB | Contributors