In usr_41.txt of the vim documentation there is the following example:
```
24 noremap <unique> <script> <Plug>TypecorrAdd <SID>Add
..
28 noremap <SID>Add :call <SID>Add(expand("<cword>"), 1)<CR>
Thus when a user types "\a", this sequence is invoked: >
\a -> <Plug>TypecorrAdd -> <SID>Add -> :call <SID>Add()
```
I'm a bit confused by the `<SID>Add` mapping; is it necessary
or is it only there for illustration of the use of `<SID>`
with mappings? I.e. would the following work too?
```
noremap <unique> <script> <Plug>TypecorrAdd :call
<SID>Add(expand("<cword>"), 1)<CR>
```
(That will probably line-wrap out of readability.
I guess I should have written
```
noremap <unique> <script> <Plug>TypecorrAdd
\ :call <SID>Add(expand("<cword>"), 1)<CR>
```
)
/bpj
--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
Saturday, January 18, 2014
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment