You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/source/intro.rst
+9-9Lines changed: 9 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -39,7 +39,7 @@ There are 3 special objects you can use for manipulating Notepad++, and the text
39
39
``editor2`` always refers to the "second" Scintilla window, normally on the right or the bottom.
40
40
41
41
You normally only need to use ``editor1`` and ``editor2`` if you're doing something special with multiple views, or
42
-
you're applying a setting, for instance in the :ref:`startup.py` script.
42
+
you're applying a setting, for instance in the ``startup.py`` script.
43
43
44
44
``console`` is the object for manipulating the console window. It's fairly simple, in that there's not much you can do - show it, clear it and write a message in it.
45
45
However, there's also a ``run`` command, which runs a command line and diverts the output to the console. So, you can use Python Script to call your compiler, or run any other command line tool.
@@ -51,13 +51,13 @@ This section is really for *the Pythoneers*, but, for those of us that are just
51
51
52
52
The Npp module contains all the objects and classes that Python Script defines for manipulating Notepad++ (``notepad``, ``editor`` and ``console``). The ``notepad`` object is an instance of class ``Notepad``, editor an instance of class ``Editor`` and ``console`` an instance of class ``Console``.
53
53
54
-
The :ref:`startup.py` script performs the following::
54
+
The ``startup.py`` script performs the following::
55
55
56
56
from Npp import *
57
57
58
58
which effectively says that everything that's in Npp module, is now available locally. So we can just use ``editor.getText()`` instead of ``Npp.editor.getText()``.
59
59
60
-
If you create a new module (i.e. a new file), and want to use the functions defined in that module in a script (using ``import``_), then you will need to either ``import Npp`` or ``from Npp import *`` at the top of your module to use the ``editor``, ``notepad`` and so on objects.
60
+
If you create a new module (i.e. a new file), and want to use the functions defined in that module in a script (using ``import``), then you will need to either ``import Npp`` or ``from Npp import *`` at the top of your module to use the ``editor``, ``notepad`` and so on objects.
61
61
62
62
As the startup script runs in the same namespace as the scripts (__main__), you don't need to import the Npp module in the scripts.
63
63
@@ -169,7 +169,7 @@ which might seem a bit strange when we use it. Again, very easy to fix.::
169
169
170
170
Now everything works as should, and it's nice and easy to see what's going on, and we leave the user with the same document they had open if they use Save-All.
171
171
172
-
See the :ref:`NOTIFICATION` enum for more details on what arguments are provided for each notification, and the different events that are available.
172
+
See the :class:`NOTIFICATION` enum for more details on what arguments are provided for each notification, and the different events that are available.
173
173
174
174
Cancelling Callbacks
175
175
--------------------
@@ -180,7 +180,7 @@ The simplest form is::
180
180
181
181
notepad.clearCallbacks()
182
182
183
-
This unregisters all callbacks for all events. If you want to just clear one or more events, just pass the list of :ref:`NOTIFICATION` events you wish to clear.::
183
+
This unregisters all callbacks for all events. If you want to just clear one or more events, just pass the list of :class:`NOTIFICATION` events you wish to clear.::
0 commit comments