Working With Words

C+LEFT and C+RIGHT move the caret a word at a time. Holding down Shift in addition to the above extends the selection a word at a time.

A single word can be selected by double-clicking with the mouse, or using the Edit>More Selection>Select Word command (shortcut: C+e w). A selection that begins and ends on word boundaries can be created by double-clicking and dragging.

C+BACKSPACE and C+DELETE delete the word before or after the caret, respectively.

Edit>Complete Word (shortcut: C+b) locates possible completions for the word at the caret, first by looking in the current edit mode's syntax highlighting keyword list, and then in the current buffer for words that begin with the word at the caret. This serves as a very basic code completion feature.

If there is only one completion, it will be inserted into the buffer immediately.

If multiple completions were found, the longest common prefix is inserted into the buffer, and a popup is shown below the caret position listing the completions.

To insert a completion from the list, either select it using the UP and DOWN keys and press ENTER, press a digit to insert one of the first ten completions (1 is the first completion; 9 is the 9th; 0 is the 10th), or click the desired completion with the mouse. To close the popup without inserting a completion, press ESCAPE.

Typing while the popup is visible will automatically update the popup and narrow the set of completions as necessary.

The default word completion uses the visible buffers (buffers being shown in an EditPane) to find completions. The set of possible words can be expanded by enabling the Global Options - Text Area - Complete words from all open buffers option. Setting this option will use all open buffers to search for possible completions. Note, this can degrade completion performance if many buffers are open.

Edit>Word Count displays a dialog box with the number of characters, words and lines in the current buffer.

What's a Word?

The default behavior of the C+LEFT, C+RIGHT, C+BACKSPACE and C+DELETE commands is to stop both at the beginning and the end of each word. Normally, a word is a sequence of alphanumerics, but you can add other characters as part of what jEdit considers to be a 'word', set on a global or mode basis from Global Options - Editing - Extra Word Characters. In addition, this behavior can be changed by remapping these keystrokes to alternative actions whose names end with (Eat Whitespace) in the Shortcuts pane of the Utilities>Options dialog box; see the section called “The Shortcuts Pane”.