Community
    • Login

    Display Zoom Rate on Status Bar

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    zoom
    4 Posts 2 Posters 3.6k Views 2 Watching
    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 Offline
      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 Offline
        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 Offline
          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 Offline
            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

            Hello! It looks like you're interested in this conversation, but you don't have an account yet.

            Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

            With your input, this post could be even better 💗

            Register Login
            • First post
              Last post
            The Community of users of the Notepad++ text editor.
            Powered by NodeBB | Contributors