Lines Matching refs:Add
29 Next chapter: |usr_42.txt| Add new menus
2133 could define a function Add(), but another script could try to define the same
2139 30 function s:Add(from, correct)
2145 Now we can call the function s:Add() from within this script. If another
2146 script also defines s:Add(), it will be local to that script and can only
2147 be called from the script it was defined in. There can also be a global Add()
2153 24 noremap <unique> <script> <Plug>TypecorrAdd; <SID>Add
2155 28 noremap <SID>Add :call <SID>Add(expand("<cword>"), 1)<CR>
2159 \a -> <Plug>TypecorrAdd; -> <SID>Add -> :call <SID>Add()
2161 If another script also maps <SID>Add, it will get another script ID and
2164 Note that instead of s:Add() we use <SID>Add() here. That is because the
2167 the Add() function.
2170 with other plugins. The basic rule is that you use <SID>Add() in mappings and
2171 s:Add() in other places (the script itself, autocommands, user commands).
2175 26 noremenu <script> Plugin.Add\ Correction <SID>Add
2184 use ":noremap", but we do want "<SID>Add" to be remapped. This is why
2201 In our example the scriptname is "Typecorr" and the mapname is "Add".
2208 number. Thus a function "<SID>Add()" will have a name "<SNR>11_Add()"
2220 39 command -nargs=1 Correct :call s:Add(<q-args>, 0)
2243 30 function s:Add(from, correct)
2250 s:Add() function is called, it increments s:count. It doesn't matter from
2282 24 noremap <unique> <script> <Plug>TypecorrAdd; <SID>Add
2284 26 noremenu <script> Plugin.Add\ Correction <SID>Add
2286 28 noremap <SID>Add :call <SID>Add(expand("<cword>"), 1)<CR>
2288 30 function s:Add(from, correct)
2297 39 command -nargs=1 Correct :call s:Add(<q-args>, 0)
2329 6 There are currently only a few corrections. Add your own if you like.
2333 10 Add a correction for the word under the cursor.
2337 14 Add a correction for {word}.
2490 " Add mappings, unless the user didn't want this.
2788 Next chapter: |usr_42.txt| Add new menus