Skip to content

Commit 8977936

Browse files
committed
[DOCS] Fix a few links in the docs
1 parent a9ac1b9 commit 8977936

File tree

4 files changed

+22
-22
lines changed

4 files changed

+22
-22
lines changed

docs/source/console.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ Console Object
6161

6262
.. attribute:: Console.editor
6363

64-
An :ref:`Editor` object for the console window. This enables you to change colours, styles, even add and remove text if
64+
An :class:`Editor` object for the console window. This enables you to change colours, styles, even add and remove text if
6565
you so wish, from the console window. Note that the console window is always left in a read-only state, so in order to change
6666
text, you would need to first perform a ``console.editor.setReadOnly(0)``. Any subsequent ``console.write`` or ``console.writeError``
6767
calls will make the console read-only again.

docs/source/intro.rst

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ There are 3 special objects you can use for manipulating Notepad++, and the text
3939
``editor2`` always refers to the "second" Scintilla window, normally on the right or the bottom.
4040

4141
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.
4343

4444
``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.
4545
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
5151

5252
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``.
5353

54-
The :ref:`startup.py` script performs the following::
54+
The ``startup.py`` script performs the following::
5555

5656
from Npp import *
5757

5858
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()``.
5959

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.
6161

6262
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.
6363

@@ -169,7 +169,7 @@ which might seem a bit strange when we use it. Again, very easy to fix.::
169169

170170
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.
171171

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.
173173

174174
Cancelling Callbacks
175175
--------------------
@@ -180,7 +180,7 @@ The simplest form is::
180180

181181
notepad.clearCallbacks()
182182

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.::
184184

185185
notepad.clearCallbacks([NOTIFICATION.FILESAVING, NOTIFICATION.FILESAVED])
186186

@@ -210,11 +210,11 @@ The only visible difference is that if you have a lot of callbacks registered, o
210210
the event some time after it has actually occurred. In normal circumstances the time delay is so small it doesn't matter, but you may
211211
need to be aware of it if you're doing something time-sensitive.
212212

213-
As of version 1.0, you can use :method:`Editor.callbackSync` to add a synchronous callback. This allows you to perform time-sensitive
214-
operations in an event handler. It also allows for calling :method:`Editor.autoCCancel` in a ``SCINTILLANOTIFICATION.AUTOCSELECTION``
213+
As of version 1.0, you can use :meth:`Editor.callbackSync` to add a synchronous callback. This allows you to perform time-sensitive
214+
operations in an event handler. It also allows for calling :meth:`Editor.autoCCancel` in a ``SCINTILLANOTIFICATION.AUTOCSELECTION``
215215
notification to cancel the auto-complete. Note that there are certain calls which cannot be made in a synchronous callback -
216-
:method:`Editor.findText`, :method:`Editor.searchInTarget` and :method:`Editor.setDocPointer` are notable examples. :method:`Notepad.createScintilla`
217-
and :method:`Notepad.destroyScintilla` are other examples in the ``Notepad`` object - note that this only applies to Scintilla (``Editor``) callbacks,
216+
:meth:`Editor.findText`, :meth:`Editor.searchInTarget` and :meth:`Editor.setDocPointer` are notable examples. :meth:`Notepad.createScintilla`
217+
and :meth:`Notepad.destroyScintilla` are other examples in the ``Notepad`` object - note that this only applies to Scintilla (``Editor``) callbacks,
218218
``Notepad`` callbacks can perform any operation.
219219

220220

docs/source/notepad.rst

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ Notepad++ Object
3636

3737
notepad.callback(my_callback, [NOTIFICATION.BUFFERACTIVATED])
3838

39-
The :ref:`NOTIFICATION` enum corresponds to the NPPN_* plugin notifications.
39+
The :class:`NOTIFICATION` enum corresponds to the NPPN_* plugin notifications.
4040
The function arguments is a map, and the contents vary dependant on the notification.
4141

4242
Note that the callback will live on past the life of the script, so you can use this
@@ -70,7 +70,7 @@ Notepad++ Object
7070
7171
notepad.clearCallbacks([NOTIFICATION.BUFFERACTIVATED, NOTIFICATION.FILESAVED])
7272

