Community
    • Login

    Apply sentence case while typing in markdown files

    Scheduled Pinned Locked Moved General Discussion
    10 Posts 4 Posters 1.2k 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.
    • shuai-zhouS Offline
      shuai-zhou
      last edited by

      I recently have been using Notepad++ for writing markdown (.md) files. I was wondering if there are plugins/workarounds that can automatically apply sentence case while typing? For example, automatically change the first letter right after a period/question mark/exclamation mark, etc to upper case, also capitalize the single letter “i” automatically?

      PeterJonesP 1 Reply Last reply Reply Quote 0
      • PeterJonesP Offline
        PeterJones @shuai-zhou
        last edited by

        @shuai-zhou ,

        Sorry, I don’t know of any sentence-casing plugins.

        1 Reply Last reply Reply Quote 0
        • caryptC Offline
          carypt
          last edited by

          you maybe want to run a mistake correction after finishing writing . there lately was this thread https://community.notepad-plus-plus.org/topic/20502/help-coding-text-errors where someone wanted some regex-searches/replaces for his needs .

          PeterJonesP caryptC 2 Replies Last reply Reply Quote 0
          • PeterJonesP Offline
            PeterJones @carypt
            last edited by

            @shuai-zhou

            Just so you know, you were right to assume it would require a plugin to be able to do it. As was explained in the thread that @carypt linked, to do full grammar checking – whether live while writing, as you requested, or after-the-fact as was requested in the other conversation – requires a huge amount of programming. @carypt seems to believe that a series of search-and-replace can sufficiently replicate the power of true grammar-checking software, as evidenced by his regex solution there and suggestion that you try something similar here. I strongly but respectfully disagree. I am reasonably certain that members in this forum could come up with an exception for a grammatically correct construct which would break any regular-expression “solution” to the problem.

            Unless you have very simple sentence structure, I do not recommend trying to solve this problem with after-the-fact regex solutions.

            –
            Peter (who wishes he knew of an open-source grammar-checking library, and had the time and skills to write the plugin to interface with it; unfortunately, none of those conditions is true)

            EkopalypseE 1 Reply Last reply Reply Quote 2
            • EkopalypseE Offline
              Ekopalypse @PeterJones
              last edited by

              @PeterJones said in Apply sentence case while typing in markdown files:

              Peter (who wishes he knew of an open-source grammar-checking library, and had the time and skills to write the plugin to interface with it; unfortunately, none of those conditions is true)

              Eko, who wished that this could be easily negated!!! :-D

              PeterJonesP 1 Reply Last reply Reply Quote 1
              • PeterJonesP Offline
                PeterJones @Ekopalypse
                last edited by PeterJones

                @Ekopalypse said in Apply sentence case while typing in markdown files:

                wished that this could be easily negated

                :-)

                I did a quick search for open source grammar checkers. This site has an API, so that’s promising.
                https://languagetool.org/proofreading-api

                edit: oh, the API costs money. Another article I found said that they have open-source Java software that you can download, so I thought the API was referring to that. I was wrong /edit

                I still haven’t solved the other fundamental problems. ;-)

                EkopalypseE 1 Reply Last reply Reply Quote 1
                • caryptC Offline
                  carypt @carypt
                  last edited by

                  @carypt my try for case correction searches for the string .(dot)_(space)1word-character -> search : (\.)(\s)(\w) and replace with : $1$2\U$3 . this does not consider a new line - new sentence scenario . what it does : the arguments in brackets are replaced by backreferences $ . https://www.regular-expressions.info/refreplacecase.html . maybe try the mark-function in search first .
                  maybe not correct , use with care

                  caryptC 1 Reply Last reply Reply Quote 0
                  • caryptC Offline
                    carypt @carypt
                    last edited by

                    @carypt some characters have to be “escaped” by \ because of restrictions/construction of regex-engine

                    1 Reply Last reply Reply Quote 0
                    • EkopalypseE Offline
                      Ekopalypse @PeterJones
                      last edited by Ekopalypse

                      @PeterJones said in Apply sentence case while typing in markdown files:

                      https://languagetool.org/proofreading-api

                      Still very interesting, I didn’t know that even existed.
                      Arouses my curiosity.
                      Thx for sharing.

                      1 Reply Last reply Reply Quote 0
                      • EkopalypseE Offline
                        Ekopalypse
                        last edited by

                        There also seems to be free stuff here.
                        https://languagetoolplus.com/http-api/#/default

                        1 Reply Last reply Reply Quote 1

                        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