# SOME DESCRIPTIVE TITLE # Copyright (C) YEAR Free Software Foundation, Inc. # FIRST AUTHOR , YEAR. # #, fuzzy msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "POT-Creation-Date: 2007-12-28 20:29+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=CHARSET\n" "Content-Transfer-Encoding: ENCODING" # type: Plain text #: usr_03.txt:2 #, no-wrap msgid "*usr_03.txt*\tFor Vim version 7.0. Last change: 2006 Apr 24\n" msgstr "" # type: Plain text #: usr_03.txt:4 #, no-wrap msgid "\t\t VIM USER MANUAL - by Bram Moolenaar\n" msgstr "" # type: Plain text #: usr_03.txt:6 #, no-wrap msgid "\t\t\t Moving around\n" msgstr "" # type: Plain text #: usr_03.txt:12 msgid "" "Before you can insert or delete text the cursor has to be moved to the right " "place. Vim has a large number of commands to position the cursor. This " "chapter shows you how to use the most important ones. You can find a list " "of these commands below |Q_lr|." msgstr "" # type: Plain text #: usr_03.txt:23 msgid "" "|03.1|\tWord movement |03.2|\tMoving to the start or end of a line " "|03.3|\tMoving to a character |03.4|\tMatching a parenthesis |03.5|\tMoving " "to a specific line |03.6|\tTelling where you are |03.7|\tScrolling around " "|03.8|\tSimple searches |03.9|\tSimple search patterns |03.10|\tUsing marks" msgstr "" # type: Plain text #: usr_03.txt:27 #, no-wrap msgid "" " Next chapter: |usr_04.txt| Making small changes\n" " Previous chapter: |usr_02.txt| The first steps in Vim\n" "Table of contents: |usr_toc.txt|\n" msgstr "" # type: Plain text #: usr_03.txt:28 usr_03.txt:74 usr_03.txt:101 usr_03.txt:147 usr_03.txt:172 usr_03.txt:223 usr_03.txt:265 usr_03.txt:320 usr_03.txt:491 usr_03.txt:552 usr_03.txt:650 #, no-wrap msgid "==============================================================================\n" msgstr "" # type: Plain text #: usr_03.txt:30 #, no-wrap msgid "*03.1*\tWord movement\n" msgstr "" # type: Plain text #: usr_03.txt:34 msgid "" "To move the cursor forward one word, use the \"w\" command. Like most Vim " "commands, you can use a numeric prefix to move past multiple words. For " "example, \"3w\" moves three words. This figure shows how it works:" msgstr "" # type: Plain text #: usr_03.txt:38 #, no-wrap msgid "" "\tThis is a line with example text ~\n" "\t --->-->->----------------->\n" "\t w w w 3w\n" msgstr "" # type: Plain text #: usr_03.txt:42 #, no-wrap msgid "" "Notice that \"w\" moves to the start of the next word if it already is at " "the\n" "start of a word.\n" " The \"b\" command moves backward to the start of the previous word:\n" msgstr "" # type: Plain text #: usr_03.txt:46 #, no-wrap msgid "" "\tThis is a line with example text ~\n" "\t<----<--<-<---------<---\n" "\t b b b 2b b\n" msgstr "" # type: Plain text #: usr_03.txt:49 msgid "" "There is also the \"e\" command that moves to the next end of a word and " "\"ge\", which moves to the previous end of a word:" msgstr "" # type: Plain text #: usr_03.txt:53 #, no-wrap msgid "" "\tThis is a line with example text ~\n" "\t <- <--- -----> ---->\n" "\t ge ge e e\n" msgstr "" # type: Plain text #: usr_03.txt:58 msgid "" "If you are at the last word of a line, the \"w\" command will take you to " "the first word in the next line. Thus you can use this to move through a " "paragraph, much faster than using \"l\". \"b\" does the same in the other " "direction." msgstr "" # type: Plain text #: usr_03.txt:64 #, no-wrap msgid "" "A word ends at a non-word character, such as a \".\", \"-\" or \")\". To " "change\n" "what Vim considers to be a word, see the 'iskeyword' option.\n" " It is also possible to move by white-space separated WORDs. This is not " "a\n" "word in the normal sense, that's why the uppercase is used. The commands " "for\n" "moving by WORDs are also uppercase, as this figure shows:\n" msgstr "" # type: Plain text #: usr_03.txt:70 #, no-wrap msgid "" "\t ge b\t w\t\t\t\te\n" "\t <- <-\t --->\t\t\t --->\n" "\tThis is-a line, with special/separated/words (and some more). ~\n" "\t <----- <-----\t -------------------->\t ----->\n" "\t gE B\t\t\t W\t\t\t E\n" msgstr "" # type: Plain text #: usr_03.txt:73 msgid "" "With this mix of lowercase and uppercase commands, you can quickly move " "forward and backward through a paragraph." msgstr "" # type: Plain text #: usr_03.txt:76 #, no-wrap msgid "*03.2*\tMoving to the start or end of a line\n" msgstr "" # type: Plain text #: usr_03.txt:79 msgid "" "The \"$\" command moves the cursor to the end of a line. If your keyboard " "has an key it will do the same thing." msgstr "" # type: Plain text #: usr_03.txt:83 msgid "" "The \"^\" command moves to the first non-blank character of the line. The " "\"0\" command (zero) moves to the very first character of the line. The " " key does the same thing. In a picture:" msgstr "" # type: Plain text #: usr_03.txt:89 #, no-wrap msgid "" "\t\t ^\n" "\t <------------\n" "\t.....This is a line with example text ~\n" "\t<----------------- --------------->\n" "\t\t0\t\t $\n" msgstr "" # type: Plain text #: usr_03.txt:91 msgid "(the \".....\" indicates blanks here)" msgstr "" # type: Plain text #: usr_03.txt:100 #, no-wrap msgid "" " The \"$\" command takes a count, like most movement commands. But moving " "to\n" "the end of the line several times doesn't make sense. Therefore it causes " "the\n" "editor to move to the end of another line. For example, \"1$\" moves you " "to\n" "the end of the first line (the one you're on), \"2$\" to the end of the " "next\n" "line, and so on.\n" " The \"0\" command doesn't take a count argument, because the \"0\" would " "be\n" "part of the count. Unexpectedly, using a count with \"^\" doesn't have " "any\n" "effect.\n" msgstr "" # type: Plain text #: usr_03.txt:103 #, no-wrap msgid "*03.3*\tMoving to a character\n" msgstr "" # type: Plain text #: usr_03.txt:110 #, no-wrap msgid "" "One of the most useful movement commands is the single-character search\n" "command. The command \"fx\" searches forward in the line for the single\n" "character x. Hint: \"f\" stands for \"Find\".\n" " For example, you are at the beginning of the following line. Suppose " "you\n" "want to go to the h of human. Just execute the command \"fh\" and the " "cursor\n" "will be positioned over the h:\n" msgstr "" # type: Plain text #: usr_03.txt:114 #, no-wrap msgid "" "\tTo err is human. To really foul up you need a computer. ~\n" "\t---------->--------------->\n" "\t fh\t\t fy\n" msgstr "" # type: Plain text #: usr_03.txt:118 #, no-wrap msgid "" "This also shows that the command \"fy\" moves to the end of the word " "really.\n" " You can specify a count; therefore, you can go to the \"l\" of \"foul\" " "with\n" "\"3fl\":\n" msgstr "" # type: Plain text #: usr_03.txt:122 #, no-wrap msgid "" "\tTo err is human. To really foul up you need a computer. ~\n" "\t\t --------------------->\n" "\t\t\t 3fl\n" msgstr "" # type: Plain text #: usr_03.txt:124 msgid "The \"F\" command searches to the left:" msgstr "" # type: Plain text #: usr_03.txt:128 #, no-wrap msgid "" "\tTo err is human. To really foul up you need a computer. ~\n" "\t\t <---------------------\n" "\t\t\t Fh\n" msgstr "" # type: Plain text #: usr_03.txt:132 msgid "" "The \"tx\" command works like the \"fx\" command, except it stops one " "character before the searched character. Hint: \"t\" stands for \"To\". " "The backward version of this command is \"Tx\"." msgstr "" # type: Plain text #: usr_03.txt:136 #, no-wrap msgid "" "\tTo err is human. To really foul up you need a computer. ~\n" "\t\t <------------ ------------->\n" "\t\t\tTh\t\ttn\n" msgstr "" # type: Plain text #: usr_03.txt:140 msgid "" "These four commands can be repeated with \";\". \",\" repeats in the other " "direction. The cursor is never moved to another line. Not even when the " "sentence continues." msgstr "" # type: Plain text #: usr_03.txt:146 msgid "" "Sometimes you will start a search, only to realize that you have typed the " "wrong command. You type \"f\" to search backward, for example, only to " "realize that you really meant \"F\". To abort a search, press . So " "\"f\" is an aborted forward search and doesn't do anything. Note: " " cancels most operations, not just searches." msgstr "" # type: Plain text #: usr_03.txt:149 #, no-wrap msgid "*03.4*\tMatching a parenthesis\n" msgstr "" # type: Plain text #: usr_03.txt:154 msgid "" "When writing a program you often end up with nested () constructs. Then the " "\"%\" command is very handy: It moves to the matching paren. If the cursor " "is on a \"(\" it will move to the matching \")\". If it's on a \")\" it " "will move to the matching \"(\"." msgstr "" # type: Plain text #: usr_03.txt:160 #, no-wrap msgid "" "\t\t\t %\n" "\t\t\t <----->\n" "\t\tif (a == (b * c) / d) ~\n" "\t\t <---------------->\n" "\t\t\t %\n" msgstr "" # type: Plain text #: usr_03.txt:163 msgid "" "This also works for [] and {} pairs. (This can be defined with the " "'matchpairs' option.)" msgstr "" # type: Plain text #: usr_03.txt:167 msgid "" "When the cursor is not on a useful character, \"%\" will search forward to " "find one. Thus if the cursor is at the start of the line of the previous " "example, \"%\" will search forward and find the first \"(\". Then it moves " "to its match:" msgstr "" # type: Plain text #: usr_03.txt:171 #, no-wrap msgid "" "\t\tif (a == (b * c) / d) ~\n" "\t\t---+---------------->\n" "\t\t\t %\n" msgstr "" # type: Plain text #: usr_03.txt:174 #, no-wrap msgid "*03.5*\tMoving to a specific line\n" msgstr "" # type: Plain text #: usr_03.txt:177 msgid "" "If you are a C or C++ programmer, you are familiar with error messages such " "as the following:" msgstr "" # type: Plain text #: usr_03.txt:179 #, no-wrap msgid "\tprog.c:33: j undeclared (first use in this function) ~\n" msgstr "" # type: Plain text #: usr_03.txt:190 #, no-wrap msgid "" "This tells you that you might want to fix something on line 33. So how do " "you\n" "find line 33? One way is to do \"9999k\" to go to the top of the file and " "\"32j\"\n" "to go down thirty two lines. It is not a good way, but it works. A much\n" "better way of doing things is to use the \"G\" command. With a count, " "this\n" "command positions you at the given line number. For example, \"33G\" puts " "you\n" "on line 33. (For a better way of going through a compiler's error list, " "see\n" "|usr_30.txt|, for information on the :make command.)\n" " With no argument, \"G\" positions you at the end of the file. A quick " "way to\n" "go to the start of a file use \"gg\". \"1G\" will do the same, but is a " "tiny bit\n" "more typing.\n" msgstr "" # type: Plain text #: usr_03.txt:201 #, no-wrap msgid "" "\t |\tfirst line of a file ^\n" "\t |\ttext text text text |\n" "\t |\ttext text text text | gg\n" "\t7G |\ttext text text text |\n" "\t |\ttext text text text\n" "\t |\ttext text text text\n" "\t V\ttext text text text |\n" "\t\ttext text text text | G\n" "\t\ttext text text text |\n" "\t\tlast line of a file V\n" msgstr "" # type: Plain text #: usr_03.txt:204 msgid "" "Another way to move to a line is using the \"%\" command with a count. For " "example \"50%\" moves you to halfway the file. \"90%\" goes to near the " "end." msgstr "" # type: Plain text #: usr_03.txt:208 msgid "" "The previous assumes that you want to move to a line in the file, no matter " "if it's currently visible or not. What if you want to move to one of the " "lines you can see? This figure shows the three commands you can use:" msgstr "" # type: Plain text #: usr_03.txt:220 #, no-wrap msgid "" "\t\t\t+---------------------------+\n" "\t\tH -->\t| text sample text\t |\n" "\t\t\t| sample text\t\t |\n" "\t\t\t| text sample text\t |\n" "\t\t\t| sample text\t\t |\n" "\t\tM -->\t| text sample text\t |\n" "\t\t\t| sample text\t\t |\n" "\t\t\t| text sample text\t |\n" "\t\t\t| sample text\t\t |\n" "\t\tL -->\t| text sample text\t |\n" "\t\t\t+---------------------------+\n" msgstr "" # type: Plain text #: usr_03.txt:222 msgid "Hints: \"H\" stands for Home, \"M\" for Middle and \"L\" for Last." msgstr "" # type: Plain text #: usr_03.txt:225 #, no-wrap msgid "*03.6*\tTelling where you are\n" msgstr "" # type: Plain text #: usr_03.txt:227 msgid "To see where you are in a file, there are three ways:" msgstr "" # type: Bullet: '1. ' #: usr_03.txt:230 msgid "" "Use the CTRL-G command. You get a message like this (assuming the 'ruler' " "option is off):" msgstr "" # type: Plain text #: usr_03.txt:232 #, no-wrap msgid "\t\"usr_03.txt\" line 233 of 650 --35%-- col 45-52 ~\n" msgstr "" # type: Plain text #: usr_03.txt:240 #, no-wrap msgid "" " This shows the name of the file you are editing, the line number where " "the\n" " cursor is, the total number of lines, the percentage of the way " "through\n" " the file and the column of the cursor.\n" " Sometimes you will see a split column number. For example, \"col " "2-9\".\n" " This indicates that the cursor is positioned on the second character, " "but\n" " because character one is a tab, occupying eight spaces worth of " "columns,\n" " the screen column is 9.\n" msgstr "" # type: Bullet: '2. ' #: usr_03.txt:243 msgid "" "Set the 'number' option. This will display a line number in front of every " "line: >" msgstr "" # type: Plain text #: usr_03.txt:247 #, no-wrap msgid "" "\t:set number\n" "<\n" " To switch this off again: >\n" msgstr "" # type: Plain text #: usr_03.txt:256 #, no-wrap msgid "" "\t:set nonumber\n" "<\n" " Since 'number' is a boolean option, prepending \"no\" to its name has " "the\n" " effect of switching it off. A boolean option has only these two " "values,\n" " it is either on or off.\n" " Vim has many options. Besides the boolean ones there are options " "with\n" " a numerical value and string options. You will see examples of this " "where\n" " they are used.\n" msgstr "" # type: Bullet: '3. ' #: usr_03.txt:259 msgid "" "Set the 'ruler' option. This will display the cursor position in the lower " "right corner of the Vim window: >" msgstr "" # type: Plain text #: usr_03.txt:261 #, no-wrap msgid "\t:set ruler\n" msgstr "" # type: Plain text #: usr_03.txt:264 msgid "" "Using the 'ruler' option has the advantage that it doesn't take much room, " "thus there is more space for your text." msgstr "" # type: Plain text #: usr_03.txt:267 #, no-wrap msgid "*03.7*\tScrolling around\n" msgstr "" # type: Plain text #: usr_03.txt:275 #, no-wrap msgid "" "The CTRL-U command scrolls down half a screen of text. Think of looking\n" "through a viewing window at the text and moving this window up by half the\n" "height of the window. Thus the window moves up over the text, which is\n" "backward in the file. Don't worry if you have a little trouble " "remembering\n" "which end is up. Most users have the same problem.\n" " The CTRL-D command moves the viewing window down half a screen in the " "file,\n" "thus scrolls the text up half a screen.\n" msgstr "" # type: Plain text #: usr_03.txt:293 #, no-wrap msgid "" "\t\t\t\t +----------------+\n" "\t\t\t\t | some text\t|\n" "\t\t\t\t | some text\t|\n" "\t\t\t\t | some text\t|\n" "\t+---------------+\t | some text\t|\n" "\t| some text\t| CTRL-U --> |\t\t|\n" "\t|\t\t|\t | 123456\t\t|\n" "\t| 123456\t|\t +----------------+\n" "\t| 7890\t\t|\n" "\t|\t\t|\t +----------------+\n" "\t| example\t| CTRL-D --> | 7890\t\t|\n" "\t+---------------+\t |\t\t|\n" "\t\t\t\t | example\t|\n" "\t\t\t\t | example\t|\n" "\t\t\t\t | example\t|\n" "\t\t\t\t | example\t|\n" "\t\t\t\t +----------------+\n" msgstr "" # type: Plain text #: usr_03.txt:297 msgid "" "To scroll one line at a time use CTRL-E (scroll up) and CTRL-Y (scroll " "down). Think of CTRL-E to give you one line Extra. (If you use MS-Windows " "compatible key mappings CTRL-Y will redo a change instead of scroll.)" msgstr "" # type: Plain text #: usr_03.txt:301 msgid "" "To scroll forward by a whole screen (except for two lines) use CTRL-F. The " "other way is backward, CTRL-B is the command to use. Fortunately CTRL-F is " "Forward and CTRL-B is Backward, that's easy to remember." msgstr "" # type: Plain text #: usr_03.txt:305 msgid "" "A common issue is that after moving down many lines with \"j\" your cursor " "is at the bottom of the screen. You would like to see the context of the " "line with the cursor. That's done with the \"zz\" command." msgstr "" # type: Plain text #: usr_03.txt:315 #, no-wrap msgid "" "\t+------------------+\t\t +------------------+\n" "\t| some text\t |\t\t | some text\t |\n" "\t| some text\t |\t\t | some text\t |\n" "\t| some text\t |\t\t | some text\t |\n" "\t| some text\t | zz -->\t | line with cursor |\n" "\t| some text\t |\t\t | some text\t |\n" "\t| some text\t |\t\t | some text\t |\n" "\t| line with cursor |\t\t | some text\t |\n" "\t+------------------+\t\t +------------------+\n" msgstr "" # type: Plain text #: usr_03.txt:319 msgid "" "The \"zt\" command puts the cursor line at the top, \"zb\" at the bottom. " "There are a few more scrolling commands, see |Q_sc|. To always keep a few " "lines of context around the cursor, use the 'scrolloff' option." msgstr "" # type: Plain text #: usr_03.txt:322 #, no-wrap msgid "*03.8*\tSimple searches\n" msgstr "" # type: Plain text #: usr_03.txt:325 msgid "" "To search for a string, use the \"/string\" command. To find the word " "include, for example, use the command: >" msgstr "" # type: Plain text #: usr_03.txt:327 #, no-wrap msgid "\t/include\n" msgstr "" # type: Plain text #: usr_03.txt:333 #, no-wrap msgid "" "You will notice that when you type the \"/\" the cursor jumps to the last " "line\n" "of the Vim window, like with colon commands. That is where you type the " "word.\n" "You can press the backspace key (backarrow or ) to make corrections. " "Use\n" "the and cursor keys when necessary.\n" " Pressing executes the command.\n" msgstr "" # type: Plain text #: usr_03.txt:337 #, no-wrap msgid "" "\tNote:\n" "\tThe characters .*[]^%/\\?~$ have special meanings. If you want to use\n" "\tthem in a search you must put a \\ in front of them. See below.\n" msgstr "" # type: Plain text #: usr_03.txt:340 msgid "" "To find the next occurrence of the same string use the \"n\" command. Use " "this to find the first #include after the cursor: >" msgstr "" # type: Plain text #: usr_03.txt:342 #, no-wrap msgid "\t/#include\n" msgstr "" # type: Plain text #: usr_03.txt:346 msgid "" "And then type \"n\" several times. You will move to each #include in the " "text. You can also use a count if you know which match you want. Thus " "\"3n\" finds the third match. Using a count with \"/\" doesn't work." msgstr "" # type: Plain text #: usr_03.txt:348 msgid "The \"?\" command works like \"/\" but searches backwards: >" msgstr "" # type: Plain text #: usr_03.txt:350 #, no-wrap msgid "\t?word\n" msgstr "" # type: Plain text #: usr_03.txt:354 msgid "" "The \"N\" command repeats the last search the opposite direction. Thus " "using \"N\" after a \"/\" command search backwards, using \"N\" after \"?\" " "searches forward." msgstr "" # type: Plain text #: usr_03.txt:357 msgid "IGNORING CASE" msgstr "" # type: Plain text #: usr_03.txt:360 msgid "" "Normally you have to type exactly what you want to find. If you don't care " "about upper or lowercase in a word, set the 'ignorecase' option: >" msgstr "" # type: Plain text #: usr_03.txt:362 #, no-wrap msgid "\t:set ignorecase\n" msgstr "" # type: Plain text #: usr_03.txt:365 msgid "" "If you now search for \"word\", it will also match \"Word\" and \"WORD\". " "To match case again: >" msgstr "" # type: Plain text #: usr_03.txt:367 #, no-wrap msgid "\t:set noignorecase\n" msgstr "" # type: Plain text #: usr_03.txt:370 msgid "HISTORY" msgstr "" # type: Plain text #: usr_03.txt:372 msgid "Suppose you do three searches: >" msgstr "" # type: Plain text #: usr_03.txt:376 #, no-wrap msgid "" "\t/one\n" "\t/two\n" "\t/three\n" msgstr "" # type: Plain text #: usr_03.txt:384 #, no-wrap msgid "" "Now let's start searching by typing a simple \"/\" without pressing " ". If\n" "you press (the cursor key), Vim puts \"/three\" on the command line.\n" "Pressing at this point searches for three. If you do not press\n" ", but press instead, Vim changes the prompt to \"/two\". " "Another\n" "press of moves you to \"/one\".\n" " You can also use the cursor key to move through the history of\n" "search commands in the other direction.\n" msgstr "" # type: Plain text #: usr_03.txt:388 msgid "" "If you know what a previously used pattern starts with, and you want to use " "it again, type that character before pressing . With the previous " "example, you can type \"/o\" and Vim will put \"/one\" on the command " "line." msgstr "" # type: Plain text #: usr_03.txt:391 msgid "" "The commands starting with \":\" also have a history. That allows you to " "recall a previous command and execute it again. These two histories are " "separate." msgstr "" # type: Plain text #: usr_03.txt:394 msgid "SEARCHING FOR A WORD IN THE TEXT" msgstr "" # type: Plain text #: usr_03.txt:403 #, no-wrap msgid "" "Suppose you see the word \"TheLongFunctionName\" in the text and you want " "to\n" "find the next occurrence of it. You could type \"/TheLongFunctionName\", " "but\n" "that's a lot of typing. And when you make a mistake Vim won't find it.\n" " There is an easier way: Position the cursor on the word and use the " "\"*\"\n" "command. Vim will grab the word under the cursor and use it as the search\n" "string.\n" " The \"#\" command does the same in the other direction. You can prepend " "a\n" "count: \"3*\" searches for the third occurrence of the word under the " "cursor.\n" msgstr "" # type: Plain text #: usr_03.txt:406 msgid "SEARCHING FOR WHOLE WORDS" msgstr "" # type: Plain text #: usr_03.txt:409 msgid "" "If you type \"/the\" it will also match \"there\". To only find words that " "end in \"the\" use: >" msgstr "" # type: Plain text #: usr_03.txt:411 #, no-wrap msgid "\t/the\\>\n" msgstr "" # type: Plain text #: usr_03.txt:415 msgid "" "The \"\\>\" item is a special marker that only matches at the end of a " "word. Similarly \"\\<\" only matches at the begin of a word. Thus to " "search for the word \"the\" only: >" msgstr "" # type: Plain text #: usr_03.txt:417 #, no-wrap msgid "\t/\\\n" msgstr "" # type: Plain text #: usr_03.txt:421 msgid "" "This does not match \"there\" or \"soothe\". Notice that the \"*\" and " "\"#\" commands use these start-of-word and end-of-word markers to only find " "whole words (you can use \"g*\" and \"g#\" to match partial words)." msgstr "" # type: Plain text #: usr_03.txt:424 msgid "HIGHLIGHTING MATCHES" msgstr "" # type: Plain text #: usr_03.txt:429 #, no-wrap msgid "" "While editing a program you see a variable called \"nr\". You want to " "check\n" "where it's used. You could move the cursor to \"nr\" and use the \"*\" " "command\n" "and press \"n\" to go along all the matches.\n" " There is another way. Type this command: >\n" msgstr "" # type: Plain text #: usr_03.txt:431 #, no-wrap msgid "\t:set hlsearch\n" msgstr "" # type: Plain text #: usr_03.txt:435 #, no-wrap msgid "" "If you now search for \"nr\", Vim will highlight all matches. That is a " "very\n" "good way to see where the variable is used, without the need to type " "commands.\n" " To switch this off: >\n" msgstr "" # type: Plain text #: usr_03.txt:437 #, no-wrap msgid "\t:set nohlsearch\n" msgstr "" # type: Plain text #: usr_03.txt:440 msgid "" "Then you need to switch it on again if you want to use it for the next " "search command. If you only want to remove the highlighting, use this " "command: >" msgstr "" # type: Plain text #: usr_03.txt:442 #, no-wrap msgid "\t:nohlsearch\n" msgstr "" # type: Plain text #: usr_03.txt:446 msgid "" "This doesn't reset the option. Instead, it disables the highlighting. As " "soon as you execute a search command, the highlighting will be used again. " "Also for the \"n\" and \"N\" commands." msgstr "" # type: Plain text #: usr_03.txt:449 msgid "TUNING SEARCHES" msgstr "" # type: Plain text #: usr_03.txt:454 #, no-wrap msgid "" "There are a few options that change how searching works. These are the\n" "essential ones:\n" ">\n" "\t:set incsearch\n" msgstr "" # type: Plain text #: usr_03.txt:460 #, no-wrap msgid "" "This makes Vim display the match for the string while you are still typing " "it.\n" "Use this to check if the right match will be found. Then press to\n" "really jump to that location. Or type more to change the search string.\n" ">\n" "\t:set nowrapscan\n" msgstr "" # type: Plain text #: usr_03.txt:464 msgid "" "This stops the search at the end of the file. Or, when you are searching " "backwards, at the start of the file. The 'wrapscan' option is on by " "default, thus searching wraps around the end of the file." msgstr "" # type: Plain text #: usr_03.txt:467 msgid "INTERMEZZO" msgstr "" # type: Plain text #: usr_03.txt:472 #, no-wrap msgid "" "If you like one of the options mentioned before, and set it each time you " "use\n" "Vim, you can put the command in your Vim startup file.\n" " Edit the file, as mentioned at |not-compatible|. Or use this command " "to\n" "find out where it is: >\n" msgstr "" # type: Plain text #: usr_03.txt:474 #, no-wrap msgid "\t:scriptnames\n" msgstr "" # type: Plain text #: usr_03.txt:476 msgid "Edit the file, for example with: >" msgstr "" # type: Plain text #: usr_03.txt:478 #, no-wrap msgid "\t:edit ~/.vimrc\n" msgstr "" # type: Plain text #: usr_03.txt:481 msgid "" "Then add a line with the command to set the option, just like you typed it " "in Vim. Example: >" msgstr "" # type: Plain text #: usr_03.txt:483 #, no-wrap msgid "\tGo:set hlsearch\n" msgstr "" # type: Plain text #: usr_03.txt:486 msgid "" "\"G\" moves to the end of the file. \"o\" starts a new line, where you type " "the \":set\" command. You end insert mode with . Then write the file: " ">" msgstr "" # type: Plain text #: usr_03.txt:488 #, no-wrap msgid "\tZZ\n" msgstr "" # type: Plain text #: usr_03.txt:490 msgid "If you now start Vim again, the 'hlsearch' option will already be set." msgstr "" # type: Plain text #: usr_03.txt:493 #, no-wrap msgid "*03.9*\tSimple search patterns\n" msgstr "" # type: Plain text #: usr_03.txt:501 #, no-wrap msgid "" "The Vim editor uses regular expressions to specify what to search for.\n" "Regular expressions are an extremely powerful and compact way to specify a\n" "search pattern. Unfortunately, this power comes at a price, because " "regular\n" "expressions are a bit tricky to specify.\n" " In this section we mention only a few essential ones. More about " "search\n" "patterns and commands in chapter 27 |usr_27.txt|. You can find the full\n" "explanation here: |pattern|.\n" msgstr "" # type: Plain text #: usr_03.txt:504 msgid "BEGINNING AND END OF A LINE" msgstr "" # type: Plain text #: usr_03.txt:511 #, no-wrap msgid "" "The ^ character matches the beginning of a line. On an English-US " "keyboard\n" "you find it above the 6. The pattern \"include\" matches the word include\n" "anywhere on the line. But the pattern \"^include\" matches the word " "include\n" "only if it is at the beginning of a line.\n" " The $ character matches the end of a line. Therefore, \"was$\" matches " "the\n" "word was only if it is at the end of a line.\n" msgstr "" # type: Plain text #: usr_03.txt:513 msgid "" "Let's mark the places where \"the\" matches in this example line with " "\"x\"s:" msgstr "" # type: Plain text #: usr_03.txt:516 #, no-wrap msgid "" "\tthe solder holding one of the chips melted and the ~\n" "\txxx\t\t\t xxx\t\t xxx\n" msgstr "" # type: Plain text #: usr_03.txt:518 msgid "Using \"/the$\" we find this match:" msgstr "" # type: Plain text #: usr_03.txt:521 #, no-wrap msgid "" "\tthe solder holding one of the chips melted and the ~\n" "\t\t\t\t\t\t xxx\n" msgstr "" # type: Plain text #: usr_03.txt:525 #, no-wrap msgid "" "And with \"/^the\" we find this one:\n" "\tthe solder holding one of the chips melted and the ~\n" "\txxx\n" msgstr "" # type: Plain text #: usr_03.txt:529 msgid "" "You can try searching with \"/^the$\", it will only match a single line " "consisting of \"the\". White space does matter here, thus if a line " "contains a space after the word, like \"the \", the pattern will not match." msgstr "" # type: Plain text #: usr_03.txt:532 msgid "MATCHING ANY SINGLE CHARACTER" msgstr "" # type: Plain text #: usr_03.txt:536 msgid "" "The . (dot) character matches any existing character. For example, the " "pattern \"c.m\" matches a string whose first character is a c, whose second " "character is anything, and whose the third character is m. Example:" msgstr "" # type: Plain text #: usr_03.txt:539 #, no-wrap msgid "" "\tWe use a computer that became the cummin winter. ~\n" "\t\t xxx\t\t xxx\t xxx\n" msgstr "" # type: Plain text #: usr_03.txt:542 msgid "MATCHING SPECIAL CHARACTERS" msgstr "" # type: Plain text #: usr_03.txt:546 #, no-wrap msgid "" "If you really want to match a dot, you must avoid its special meaning by\n" "putting a backslash before it.\n" " If you search for \"ter.\", you will find these matches:\n" msgstr "" # type: Plain text #: usr_03.txt:549 #, no-wrap msgid "" "\tWe use a computer that became the cummin winter. ~\n" "\t\t xxxx\t\t\t xxxx\n" msgstr "" # type: Plain text #: usr_03.txt:551 msgid "Searching for \"ter\\.\" only finds the second match." msgstr "" # type: Plain text #: usr_03.txt:554 #, no-wrap msgid "*03.10*\tUsing marks\n" msgstr "" # type: Plain text #: usr_03.txt:558 msgid "" "When you make a jump to a position with the \"G\" command, Vim remembers the " "position from before this jump. This position is called a mark. To go back " "where you came from, use this command: >" msgstr "" # type: Plain text #: usr_03.txt:560 #, no-wrap msgid "\t``\n" msgstr "" # type: Plain text #: usr_03.txt:565 #, no-wrap msgid "" "This ` is a backtick or open single-quote character.\n" " If you use the same command a second time you will jump back again. " "That's\n" "because the ` command is a jump itself, and the position from before this " "jump\n" "is remembered.\n" msgstr "" # type: Plain text #: usr_03.txt:572 #, no-wrap msgid "" "Generally, every time you do a command that can move the cursor further " "than\n" "within the same line, this is called a jump. This includes the search\n" "commands \"/\" and \"n\" (it doesn't matter how far away the match is). But " "not\n" "the character searches with \"fx\" and \"tx\" or the word movements \"w\" " "and \"e\".\n" " Also, \"j\" and \"k\" are not considered to be a jump. Even when you use " "a\n" "count to make them move the cursor quite a long way away.\n" msgstr "" # type: Plain text #: usr_03.txt:577 msgid "" "The `` command jumps back and forth, between two points. The CTRL-O command " "jumps to older positions (Hint: O for older). CTRL-I then jumps back to " "newer positions (Hint: I is just next to O on the keyboard). Consider this " "sequence of commands: >" msgstr "" # type: Plain text #: usr_03.txt:581 #, no-wrap msgid "" "\t33G\n" "\t/^The\n" "\tCTRL-O\n" msgstr "" # type: Plain text #: usr_03.txt:586 msgid "" "You first jump to line 33, then search for a line that starts with \"The\". " "Then with CTRL-O you jump back to line 33. Another CTRL-O takes you back to " "where you started. If you now use CTRL-I you jump to line 33 again. And to " "the match for \"The\" with another CTRL-I." msgstr "" # type: Plain text #: usr_03.txt:596 #, no-wrap msgid "" "\t |\texample text ^\t |\n" "\t33G |\texample text | CTRL-O | CTRL-I\n" "\t |\texample text |\t |\n" "\t V\tline 33 text ^\t V\n" "\t |\texample text |\t |\n" " /^The |\texample text | CTRL-O | CTRL-I\n" "\t V\tThere you are |\t V\n" "\t\texample text\n" msgstr "" # type: Plain text #: usr_03.txt:599 #, no-wrap msgid "" "\tNote:\n" "\tCTRL-I is the same as .\n" msgstr "" # type: Plain text #: usr_03.txt:602 msgid "" "The \":jumps\" command gives a list of positions you jumped to. The entry " "which you used last is marked with a \">\"." msgstr "" # type: Plain text #: usr_03.txt:605 #, no-wrap msgid "NAMED MARKS\t\t\t\t\t\t\t*bookmark*\n" msgstr "" # type: Plain text #: usr_03.txt:613 #, no-wrap msgid "" "Vim enables you to place your own marks in the text. The command \"ma\" " "marks\n" "the place under the cursor as mark a. You can place 26 marks (a through z) " "in\n" "your text. You can't see them, it's just a position that Vim remembers.\n" " To go to a mark, use the command `{mark}, where \"{mark} is the mark " "letter.\n" "Thus to move to the a mark:\n" ">\n" "\t`a\n" msgstr "" # type: Plain text #: usr_03.txt:617 msgid "" "The command 'mark (single quotation mark, or apostrophe) moves you to the " "beginning of the line containing the mark. This differs from the `mark " "command, which moves you to marked column." msgstr "" # type: Plain text #: usr_03.txt:622 #, no-wrap msgid "" "The marks can be very useful when working on two related parts in a file.\n" "Suppose you have some text near the start of the file you need to look at,\n" "while working on some text near the end of the file.\n" " Move to the text at the start and place the s (start) mark there: >\n" msgstr "" # type: Plain text #: usr_03.txt:624 #, no-wrap msgid "\tms\n" msgstr "" # type: Plain text #: usr_03.txt:626 msgid "The move to the text you want to work on and put the e (end) mark there: >" msgstr "" # type: Plain text #: usr_03.txt:628 #, no-wrap msgid "\tme\n" msgstr "" # type: Plain text #: usr_03.txt:631 msgid "" "Now you can move around, and when you want to look at the start of the file, " "you use this to jump there: >" msgstr "" # type: Plain text #: usr_03.txt:633 #, no-wrap msgid "\t's\n" msgstr "" # type: Plain text #: usr_03.txt:638 #, no-wrap msgid "" "Then you can use '' to jump back to where you were, or 'e to jump to the " "text\n" "you were working on at the end.\n" " There is nothing special about using s for start and e for end, they " "are\n" "just easy to remember.\n" msgstr "" # type: Plain text #: usr_03.txt:640 msgid "You can use this command to get a list of marks: >" msgstr "" # type: Plain text #: usr_03.txt:642 #, no-wrap msgid "\t:marks\n" msgstr "" # type: Plain text #: usr_03.txt:644 msgid "You will notice a few special marks. These include:" msgstr "" # type: Plain text #: usr_03.txt:649 #, no-wrap msgid "" "\t'\tThe cursor position before doing a jump\n" "\t\"\tThe cursor position when last editing the file\n" "\t[\tStart of the last change\n" "\t]\tEnd of the last change\n" msgstr "" # type: Plain text #: usr_03.txt:653 msgid "Next chapter: |usr_04.txt| Making small changes" msgstr "" # type: Plain text #: usr_03.txt:654 msgid "Copyright: see |manual-copyright| vim:tw=78:ts=8:ft=help:norl:" msgstr ""