Community
    • 登入

    I need side-menus to navigate huge text files.

    已排程 已置頂 已鎖定 已移動 Help wanted · · · – – – · · ·
    13 貼文 5 Posters 7.1k 瀏覽
    正在載入更多貼文
    • 從舊到新
    • 從新到舊
    • 最多點贊
    回覆
    • 在新貼文中回覆
    登入後回覆
    此主題已被刪除。只有擁有主題管理權限的使用者可以查看。
    • ?
      舊使用者
      最後由 編輯

      I have tons of huge text files full of my notes on various subjects. For instance, I have at least one text file for each of my passions, and text files for all the important areas of my life (finances, fitness, food…). They are large and difficult to quickly navigate from one subject to the next using fiddly scrollbars or word-searches. It would be best if my text documents each had their own side-menu as in a web page.

      Can I do something like this in np++?

      1 條回覆 最後回覆 回覆 引用 0
      • chcgC
        chcg
        最後由 編輯

        Maybe you could abuse the buildin functionlist therefore, e.g. with xml as language

        <topic name=“food”/>

        will appear as function entry in the functionlist

        ? 1 條回覆 最後回覆 回覆 引用 0
        • chcgC
          chcg
          最後由 編輯

          See also https://notepad-plus-plus.org/community/topic/13431/how-to-mantain-special-ascii-characters. C could also be used to structure the text.

          1 條回覆 最後回覆 回覆 引用 0
          • ?
            舊使用者 @chcg
            最後由 舊使用者 編輯

            @chcg Thanks. I tried this… I changed the language to xml, opened and reloaded the function list, but nothing showed up except a default item that didn’t point anywhere. I couldn’t get my test functions to show in the list. Not sure what else I need to do. I’m a writer not a coder.

            Basically I’m after a text outliner with tab support for my many huge text files.

            1 條回覆 最後回覆 回覆 引用 0
            • gstaviG
              gstavi
              最後由 編輯

              A possible approach would be to maintain 2 files. The main file and a “table of contents” file.
              You could open the files in 2 panes and then use a tag lookup mechanism to jump from the table of contents to the right ‘chapter’ in the main file.
              You will need to generate the ‘tags’ file by yourself but that should be rather easy.
              Here are some details. If you want to try it let me know and I can elaborate.

              1 條回覆 最後回覆 回覆 引用 0
              • Ethan PiliavinE
                Ethan Piliavin
                最後由 編輯

                Perhaps this function list plugin will work better. I find it much more useful and robust:
                https://sourceforge.net/projects/npp-plugins/files/Function List/

                1 條回覆 最後回覆 回覆 引用 0
                • chcgC
                  chcg
                  最後由 chcg 編輯

                  Soory, copy and paste from the orginal post modifies the xml text regarding the double quotes:

                  <topic name=‘food’/>

                  1 條回覆 最後回覆 回覆 引用 0
                  • chcgC
                    chcg
                    最後由 chcg 編輯

                    此回覆已被刪除!
                    1 條回覆 最後回覆 回覆 引用 0
                    • chcgC
                      chcg
                      最後由 chcg 編輯

                      Soory, copy and paste from the orginal post modifies the xml text regarding the double quotes:

                      <topic name="food"/>

                      Ok, now this one doesn’t modify the text on c&p. Maybe you wan’t to give it another try.

                      ? 1 條回覆 最後回覆 回覆 引用 0
                      • ?
                        舊使用者 @chcg
                        最後由 編輯

                        @chcg I pasted this into a text file…

                        <topic name=‘food’/>

                        I set the language to xml. it highlights all my text white. I open the function list. reload it. the only item that pops up is “new1” which does nothing when i click it.

                        1 條回覆 最後回覆 回覆 引用 0
                        • chcgC
                          chcg
                          最後由 編輯

                          @Chad-Coffman Need to be doublequotes, like in my last posting, just couldn’t delete the previous one because of the 3 minute timeout and it took me some time to find out that markdown syntax is used in node bb to add text without formatting.

                          ? 1 條回覆 最後回覆 回覆 引用 0
                          • ?
                            舊使用者 @chcg
                            最後由 編輯

                            @chcg thanks, got it. still a crude solution. it leaves all the text highlighted in white and says “topic name=” in the list.

                            I spent some time yesterday looking for tabbed outliner software for windows. not as common as you’d think. The ones which I did find were not very developed.

                            1 條回覆 最後回覆 回覆 引用 0
                            • mkupperM
                              mkupper
                              最後由 編輯

                              @Chad-Coffman - I use npp’s search feature to navigate within a huge file. I also take advantage of the fact that a “word” in npp is a consecutive series of letters, digits, and the _ (underscore) symbol. At the top or bottom of a file I’ll have an index or summary and use something like:
                              * Section_01 - Overview of the issue
                              * Section_02 - Some section of the file
                              * Section_03 - Another section of the file

                              At the start of each section I have something like
                              Section_03 - Another section of the file

                              To navigate to section 3 I double click on Section_03 in the index to highlight that word, Ctrl-F to bring up the find box, and then hit Enter. I suspect I could add a npp keyboard shortcut to search for the hightlighted word if there’s not already one. My fingers are happy with Ctrl-F Enter.

                              While I used Section_01, … 03 in the example you can use any string for the section labels. I stick with the [a-z0-9] character set for section labels as it’s easy to select the entire word with either double click or Ctrl-shift left or right arrow.

                              The downside of that approach is there’s no “back” button to jump back to where I used to be in a file.

                              I also take advantage of file://… links to jump from file to file within npp and/or to launch viewers such as Firefox.

                              For example, I’m currently dealing with AT&T about some stuff related to my DSL connection. In my ATT-DSL.txt project file I’ll have something like
                                  03/12/2017 Received postal letter confirming automatic payment
                                      file://c:/Projects/ATT-DSL/2017-03-12-Confirmation-letter-for-automatic-payment.png
                                      file://c:/Projects/ATT-DSL/2017-03-12-Confirmation-letter-for-automatic-payment.txt
                              The main project file has a summary. If I want to see the letter itself I can click on either the .png link which will pull up a scan in a web browser or the .txt link which is the results of running the png through an OCR program.

                              1 條回覆 最後回覆 回覆 引用 0
                              • 第一個貼文
                                最後的貼文
                              The Community of users of the Notepad++ text editor.
                              Powered by NodeBB | Contributors