Community
    • Login

    Shortcuts for HTML

    Scheduled Pinned Locked Moved General Discussion
    6 Posts 4 Posters 10.5k 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.
    • Chris PoppC Offline
      Chris Popp
      last edited by

      For the longest time, I used Homesite… which hasn’t been updated since 2005.

      One of the features I liked was that I could use keyboard shortcuts for quick editing of text. Ex: I highlight a paragraph and using CTRL+P, the <p> </p> tags would encapsulate the highlighted text. If I wanted only a few words in bold, I’d highlight those words, use CTRL+B and <strong></strong> or <b></b> would encapsulate the highlighted text (you could determine which to use in Homesite’s settings).

      I know how to code. That’s not the issue.

      What I want to do is just have a quick way to format text.

      From my searches online, there used to be a plugin called WebEdit that could help with this… but it’s old and the latest version of Notepad++ didn’t like the plugin.

      Is there a way in 2017 to do what I need?

      Thanks

      Scott SumnerS 1 Reply Last reply Reply Quote 0
      • Scott SumnerS Offline
        Scott Sumner @Chris Popp
        last edited by

        @Chris-Popp

        Well, you could code such things within Notepad++ easily using one of the scripting languages (Pythonscript, Luascript). But if you are a tired coder that is just looking for a turnkey solution, I don’t know of one but maybe someone else does…

        1 Reply Last reply Reply Quote 0
        • Scott SumnerS Offline
          Scott Sumner
          last edited by Scott Sumner

          For example with Pythonscript, a bit of code for paragraph encapsulation could be as simple as:

          editor.replaceSel('<p>' + editor.getSelText() + '</p>')
          

          Bind script execution to a keycombo and you are up and running.

          1 Reply Last reply Reply Quote 0
          • cipher-1024C Offline
            cipher-1024
            last edited by cipher-1024

            Scott’s Pythonscript suggestion is spot-on for what you asked for, but if you’re open to alternatives, take a look at “Zen Coding”. There’s a generic option to ‘wrap with abbreviation’ that will pop up a box and allow you to enter the tag you want to wrap around the highlighted text. Between that and the ability to ‘expand abbreviations’ (table>tbody>tr*3>td*6 will expand to a table with 3 rows and 6 columns), Zen is worth installing. “HTML Tags” allows you to select the tag and/or contents of the tag you’re sitting in, that’s been handy for me too.

            So if you’re looking for more than just tag wrapping, check out those two plugins, they have a lot of other options that you may find useful.

            1 Reply Last reply Reply Quote 1
            • Chris PoppC Offline
              Chris Popp
              last edited by

              I went looking for ZenCoding… I found a version that was from 2010, another that was from Google, a site with a link to a video that went to some celebrity site.

              What version should I look for? Is there an official repository that I should be going to?

              1 Reply Last reply Reply Quote 0
              • chcgC Offline
                chcg
                last edited by

                Emmet (ex-Zen Coding) is a web-developer’s toolkit that can greatly improve your HTML & CSS workflow, see
                https://github.com/emmetio/npp#readme
                , but this plugin is not available for the x64 version of N++.

                1 Reply Last reply Reply Quote 0

                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