~ubuntu-branches/ubuntu/maverick/vim/maverick

« back to all changes in this revision

Viewing changes to runtime/doc/pattern.txt

  • Committer: Bazaar Package Importer
  • Author(s): Steve Langasek
  • Date: 2009-05-04 11:13:42 UTC
  • mfrom: (1.1.8 upstream) (0.1.2 squeeze)
  • Revision ID: james.westby@ubuntu.com-20090504111342-60miqybsixdpc345
Tags: 2:7.2.148-2ubuntu1
* Merge from Debian unstable, remaining changes:
  - debian/runtime/vimrc: "syntax on" is a sane default for non-tiny vim.
  - runtime/syntax/debcontrol.vim:
    + Add "metapackages" to the list of valid sections.
  - runtime/syntax/grub.vim:
    + Add Ubuntu-specific 'quiet' keyword.
  - Drop vim-lesstif package and lesstif2-dev build-dependency.
  - Enable Python interpreter on basic builds.
  - Disable autoindent, line-wrapping, and backup files by default.
* Dropped changes, merged in Debian:
  - Add jaunty, karmic to the list of valid suites.
  - runtime/syntax/debsources.vim:
    + Add "jaunty" to debsourcesDistrKeyword
  - Create a .pot file for translations.
* Drop gutsy from the list of valid distro series, it's been EOLed.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
*pattern.txt*   For Vim version 7.2.  Last change: 2008 Jul 16
 
1
*pattern.txt*   For Vim version 7.2.  Last change: 2008 Nov 18
2
2
 
3
3
 
4
4
                  VIM REFERENCE MANUAL    by Bram Moolenaar
32
32
                        |linewise|.
33
33
 
34
34
                                                        */<CR>*
35
 
/<CR>                   Search forward for the [count]'th latest used
36
 
                        pattern |last-pattern| with latest used |{offset}|.
 
35
/<CR>                   Search forward for the [count]'th occurrence of the
 
36
                        latest used pattern |last-pattern| with latest used
 
37
                        |{offset}|.
37
38
 
38
 
//{offset}<CR>          Search forward for the [count]'th latest used
39
 
                        pattern |last-pattern| with new |{offset}|.  If
40
 
                        {offset} is empty no offset is used.
 
39
//{offset}<CR>          Search forward for the [count]'th occurrence of the
 
40
                        latest used pattern |last-pattern| with new
 
41
                        |{offset}|.  If {offset} is empty no offset is used.
41
42
 
42
43
                                                        *?*
43
44
?{pattern}[?]<CR>       Search backward for the [count]'th previous
48
49
                        down |linewise|.
49
50
 
50
51
                                                        *?<CR>*
51
 
?<CR>                   Search backward for the [count]'th latest used
52
 
                        pattern |last-pattern| with latest used |{offset}|.
 
52
?<CR>                   Search backward for the [count]'th occurrence of the
 
53
                        latest used pattern |last-pattern| with latest used
 
54
                        |{offset}|.
53
55
 
54
 
??{offset}<CR>          Search backward for the [count]'th latest used
55
 
                        pattern |last-pattern| with new |{offset}|.  If
56
 
                        {offset} is empty no offset is used.
 
56
??{offset}<CR>          Search backward for the [count]'th occurrence of the
 
57
                        latest used pattern |last-pattern| with new
 
58
                        |{offset}|.  If {offset} is empty no offset is used.
57
59
 
58
60
                                                        *n*
59
61
n                       Repeat the latest "/" or "?" [count] times.
507
509
|/\Z|   \Z      \Z      ignore differences in Unicode "combining characters".
508
510
                        Useful when searching voweled Hebrew or Arabic text.
509
511
 
510
 
|/\%d|  \%d     \%d     match specified decimal character (eg \%d123
 
512
|/\%d|  \%d     \%d     match specified decimal character (eg \%d123)
511
513
|/\%x|  \%x     \%x     match specified hex character (eg \%x2a)
512
514
|/\%o|  \%o     \%o     match specified octal character (eg \%o040)
513
515
|/\%u|  \%u     \%u     match specified multibyte character (eg \%u20ac)
794
796
                                                */\%V*
795
797
\%V     Match inside the Visual area.  When Visual mode has already been
796
798
        stopped match in the area that |gv| would reselect.
797
 
        Only works for the current buffer.
 
799
        This is a |/zero-width| match.  To make sure the whole pattern is
 
800
        inside the Visual area put it at the start and end of the pattern,
 
801
        e.g.: >
 
802
                /\%Vfoo.*bar\%V
 
803
<       Only works for the current buffer.
798
804
 
799
805
                                                */\%#* *cursor-position*
800
806
\%#     Matches with the cursor position.  Only works when matching in a
877
883
        this will clearly show when the match is updated or not.
878
884
        To match the text up to column 17: >
879
885
                /.*\%17v
880
 
<       Column 17 is not included, because that's where the "\%17v" matches,
881
 
        and since this is a |/zero-width| match, column 17 isn't included in
882
 
        the match.  This does the same: >
883
 
                /.*\%<18v
 
886
<       Column 17 is included, because that's where the "\%17v" matches,
 
887
        even though this is a |/zero-width| match.  Adding a dot to match the
 
888
        next character has the same result: >
 
889
                /.*\%17v.
 
890
<       This command does the same thing, but also matches when there is no
 
891
        character in column 17: >
 
892
                /.*\%<18v.
884
893
<
885
894
 
886
895
Character classes: {not in Vi}