diff options
author | Bram Moolenaar <Bram@vim.org> | 2016-08-20 16:57:02 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2016-08-20 16:57:02 +0200 |
commit | 66e29d7112e437b2b50efe1f82c7e892736d23e4 (patch) | |
tree | a99f9f43e0fc5b56f13cb1426b1fa78f8319632c /runtime | |
parent | f04507d132fbcb63999167ec006fc6e700b5af4f (diff) | |
download | vim-git-66e29d7112e437b2b50efe1f82c7e892736d23e4.tar.gz |
patch 7.4.2230v7.4.2230
Problem: There is no equivalent of 'smartcase' for a tag search.
Solution: Add value "followscs" and "smart" to 'tagcase'. (Christian
Brabandt, closes #712) Turn tagcase test into new style.
Diffstat (limited to 'runtime')
-rw-r--r-- | runtime/doc/options.txt | 5 | ||||
-rw-r--r-- | runtime/doc/tagsrch.txt | 44 |
2 files changed, 34 insertions, 15 deletions
diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt index 738367d2c..c531168e3 100644 --- a/runtime/doc/options.txt +++ b/runtime/doc/options.txt @@ -7417,6 +7417,9 @@ A jump table for the options with a short description can be found at |Q_op|. By default, tag searches are case-sensitive. Case is ignored when 'ignorecase' is set and 'tagcase' is "followic", or when 'tagcase' is "ignore". + Also when 'tagcase' is "followscs" and 'smartcase' is set, or + 'tagcase' is "smart", and the pattern contains only lowercase + characters. When 'tagbsearch' is off, tags searching is slower when a full match exists, but faster when no full match exists. Tags in unsorted tags @@ -7435,8 +7438,10 @@ A jump table for the options with a short description can be found at |Q_op|. This option specifies how case is handled when searching the tags file: followic Follow the 'ignorecase' option + followscs Follow the 'smartcase' and 'ignorecase' options ignore Ignore case match Match case + smart Ignore case unless an upper case letter is used *'taglength'* *'tl'* 'taglength' 'tl' number (default 0) diff --git a/runtime/doc/tagsrch.txt b/runtime/doc/tagsrch.txt index 86a00f409..b8ab15367 100644 --- a/runtime/doc/tagsrch.txt +++ b/runtime/doc/tagsrch.txt @@ -84,14 +84,23 @@ Note that when the current file changes, the priority list is mostly not changed, to avoid confusion when using ":tnext". It is changed when using ":tag {ident}". -The ignore-case matches are not found for a ":tag" command when the -'ignorecase' option is off and 'tagcase' is "followic" or when 'tagcase' is -"match". They are found when a pattern is used (starting with a "/") and for -":tselect", also when 'ignorecase' is off and 'tagcase' is "followic" or when -'tagcase' is "match". Note that using ignore-case tag searching disables -binary searching in the tags file, which causes a slowdown. This can be -avoided by fold-case sorting the tag file. See the 'tagbsearch' option for an -explanation. +The ignore-case matches are not found for a ":tag" command when: +- the 'ignorecase' option is off and 'tagcase' is "followic" +- 'tagcase' is "match" +- 'tagcase' is "smart" and the pattern contains an upper case character. +- 'tagcase' is "followscs" and 'smartcase' option is on and the pattern + contains an upper case character. + +The gnore-case matches are found when: +- a pattern is used (starting with a "/") +- for ":tselect" +- when 'tagcase' is "followic" and 'ignorecase' is off +- when 'tagcase' is "match" +- when 'tagcase' is "followscs" and the 'smartcase' option is off + +Note that using ignore-case tag searching disables binary searching in the +tags file, which causes a slowdown. This can be avoided by fold-case sorting +the tag file. See the 'tagbsearch' option for an explanation. ============================================================================== 2. Tag stack *tag-stack* *tagstack* *E425* @@ -442,13 +451,18 @@ file "tags". It can also be used to access a common tags file. The next file in the list is not used when: - A matching static tag for the current buffer has been found. - A matching global tag has been found. -This also depends on whether case is ignored. Case is ignored when -'ignorecase' is set and 'tagcase' is "followic", or when 'tagcase' is -"ignore". If case is not ignored, and the tags file only has a match without -matching case, the next tags file is searched for a match with matching case. -If no tag with matching case is found, the first match without matching case -is used. If case is ignored, and a matching global tag with or without -matching case is found, this one is used, no further tags files are searched. +This also depends on whether case is ignored. Case is ignored when: +- 'tagcase' is "followic" and 'ignorecase' is set +- 'tagcase' is "ignore" +- 'tagcase' is "smart" and and the pattern only contains lower case + characters. +- 'tagcase' is "followscs" and 'smartcase' is set and and the pattern only + contains lower case characters. +If case is not ignored, and the tags file only has a match without matching +case, the next tags file is searched for a match with matching case. If no +tag with matching case is found, the first match without matching case is +used. If case is ignored, and a matching global tag with or without matching +case is found, this one is used, no further tags files are searched. When a tag file name starts with "./", the '.' is replaced with the path of the current file. This makes it possible to use a tags file in the directory |