Miscellaneous editor functions

Open declaration

TeXlipse supports the Open declaration command (Hotkey: F3). You can use it to

Code commenting

The plug-in offers an effective way to comment (and uncomment) multiple lines at once. There are four ways to do this: Select the area to comment and

  1. Click the "Comment selection" button at the tool bar. (Yellow arrow to the right towards a %-character.)
    Comment selection
    To uncomment a selection, click the "Uncomment selection" button at the tool bar. (Yellow arrow to the left away from the %-character.)
  2. Select Latex > Comment from the menu bar
    To uncomment select Latex > Uncomment from the menu bar
  3. Press ctrl + 5 to comment the selection
    or press esc ctrl + 5 to uncomment the selection.
  4. Open the context menu (click the right button of the mouse on the editor view) and select (under the Source-menu) Comment to comment or Uncomment to uncomment the selected area.

Note: The command will add a "% "-string to every selected line. If there are no lines selected, the "% "-string is added to the line where the cursor is. If the command is executed multiple times, then a "% "-string is added at the beginning of the selected lines every time the command is executed. Uncommenting is similarly cumulative, that is, it removes the first "% " (or "%") from the beginning of the line.

If you wish to fold commented sections, you can use \begin{comment} and \end{comment} to mark the commented area.

Code folding

The user can fold text blocks by clicking the small triangles in the text editor's left margin. The following blocks can be folded:

Folds are hierarchical, e.g. folding a section folds all subsections under it.

Note: If you wish to fold comments, you have to mark a commented block with the \begin{comment} and \end{comment} keywords.

You can also select what environments are folded initially when the editor is opened. This can be done via Code Folding page at the Preferences. (Window > Preferences > Texlipse > Editor > Code Folding)

Preferences - Code Folding
Check the environments that you want to be folded.

If you wish to add new environments, click the New... -utton and type the name of the environment. For example, if you want to have every equation block folded initially, click the New... button, type equation (do not write \begin{equation}) and accept the value by clicking the OK button.

If you don't want to have some environment folded automatically anymore, select the environment and click the Remove-button.

The Up and Down buttons do not affect anything.

Word counting

To count how many words there are in the selected area, select Latex > Word count from the menu bar. Word counting can also be performed by clicking the Word count icon in the toolbar.

The aim is to count the words that will appear in the output document. Every word in the text is counted as one word, one citation as one word and the words in the argument of a sectioning command are counted, everything else is not considered. If the selection contains commented lines, the words on those lines are not counted.

Excluding parts of the document from the parser

Sometimes one might one to mark a section to be excluded from parsing, e.g. to support a custom-verbatim environment. To do that, simply surround the are to be excluded by %### -comments, e.g.

%###
\begin{myverbatim}
write whatever you want here
\end{myverbatim}
%###