Working with text

From Apache OpenOffice Wiki
Jump to: navigation, search

Working with text (selecting, copying, pasting, moving) in Writer is similar to working with text in any other program. OOo also has some convenient ways to select items that are not next to each other, select a vertical block of text, and paste unformatted text.

Selecting items that are not consecutive

To select nonconsecutive items using the mouse:

  1. Select the first piece of text.
  2. Hold down the Control key and use the mouse to select the next piece of text.
  3. Repeat as often as needed.

Now you can work with the selected text (copy it, delete it, change the style, or whatever).

Documentation note.png Macintosh users: substitute the Command key when instructions in this chapter say to use the Control key.
Selecting items that are not next to each other.

To select nonconsecutive items using the keyboard:

  1. Select the first piece of text. (For more information about keyboard selection of text, see the topic “Navigating and selecting with the keyboard” in the Help.)
  2. Press Shift+F8. This puts Writer in Add mode. The word ADD appears on the status bar.
  3. Use the arrow keys to move to the start of the next piece of text to be selected. Hold down the Shift key and select the next piece of text.
  4. Repeat as often as needed.

Now you can work with the selected text.

Press Esc to exit from this mode.

Selecting a vertical block of text

You can select a vertical block or “column” of text that is separated by spaces or tabs (as you might see in text pasted from e-mails, program listings, or other sources), using OOo’s block selection mode. To change to block selection mode, use Edit > Selection Mode > Block Area, or click several times in the status bar on STD until it changes to BLK.


Now highlight the selection, using mouse or keyboard, as shown below.

Selecting a vertical block of text.

Cutting, copying, and pasting text

Cutting and copying text in Writer is similar to cutting and copying text in other applications. You can use the mouse or the keyboard for these operations. You can copy or move text within a document, or between documents, by dragging or by using menu selections, icons, or keyboard shortcuts. You can also copy text from other sources such as Web pages and paste it into a Writer document.

To move (cut and paste) selected text using the mouse, drag it to the new location and release it. To copy selected text, hold down the Control key while dragging. The text retains the formatting it had before dragging.

When you paste text, the result depends on the source of the text and how you paste it. If you click on the Paste icon, any formatting the text has (such as bold or italics) is retained. Text pasted from Web sites and other sources may also be placed into frames or tables. If you do not like the results, click the Undo icon or press Control+Z.

To make the pasted text take on the formatting of the surrounding text where it is being pasted, choose either:

  • Edit > Paste Special, or
  • Click the triangle to the right of the Paste icon, or
  • Click the Paste icon without releasing the left mouse button.

Then select Unformatted text from the resulting menu.

The range of choices on the Paste Special menu varies depending on the origin and formatting of the text (or other object) to be pasted. See below for an example with text on the clipboard.

Paste Special menu.

Finding and replacing text and formatting

Writer has a Find and Replace feature that automates the process of searching for text inside a document. In addition to finding and replacing words and phrases, you can:

  • Use wildcards and regular expressions to fine-tune a search (see the Help for details).
  • Find and replace specific formatting (see the Writer Guide).
  • Find and replace paragraph styles (see the Writer Guide).

To display the Find & Replace dialog, use the keyboard shortcut Control+F or choose Edit > Find & Replace from the menu bar.

  1. Type the text you want to find in the Search for box.
  2. To replace the text with different text, type the new text in the Replace with box.
  3. You can select various options such as matching the case, matching whole words only, or doing a search for similar words.
  4. When you have set up your search, click Find. To replace text, click Replace instead.
Tip.png If you click Find All, OOo selects all instances of the search text in the document. Similarly, if you click Replace All, OOo will replace all matches.

Expanded Find & Replace dialog
Documentation caution.png Use Replace All with caution; otherwise, you may end up with some hilarious (and highly embarrassing) mistakes. A mistake with Replace All might require a manual, word-by-word, search to fix.

Inserting special characters

A special character is one not found on a standard English keyboard. For example, © ¾ æ ç ñ ö ø ¢ are all special characters. To insert a special character:

  1. Place the cursor where you want the character to appear.
  2. Choose Insert > Special Character to open the Special Characters window.
  3. Select the characters (from any font or mixture of fonts) you wish to insert, in order, then click OK. The selected characters are shown in the lower left of the dialog. As you select a character, it is shown on the lower right, along with its numerical code.
