aboutsummaryrefslogtreecommitdiff
path: root/runtime
diff options
context:
space:
mode:
Diffstat (limited to 'runtime')
-rw-r--r--runtime/doc/eval.txt10
-rw-r--r--runtime/doc/pattern.txt43
-rw-r--r--runtime/mswin.vim45
3 files changed, 63 insertions, 35 deletions
diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt
index fffdcef8d9..f404192abb 100644
--- a/runtime/doc/eval.txt
+++ b/runtime/doc/eval.txt
@@ -6789,10 +6789,12 @@ setpos({expr}, {list})
[bufnum, lnum, col, off, curswant]
"bufnum" is the buffer number. Zero can be used for the
- current buffer. Setting the cursor is only possible for
- the current buffer. To set a mark in another buffer you can
- use the |bufnr()| function to turn a file name into a buffer
- number.
+ current buffer. When setting an uppercase mark "bufnum" is
+ used for the mark position. For other marks it specifies the
+ buffer to set the mark in. You can use the |bufnr()| function
+ to turn a file name into a buffer number.
+ For setting the cursor and the ' mark "bufnum" is ignored,
+ since these are associated with a window, not a buffer.
Does not change the jumplist.
"lnum" and "col" are the position in the buffer. The first
diff --git a/runtime/doc/pattern.txt b/runtime/doc/pattern.txt
index ab78b8b71c..cc485b655d 100644
--- a/runtime/doc/pattern.txt
+++ b/runtime/doc/pattern.txt
@@ -1071,25 +1071,27 @@ x A single character, with no special meaning, matches itself
- A character class expression is evaluated to the set of characters
belonging to that character class. The following character classes
are supported:
- Name Contents ~
-*[:alnum:]* [:alnum:] ASCII letters and digits
-*[:alpha:]* [:alpha:] ASCII letters
-*[:blank:]* [:blank:] space and tab characters
-*[:cntrl:]* [:cntrl:] control characters
-*[:digit:]* [:digit:] decimal digits
-*[:graph:]* [:graph:] printable characters excluding space
-*[:lower:]* [:lower:] lowercase letters (all letters when
+ Name Func Contents ~
+*[:alnum:]* [:alnum:] isalnum ASCII letters and digits
+*[:alpha:]* [:alpha:] isalpha ASCII letters
+*[:blank:]* [:blank:] space and tab
+*[:cntrl:]* [:cntrl:] iscntrl ASCII control characters
+*[:digit:]* [:digit:] decimal digits '0' to '9'
+*[:graph:]* [:graph:] isgraph ASCII printable characters excluding
+ space
+*[:lower:]* [:lower:] (1) lowercase letters (all letters when
'ignorecase' is used)
-*[:print:]* [:print:] printable characters including space
-*[:punct:]* [:punct:] ASCII punctuation characters
-*[:space:]* [:space:] whitespace characters
-*[:upper:]* [:upper:] uppercase letters (all letters when
+*[:print:]* [:print:] (2) printable characters including space
+*[:punct:]* [:punct:] ispunct ASCII punctuation characters
+*[:space:]* [:space:] whitespace characters: space, tab, CR,
+ NL, vertical tab, form feed
+*[:upper:]* [:upper:] (3) uppercase letters (all letters when
'ignorecase' is used)
-*[:xdigit:]* [:xdigit:] hexadecimal digits
-*[:return:]* [:return:] the <CR> character
-*[:tab:]* [:tab:] the <Tab> character
-*[:escape:]* [:escape:] the <Esc> character
-*[:backspace:]* [:backspace:] the <BS> character
+*[:xdigit:]* [:xdigit:] hexadecimal digits: 0-9, a-f, A-F
+*[:return:]* [:return:] the <CR> character
+*[:tab:]* [:tab:] the <Tab> character
+*[:escape:]* [:escape:] the <Esc> character
+*[:backspace:]* [:backspace:] the <BS> character
The brackets in character class expressions are additional to the
brackets delimiting a collection. For example, the following is a
plausible pattern for a Unix filename: "[-./[:alnum:]_~]\+" That is,
@@ -1100,6 +1102,13 @@ x A single character, with no special meaning, matches itself
regexp engine. See |two-engines|. In the future these items may
work for multi-byte characters. For now, to get all "alpha"
characters you can use: [[:lower:][:upper:]].
+
+ The "Func" column shows what library function is used. The
+ implementation depends on the system. Otherwise:
+ (1) Uses islower() for ASCII and Vim builtin rules for other
+ characters when built with the |+multi_byte| feature.
+ (2) Uses Vim builtin rules
+ (3) As with (1) but using isupper()
*/[[=* *[==]*
- An equivalence class. This means that characters are matched that
have almost the same meaning, e.g., when ignoring accents. This
diff --git a/runtime/mswin.vim b/runtime/mswin.vim
index ca280d227c..da869a9fc7 100644
--- a/runtime/mswin.vim
+++ b/runtime/mswin.vim
@@ -1,7 +1,7 @@
" Set options and add mapping such that Vim behaves a lot like MS-Windows
"
" Maintainer: Bram Moolenaar <Bram@vim.org>
-" Last change: 2012 Jul 25
+" Last change: 2017 Oct 28
" bail out if this isn't wanted (mrsvim.vim uses this).
if exists("g:skip_loading_mswin") && g:skip_loading_mswin
@@ -23,20 +23,22 @@ set backspace=indent,eol,start whichwrap+=<,>,[,]
" backspace in Visual mode deletes selection
vnoremap <BS> d
-" CTRL-X and SHIFT-Del are Cut
-vnoremap <C-X> "+x
-vnoremap <S-Del> "+x
+if has("clipboard")
+ " CTRL-X and SHIFT-Del are Cut
+ vnoremap <C-X> "+x
+ vnoremap <S-Del> "+x
-" CTRL-C and CTRL-Insert are Copy
-vnoremap <C-C> "+y
-vnoremap <C-Insert> "+y
+ " CTRL-C and CTRL-Insert are Copy
+ vnoremap <C-C> "+y
+ vnoremap <C-Insert> "+y
-" CTRL-V and SHIFT-Insert are Paste
-map <C-V> "+gP
-map <S-Insert> "+gP
+ " CTRL-V and SHIFT-Insert are Paste
+ map <C-V> "+gP
+ map <S-Insert> "+gP
-cmap <C-V> <C-R>+
-cmap <S-Insert> <C-R>+
+ cmap <C-V> <C-R>+
+ cmap <S-Insert> <C-R>+
+endif
" Pasting blockwise and linewise selections is not possible in Insert and
" Visual mode without the +virtualedit feature. They are pasted as if they
@@ -44,8 +46,10 @@ cmap <S-Insert> <C-R>+
" Uses the paste.vim autoload script.
" Use CTRL-G u to have CTRL-Z only undo the paste.
-exe 'inoremap <script> <C-V> <C-G>u' . paste#paste_cmd['i']
-exe 'vnoremap <script> <C-V> ' . paste#paste_cmd['v']
+if 1
+ exe 'inoremap <script> <C-V> <C-G>u' . paste#paste_cmd['i']
+ exe 'vnoremap <script> <C-V> ' . paste#paste_cmd['v']
+endif
imap <S-Insert> <C-V>
vmap <S-Insert> <C-V>
@@ -99,6 +103,19 @@ inoremap <C-F4> <C-O><C-W>c
cnoremap <C-F4> <C-C><C-W>c
onoremap <C-F4> <C-C><C-W>c
+if has("gui")
+ " CTRL-F is the search dialog
+ noremap <expr> <C-F> has("gui_running") ? ":promptfind\<CR>" : "/"
+ inoremap <expr> <C-F> has("gui_running") ? "\<C-\>\<C-O>:promptfind\<CR>" : "\<C-\>\<C-O>/"
+ cnoremap <expr> <C-F> has("gui_running") ? "\<C-\>\<C-C>:promptfind\<CR>" : "\<C-\>\<C-O>/"
+
+ " CTRL-H is the replace dialog,
+ " but in console, it might be backspace, so don't map it there
+ nnoremap <expr> <C-H> has("gui_running") ? ":promptrepl\<CR>" : "\<C-H>"
+ inoremap <expr> <C-H> has("gui_running") ? "\<C-\>\<C-O>:promptrepl\<CR>" : "\<C-H>"
+ cnoremap <expr> <C-H> has("gui_running") ? "\<C-\>\<C-C>:promptrepl\<CR>" : "\<C-H>"
+endif
+
" restore 'cpoptions'
set cpo&
if 1