Fluitend door het leven

Notepad-plus-plus Plsql Enabled

Use Notepad++ for PL/SQL-development

I use Notepad++ when I work in Windows.

Notepad++ has the distinct advantage of column or block selection in a (for me) natural way.
For editing (PL/)SQL when using Oracle databases I use a mixture of Toad, SQL Developer and Notepad++.
To enable a function list for PL/SQL packages, follow the next steps:
  • Open from the install-path of Notepad++: functionList.xml (e.g. C:\Program Files\notepad++\functionList.xml)
  • Navigate to the associationMap-section
  • Add the next line:
        <association langID="17" id="sql_syntax"/>
      
  • Navigate to the parsers-section
  • Add the following:
      <parser id="sql_syntax" displayName="SQL-methods" commentExpr="((/\*.*?\*)/|(--.*?$))">
            <function
                  mainExpr="^[\s]{0,}(function|procedure)[\s]{1,}[\w_]{1,}">
                  <functionName>
                        <nameExpr expr="^[\s]{0,}(function|procedure)[\s]{1,}\K[\w_]{1,}"/>
                  </functionName>
            </function>
      </parser>
      
  • Save the file and restart Notepad++
Done.

I found a reminder of how to set this up @ http://www.hermanmol.nl/?p=240.

Extend automatic syntax to other extensions

There is a possibility to extend automatic styles to files with your own chosen extension for package specifications and bodies, e.g. foo.spc and foo.bdy.
You can add your own extensions via Settings >> Style Configurator and fill the field “User ext. :” (I did this space-separated, that works)

Added value of this screen: this is the place for specifying your chosen colours for keyword, types, operator and comment.

Run a script while editing in Notepad++

You can run your script via SQL Developer or Toad as follows on worksheet:
@"C:\path_to_file\foo.sql"

Menno    Werk ^^