Documentation note.png Different fonts include different special characters. If you do not find a particular special character, try changing the Font selection.
The Special Characters window, where you can insert special characters.
Tip.png Notice that the characters selected appear in the bottom-left corner of the window.

Inserting dashes and non-breaking spaces and hyphens

To prevent two words from being separated at the end of a line, press Control+Shift+spacebar after the first word to insert a non-breaking space.

In cases where you do not want the hyphen to appear at the end of a line, for example in a number such as 123-4567, you can press Control+Shift+minus sign to insert a non-breaking hyphen.

To enter en and em dashes, you can use the Replace dashes option under Tools > AutoCorrect Options. This option replaces two hyphens, under certain conditions, with the corresponding dash.

– is an en-dash; that is, a dash the width of the letter “n” in the font you are using. Type at least one character, a space, one or two hyphens, another space, and at least one more letter, then a space. The one or two hyphens will be replaced by an en-dash.

— is an em-dash; that is, a dash the width of the letter “m” in the font you are using. Type at least one character, two hyphens, and at least one more character, then a space. The two hyphens will be replaced by an em-dash.

See the Help for more details. For other methods of inserting dashes, see the Writer Guide.

Setting tab stops and indents

The horizontal ruler shows both the default tab stops and any tab stops that you have defined. Tab settings affect indentation of full paragraphs (using the Increase Indent and Decrease Indent icons on the Formatting toolbar) as well as indentation of parts of a paragraph (by pressing the Tab key on the keyboard).

Using the default tab spacing can cause formatting problems if you share documents with other people. If you use the default tab spacing and then send the document to someone else who has chosen a different default tab spacing, tabbed material will change to use the other person’s settings. This may cause major formatting problems. Instead of using the defaults, define your own tab settings, as described in this section.

To define indents and tab settings for one or more selected paragraphs, double-click on a part of the ruler that is not between the left and right indent icons to open the Indents & Spacing page of the Paragraph dialog. Double-click anywhere between the left and right indent icons on the ruler to open the Tabs page of the Paragraph dialog.

A better strategy is to define tabs for the paragraph style. See Chapters 6 and 7 in the Writer Guide for more information.

Tip.png Using tabs to space out material on a page is not recommended. Depending on what you are trying to accomplish, a table is usually a better choice.

Changing the default tab stop interval

Documentation note.png Any changes to the default tab setting will affect the existing default tab stops in any document you open afterward, as well as tab stops you insert after making the change.

To set the measurement unit and the spacing of default tab stop intervals, go to Tools > Options > Writer > General.

Selecting a default tab stop interval

You can also set or change the measurement unit for rulers in the current document by right-clicking on the ruler to open a list of units, as shown below. Click on one of them to change the ruler to that unit. The selected setting applies only to that ruler.

Changing measurement unit for ruler

Checking spelling and grammar

Writer provides a spelling checker, which can be used in two ways.

AutoSpellcheck.png AutoSpellcheck checks each word as it is typed and displays a wavy red line under any misspelled words. When the word is corrected, the line disappears.

Spellcheck-icon.png To perform a separate spelling check on the document (or a text selection), click the Spelling and Grammar icon. This checks the document or selection and opens the Spelling and Grammar dialog if any misspelled words are found.

Here are some more features of the spelling checker:

  • You can right-click on a word with a wavy underline to open a context menu. If you select from the suggested words on the menu, the selection will replace the misspelled word in your text. Other menu options are discussed below.
  • You can change the dictionary language (for example, to Spanish, French or German) on the Spelling and Grammar dialog.
  • You can add a word to the dictionary. Click Add in the Spelling and Grammar dialog and pick the dictionary to add it to.
  • Click the Options button on the Spelling and Grammar dialog to open a dialog similar to the one in Tools > Options > Language Settings > Writing Aids described in Chapter 2. There you can choose whether to check uppercase words and words with numbers, and you can manage custom dictionaries, that is, add or delete dictionaries and add or delete words in a dictionary.
  • On the Font tab of the Paragraph Styles dialog, you can set paragraphs to be checked in a specific language (different from the rest of the document). See Chapter 7 (Working with Styles) in the Writer Guide for more information.

