notepad-plus-plus / notepad-plus-plus/notepad-plus-plus

[feature request]: memorize the npp UI display : a "perspectives" mechanism like in the Eclipse IDE

Open
#13,328 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C++
Stars
29.4k
Forks
5.4k
PR merge metrics
No merged PRs in 30d

Description

Hi all !

When performing different tasks, we need different UI layout configurations, ( and specific plugins loaded, not all of them all the time ! ).

Maybe it is not a pain for users having a large screen, but the smallest the laptop is, the more we need to rearrange the display.
And some days, I feel that I spend too much time to do this.

First of all, npp doesn't remember all the UI editor Views sizes on close.
This is very cumbersome : most of the time when working with the two editor views opened, you may have experienced MANY times that you need to reset all your views to the proper functional size,
ex. :

  • a code file (view1) and an ini file (view2) don't have the same functional width.
  • working on xml files and xpath needs the xml plugins ...
  • the XML-TreeView, Xpath and Markdown++ plugins usually need a wide display
  • when other panels used don't need a wide display ...

I watched carefully the Scintilla doc : views and panels display and sizing are not Scintilla features.
But npp knows about those positions ...

The file where resides parameters related to "views" is session.xml, with

...
<Session activeView="1">
        <mainView activeIndex="1">
        <subView activeIndex="35">

nothing about Views positions

The file where resides parameters related to "panels" is config.xml, with

...
<ProjectPanels>
    <ProjectPanel id="0" workSpaceFile="" />
    <ProjectPanel id="1" workSpaceFile="" />
    <ProjectPanel id="2" workSpaceFile="" />
</ProjectPanels>
<GUIConfigs>
<GUIConfig name="ScintillaViewsSplitter">vertical</GUIConfig>
<GUIConfig name="ScintillaPrimaryView" ... />
    **NOTHING ABOUT POSITIONS**
...
<GUIConfig name="AppPosition" x="0" y="0" width="1366" height="768" isMaximized="yes" />
                  **POSITION**
...
<GUIConfig name="FindWindowPosition" left="751" top="17" right="1340" bottom="381" isLessModeOn="no" />
                         **POSITION**

nothing about Panels or Views positions

Both files don't seem to be the proper place for, and it would be nice to be able to open a specific "session" with a specific "configuration", with more than the display layout.
An extra perspectives.xml file could store UI positions and other needs, on saved UI configurations :

  • which plugins to load
  • which file to display, in which view, how (view w,h)
  • which panel to display, where, how (panel w,h)
  • and different tasks would love a specific set of hotkeys ...

Also, I tried to see if the PythonScript plugin gives anything about my concern : nothing either about Panels or Views positions ...

Controlling the Views size is the main issue.
Obviously, these values are not exposed outside of the npp display internal machinery, and will need to be exposed before anyone can hack on them ...

Best !

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing how session.xml and config.xml are read and written, then trace the internal UI machinery that owns view and panel positions. The issue proposes saved perspectives covering layouts, plugins, files, and hotkeys; done would require a defined, implemented configuration mechanism that restores the requested UI state.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
desktop
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.