73-
See :ref:`NOTIFICATION`
73+
See :class:`NOTIFICATION`
7474

7575
.. method:: Notepad.clearCallbacks(function, eventsList)
7676

@@ -124,7 +124,7 @@ Notepad++ Object
124124
Get the current language type
125125

126126
Returns:
127-
:ref:`LANGTYPE`
127+
:class:`LANGTYPE`
128128

129129

130130
.. method:: Notepad.getCurrentView()
@@ -137,7 +137,7 @@ Notepad++ Object
137137
currently active buffer is returned.
138138

139139
Returns:
140-
:ref:`BUFFERENCODING`
140+
:class:`BUFFERENCODING`
141141

142142

143143
.. method:: Notepad.getFiles()
@@ -154,7 +154,7 @@ Notepad++ Object
154154
If no bufferID is given, then the format of the currently active buffer is returned.
155155

156156
Returns:
157-
:ref:`FORMATTYPE`
157+
:class:`FORMATTYPE`
158158

159159

160160
.. method:: Notepad.getLangType([bufferID]) -> LANGTYPE
@@ -163,7 +163,7 @@ Notepad++ Object
163163
If no bufferID is given, then the language of the currently active buffer is returned.
164164

165165
Returns:
166-
:ref:`LANGTYPE`
166+
:class:`LANGTYPE`
167167

168168
.. method:: Notepad.getNppDir() -> str
169169

@@ -196,18 +196,18 @@ Notepad++ Object
196196

197197
.. method:: Notepad.menuCommand(menuCommand)
198198

199-
Runs a Notepad++ menu command. Use the :ref:`MENUCOMMAND` enum, or integers directly from the nativeLang.xml file.
199+
Runs a Notepad++ menu command. Use the :class:`MENUCOMMAND` enum, or integers directly from the nativeLang.xml file.
200200

201201

202202
.. method:: Notepad.messageBox(message[, title[, flags]]) -> MessageBoxFlags
203203

204204
Displays a message box with the given *message* and *title*.
205205

206-
Flags can be 0 for a standard 'OK' message box, or a combination of :ref:`MESSAGEBOXFLAGS`.
206+
Flags can be 0 for a standard 'OK' message box, or a combination of :class:`MESSAGEBOXFLAGS`.
207207
``title`` is "Python Script for Notepad++" by default, and flags is 0 by default.
208208

209209
Returns:
210-
A RESULTxxxx member of :ref:`MESSAGEBOXFLAGS` as to which button was pressed.
210+
A RESULTxxxx member of :class:`MESSAGEBOXFLAGS` as to which button was pressed.
211211

212212

213213
.. method:: Notepad.new()
@@ -323,7 +323,7 @@ Notepad++ Object
323323
.. method:: Notepad.setCurrentLang(langType)
324324

325325

326-
Set the language type of the currently active buffer (see :ref:`LANGTYPE`)
326+
Set the language type of the currently active buffer (see :class:`LANGTYPE`)
327327

328328

329329
.. method:: Notepad.setFormatType(formatType[, bufferID])
@@ -339,7 +339,7 @@ Notepad++ Object
339339

340340
.. method:: Notepad.setStatusBar(statusBarSection, text)
341341

342-
Sets the status bar text. For statusBarSection, use one of the :ref:`STATUSBARSECTION` constants.
342+
Sets the status bar text. For statusBarSection, use one of the :class:`STATUSBARSECTION` constants.
343343

344344
.. method:: Notepad.showTabBar()
345345

docs/source/scintilla.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4191,7 +4191,7 @@ Helper Methods
41914191

41924192
.. method:: Editor.setTarget(start, end)
41934193

4194-
Sets the target start and end in one call. See :ref:`Editor.setTargetStart` and :ref:`Editor.setTargetEnd`
4194+
Sets the target start and end in one call. See :meth:`Editor.setTargetStart` and :meth:`Editor.setTargetEnd`
41954195

41964196

41974197
.. method:: Editor.getUserLineSelection() -> (startLine, endLine)

0 commit comments

Comments
 (0)