• Login
Community
  • Login

Feature Request: current Zoom to Status Bar

Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
5 Posts 4 Posters 1.4k 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.
  • J
    JVPage
    last edited by Mar 17, 2019, 12:41 PM

    I don’t see any way to know what the current zoom setting is without experimenting.
    Could it possibly be added to the Status Bar?
    Thanks

    M 1 Reply Last reply Mar 17, 2019, 1:27 PM Reply Quote 1
    • M
      Meta Chuh moderator @JVPage
      last edited by Meta Chuh Mar 17, 2019, 11:44 PM Mar 17, 2019, 1:27 PM

      welcome to the notepad++ community, @JVPage

      displaying the zoom level at the status bar is a good idea and has been requested at the project’s feature and issue request tracker.
      see >>> here <<< for the newest request for this topic.

      note: a workaround discussion for displaying the zoom level using the pythonscript plugin has been started here:
      Seeing the zoom level with PythonScript , and solved by @SalviaSage, as stated by @Scott-Sumner a while ago, but i currently don’t know if it has been managed to display it everywhere at the status bar, together with the original section values, and not just sharing the “eol” or other sections.

      1 Reply Last reply Reply Quote 0
      • S
        SalviaSage
        last edited by Mar 17, 2019, 11:31 PM

        Yeah, this is a feature that they have yet to implement.

        I solved it by using this script placed inside the Pythonscript plugin startup script.

        So, just install the Pythonscript plugin, open its startup script and paste this into it, save and restart.

        If it works, please let me know here. See you.

        ## Adds the zoom indicator to the statusbar.
        import locale
        locale.setlocale(locale.LC_ALL, '')
        
        def StatusbarEOLOverride(args):
            _eolMode = editor.getEOLMode()
            _zoom = editor.getZoom()
            _eolString = ""
            _zoomString = ""
            if _eolMode == 0:
                _eolString = "CR+LF"
            elif _eolMode == 1:
                _eolString = "CR"
            elif _eolMode == 2:
                _eolString = "LF"
            if _zoom == 0:
                _zoomString = "0"
            else:
                _zoomString = '{:+}'.format(_zoom)
            notepad.setStatusBar(STATUSBARSECTION.EOFFORMAT, '{} | Zoom: {}'.format(_eolString, _zoomString))
        
        editor.callback(StatusbarEOLOverride, [SCINTILLANOTIFICATION.UPDATEUI, SCINTILLANOTIFICATION.ZOOM]) # register callback
        
        1 Reply Last reply Reply Quote 1
        • M
          Meta Chuh moderator
          last edited by Mar 17, 2019, 11:43 PM

          and if you are stuck on how to install the pythonscript plugin on notepad++ 7.6.3 or above, please have a look at this guide:

          Guide: How to install the PythonScript plugin on Notepad++ 7.6.3, 7.6.4 and above .

          don’t hesitate to ask, if you need help installing PythonScript on any other notepad++ version.

          1 Reply Last reply Reply Quote 0
          • A
            Alan Kilborn
            last edited by Mar 18, 2019, 1:01 AM

            Maybe this is of some interest: https://github.com/notepad-plus-plus/notepad-plus-plus/pull/5434

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