Mercurial > vim
comparison src/testdir/test_backspace_opt.vim @ 20627:8bce783af0cb v8.2.0867
patch 8.2.0867: using {xxx} for encoding a modifier is not nice
Commit: https://github.com/vim/vim/commit/fccd93f0917234b962ce07d1df3adf9d7105936f
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun May 31 22:06:51 2020 +0200
patch 8.2.0867: using \{xxx} for encoding a modifier is not nice
Problem: Using \{xxx} for encoding a modifier is not nice.
Solution: Use \<*xxx> instead, since it's the same as \<xxx> but producing a
different code.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sun, 31 May 2020 22:15:03 +0200 |
parents | c2570baa2e4c |
children | ff21e2962490 |
comparison
equal
deleted
inserted
replaced
20626:38f728a93c07 | 20627:8bce783af0cb |
---|---|
84 exe "normal Avim1\<C-U>\<Esc>\<CR>" | 84 exe "normal Avim1\<C-U>\<Esc>\<CR>" |
85 exe "normal Avim2\<C-G>u\<C-U>\<Esc>\<CR>" | 85 exe "normal Avim2\<C-G>u\<C-U>\<Esc>\<CR>" |
86 | 86 |
87 set cpo-=< | 87 set cpo-=< |
88 inoremap <c-u> <left><c-u> | 88 inoremap <c-u> <left><c-u> |
89 exe "normal Avim3\{C-U}\<Esc>\<CR>" | 89 exe "normal Avim3\<*C-U>\<Esc>\<CR>" |
90 iunmap <c-u> | 90 iunmap <c-u> |
91 exe "normal Avim4\<C-U>\<C-U>\<Esc>\<CR>" | 91 exe "normal Avim4\<C-U>\<C-U>\<Esc>\<CR>" |
92 | 92 |
93 " Test with backspace set to the compatible setting | 93 " Test with backspace set to the compatible setting |
94 set backspace= visualbell | 94 set backspace= visualbell |
95 exe "normal A vim5\<Esc>A\<C-U>\<C-U>\<Esc>\<CR>" | 95 exe "normal A vim5\<Esc>A\<C-U>\<C-U>\<Esc>\<CR>" |
96 exe "normal A vim6\<Esc>Azwei\<C-G>u\<C-U>\<Esc>\<CR>" | 96 exe "normal A vim6\<Esc>Azwei\<C-G>u\<C-U>\<Esc>\<CR>" |
97 | 97 |
98 inoremap <c-u> <left><c-u> | 98 inoremap <c-u> <left><c-u> |
99 exe "normal A vim7\{C-U}\{C-U}\<Esc>\<CR>" | 99 exe "normal A vim7\<*C-U>\<*C-U>\<Esc>\<CR>" |
100 | 100 |
101 call assert_equal([ | 101 call assert_equal([ |
102 \ "1 this shouldn't be deleted", | 102 \ "1 this shouldn't be deleted", |
103 \ "2 this shouldn't be deleted", | 103 \ "2 this shouldn't be deleted", |
104 \ "3 this shouldn't be deleted", | 104 \ "3 this shouldn't be deleted", |