Vim Recipes: A Cookbook For The Vim Text Editor by Marsh Dan

Vim Recipes: A Cookbook For The Vim Text Editor by Marsh Dan

Author:Marsh, Dan
Language: eng
Format: epub
Publisher: UNKNOWN
Published: 2017-12-10T00:00:00+00:00


NAVIGATION

NAVIGATING TEXT FFILES

PROBLEM

You're editing a text file such an essay or e-mail, and want to exploit its structure to navigate it efficiently.

SOLUTION

In Normalmode you can use the following shortcuts:

Key Move To

{{ Beginning of current paragraph }} End of current paragraph (( Beginning of current sentence )) End of current sentence

ww Beginning of next word

bb Beginning of the previous word ee End of the word

DISCUSSION

The shortcuts above all rely on the fact that plain text is often very structured. A document consists of paragraphs separated by newlines. Paragraphs contain one or more sentences which begin with capital letters and end with periods. Sentences are collections of words which are separated by spaces.

After using one of these shortcuts you may want to return to where you were previously. This is particularly useful if you're writing one thing and are then reminded that you now have to change another: you use a shortcut to jump to the location of the change, then want to resume where you left of. You can use the g, (mnemonic: go back to where I paused (commas can be used to represent pauses…)) command. Each time you execute it you'll be taken back another step. To move in the other direction (towards more recent changes), use g;.



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.