Community
    • Login

    case insensitive ctags search (TagLEET/OpenCTags/other)?

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    case sensitiveignore casetagleetctagscase insensitiv
    12 Posts 3 Posters 5.7k 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.
    • Jakub NerJ
      Jakub Ner
      last edited by

      Gur,

      First off, thanks again for the awesome plugin. Great work, much appreciated!

      When I have “!_TAG_FILE_SORTED 1” case sensitivity doesn’t work and I see the tags in the form [Aa, Ab, BB, aa] as per your example. However, I am able to individually see “Aa” and “aa” through ALT-SPACE. Just not combined, which is what I’m after.

      When I have !_TAG_FILE_SORTED 2" I do see the tags sorted in the form [aa, Aa, Ab, BB]. However, the ALT-SPACE window is always empty.

      Thanks in advance for your help.

      My complete header section is:

      !_TAG_FILE_FORMAT 2 /extended format; --format=1 will not append ;" to lines/
      !_TAG_FILE_SORTED 2 /0=unsorted, 1=sorted, 2=foldcase/
      !_TAG_PROGRAM_AUTHOR Darren Hiebert /dhiebert@users.sourceforge.net/
      !_TAG_PROGRAM_NAME Exuberant Ctags //
      !_TAG_PROGRAM_URL http://ctags.sourceforge.net /official site/
      !_TAG_PROGRAM_VERSION 5.8 //

      1 Reply Last reply Reply Quote 0
      • pnedevP
        pnedev
        last edited by

        You can try NppGTags plugin, it allows case insensitive search.
        Just make sure to use initially the plugin’s Search window to set the case sensitivity option to your liking.
        You can also find the plugin here.

        BR

        Jakub NerJ 1 Reply Last reply Reply Quote 0
        • gstaviG
          gstavi
          last edited by

          Try this.
          TagLEET_1.3.0.zip

          What you described is expected.
          Coming from C world I didn’t think of case insensitivity as an option.
          TagLEET can only lookup files that are sorted. And current version only considers ‘case sensitive’ sort. So for files with !_TAG_FILE_SORTED 2 it would not find any results.

          New version observes !_TAG_FILE_SORTED flag and replaces case sensitive string comparisons with case insensitive strings comparisons.

          One warning. During testing I realized that there may be a problem with underscore ‘_’.
          Is it sorted after letters or before?
          It seems that ctags sorts it after letters as if all letters are upper case. Cygwin’s sort does the same.
          Windows memicmp seems to sort it before letters as if all letters are lower case. Windows ‘sort’ does the same.
          I forced TagLEET to use the ctags method but if for some reason another version of ctags will behave differently then Lookup may fail. A workaround will be to run tags file via cygwin’s sort.

          Jakub NerJ 1 Reply Last reply Reply Quote 0
          • Jakub NerJ
            Jakub Ner @pnedev
            last edited by

            @pnedev, thank you for the heads up.

            Thanks for authoring/maintaining NppGTags.

            And here I was thinking I have to go back to Vim, yet NPP has such a great community!!

            1 Reply Last reply Reply Quote 0
            • Jakub NerJ
              Jakub Ner @gstavi
              last edited by

              Gur, thanks for your time! Much appreciated.

              I downloaded the new DLL into my **/plugins, restarted NPP, regenerated my CTAGS with sorted and then again foldsorted… I’m still getting the limited hits when CTAGS is sorted and no results when foldsorted. I.e. no change in functionality since previous version.

              Am I doing something wrong? Is it possible the older one was packaged in the new distribution?

              1 Reply Last reply Reply Quote 0
              • gstaviG
                gstavi
                last edited by

                When Selecting Plugins -> TagLEET -> About
                Do you see version 1.3.0.0?

                Jakub NerJ 1 Reply Last reply Reply Quote 0
                • Jakub NerJ
                  Jakub Ner @gstavi
                  last edited by

                  Gur, yes I do. Sorry, should have said so before: I did double check that.

                  1 Reply Last reply Reply Quote 0
                  • gstaviG
                    gstavi
                    last edited by

                    Can you provide some small example? A few source files and foldsorted tags file.

                    1 Reply Last reply Reply Quote 0
                    • gstaviG
                      gstavi
                      last edited by

                      Attempt #2
                      TagLEET_1.3.0.1.zip

                      Some code still used windows ‘XXXicmp’ functions. Sometimes it still worked since sorting is mostly the same.
                      Implemented my own ‘ZZZicmp’ functions to match ctags sorting order.

                      1 Reply Last reply Reply Quote 0
                      • Jakub NerJ
                        Jakub Ner
                        last edited by

                        Gur,

                        Works beautifully.

                        Thank you kindly for all your efforts.

                        Rest assured your work is much appreciated.

                        Notepad++ with TagLEET is perfect for a use case like mine: legacy code base with a custom CTAGS language definition. Now, even for a language that’s case insensitive.

                        There are other wonderful Notepad++ plugins for CTAGS, but they tend to focus on updating and regenerating the tags file. I couldn’t really figure out how to make them work with my TAGS and my .ctags–for the custom language I have to work with. With TagLEET there was literally no effort. Generate the TAGS file in the source code’s current folder or somewhere in an ancestor folder and that’s it.

                        TagLEET is also brilliantly quick. My TAGS file is 140Mb and I saw no problems as of yet.

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