Writer does not include a grammar checker, but you can install an extension such as Language Tool and access it from Tools > Spelling and Grammar. (See Chapter 14 for more about installing extensions.)

Language Tool adds a new menu item and submenu to the Tools menu, from which you can configure the tool and check or recheck the document.

Using built-in language tools

Writer provides some tools that make your work easier if you mix multiple languages within the same document or write documents in various languages.

The main advantage of changing the language is that you can then use the correct dictionaries to check spelling and apply the localized versions of Autocorrect replacement tables, thesaurus, and hyphenation rules.

You can also set the language for a paragraph or a group of characters as None. This option is especially useful when you insert text such as web addresses or programming language snippets that you do not want to check for spelling.

Specifying the language in character and paragraph styles is the preferred method, because styles allow a greater level of control and make changing the language much faster. On the Font tab of the Paragraph Styles dialog, you can specify that certain paragraphs be checked in a language that is different from the language of the rest of the document. See Chapter 7 (Working with Styles) in the Writer Guide for information on how to manage the language settings of a style.

You can also set the language for the whole document, for individual paragraphs, or even for individual words and characters, all from Tools > Language on the menu bar.

Another way to change the language of a whole document is to use Tools > Options > Language Settings > Languages. In the Default languages for documents section of the Options dialog, you can choose a different language for all the text.

The spelling checker works only for those languages in the list that have the symbol Spellcheck-icon 2.png next to them. If you do not see the symbol next to your preferred language, you can install the additional dictionary using Tools > Languages > More dictionaries online.

The language used for checking spelling is also shown in the status bar, next to the page style in use.

Using AutoCorrect

Writer’s AutoCorrect function has a long list of common misspellings and typing errors, which it corrects automatically. For example, “hte” will be changed to “the”.

Choose Tools > AutoCorrect Options to open the AutoCorrect dialog. There you can define which strings of text are corrected and how. In most cases, the defaults are fine.

AutoCorrect is turned on when Apache OpenOffice is defined. To turn it off, uncheck Format > AutoCorrect > While Typing.

To stop Writer from replacing a specific spelling, go to the Replace tab, highlight the word pair, and click Delete.

To add a new spelling to the list, type it into the Replace and With boxes on the Replace tab, and click New.

See the different tabs of the dialog for the wide variety of other options available to fine-tune AutoCorrect.

Tip.png AutoCorrect can be used as a quick way to insert special characters. For example, (c) will be autocorrected to ©. You can add your own special characters.

Using word completion

If Word Completion is enabled, Writer tries to guess which word you are typing and offers to complete the word for you. To accept the suggestion, press Enter. Otherwise continue typing.

To turn off Word Completion, choose Tools > AutoCorrect > Word Completion and deselect Enable Word Completion.

You can customize word completion from the Word Completion page of the AutoCorrect dialog:

  • Add (append) a space automatically after an accepted word.
  • Show the suggested word as a tip (hovering over the word) rather than completing the text as you type.
  • Change the maximum number of words remembered for word completion and the length of the smallest words to be remembered.
  • Delete specific entries from the word completion list.
  • Change the key that accepts a suggested entry—the options are Right arrow, End key, Return (Enter), and Space bar.
Documentation note.png Automatic word completion only occurs after you type a word for the second time in a document.

Using AutoText

AutoText allows you to assign text, tables, graphics and other items to a key combination. For example, rather than typing “Senior Management” every time you use that phrase, you might just type “sm” and press F3. You can also save graphics or tables (such as a formatted Tip like the one on this page) as AutoText.

To assign some text to an AutoText shortcut:

  1. Type the text into your document.
  2. Select the text so it is highlighted.
  3. Select Edit > AutoText (or press Control+F3).
  4. Enter a name for your shortcut. Writer will suggest a one-letter shortcut, which you can change.
  5. Click the AutoText button on the right and select New (text only) from the menu.
  6. Click Close to return to your document.
Tip.png If the only option under the AutoText button is Import, either you have not entered a name for your AutoText or there is no text selected in the document.

AutoText is especially powerful when assigned to fields. See Chapter 14 (Working with Fields) in the Writer Guide for more information.

Content on this page is licensed under the Creative Common Attribution 3.0 license (CC-BY).
Personal tools