How To Use Snippets In Notepad++ Using QuickText Plugin

Snippets can be very useful and if you work with similar code that you use across various projects then if you would very easy to use a snippets in your code editor.I use Notepad++ for my php, css, html coding while testing various wordpress themes, plugins and for making code changes.There’s something that most theme don’t come which is ad placement ready and each user has to hard code the ad code into the themes, and while testing this becomes a repetitive task of inserting the ad code and snippets into theme files.

Notepad++ supports plugins which means the programs features can be extended similar to a web browser addons for added functionality, QuickText is a Notepad++ plugin which helps organize code snippets into various programming languages and insert the snippets into the working file using simple tags.These tags can be user defined and these tags are replaced with the predefined code attached to the tag into the working file.

Steps to install QuickText Notepad++ Plugin :

  1. Download and Extract / Install the application to a folder. ( I choose the 7z file which has the unicode version, downloaded and extracted it to a folder ).
  2. Download and extract the QuickText Notepad++ Plugin.
  3. Copy the QuickText.UNI.dll into Notepad++’s plugin directory
  4. Copy the QuickText.ini file into Notepad++’s directory.The directory in which you find the notepad++ exe file.

QuickText Install

That’s it your installation is complete.Now the tags are to be defined.

Steps to define tags in the QuickText Notepad++ Plugin :

  1. Navigate to Options under Plugins > QuickText  > Options..

     QuickText NPP Plugin

  2. Next Define your tags using the following steps.
    • Select the Programming language or just select Normal Text, if
    • Define Tag Name
    • Enter your code in the Substitution Text Box and Click “ Add/Modify ” Button
    • You should now see the tag added under the list of Tags.

      User Defined Tags

  3. Now to use this tag in a php file, just enter the tag is_single and press “ TAB ” and the tag is replaced by the substitution text which the code.

    QuickText Tags Usage

Manage Code Snippets On Offline Easily Using Snippely Adobe Air Application

WordPress Snippet For Showing Category Listing In 2 Columns

Note : Just incase Tab is not working after you type your tag, Check if the shortcut is mapped correctly in the shortcut mapper which can accessed under Settings > Shortcut mapper ,then click on the Plugin Commands tab and scroll to near the bottom and look for ‘ Replace Tag ’, once you’ve found it define a new shortcut.

Similar Post  How To Compare Two Word Documents and Find Differences

Shortcut Mapper

 

The best advantage of this plugin is that tags/snippets can be defined for different languages which makes it easier to work with different pieces of code and have the snippets easily accessible.

Are you using a more simpler or powerful snippet manager for NotePad++, do share with us with your thoughts and experiences.

Here are 2 sources where you can find many Snippets For WordPress – WPSNIPP  and WP-SNIPPETS

7 comments

  1. Erwann Reply

    Thank you for this article.
    I have a problem, tags does not appear after the installation, and I can’t save any.

  2. tom Reply

    how can i save the char => $ for variables?
    for example tagname=test substitutionText= $_SERVER[‘HTTP_XYZ’];
    the char $ doesn’t save ?

    Any resolution?

    LG
    -= tom =-

  3. M.A. Reply

    Is there a way to define, where the Snippet File resides? We want need centralized place for a set of standard snippets.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.