Mercurial > vim
comparison runtime/menu.vim @ 314:529f887b5cb7
updated for version 7.0082
author | vimboss |
---|---|
date | Tue, 07 Jun 2005 21:09:25 +0000 |
parents | d292c40ca788 |
children | 0ee579e01743 |
comparison
equal
deleted
inserted
replaced
313:96a9bfba3880 | 314:529f887b5cb7 |
---|---|
1 " Vim support file to define the default menus | 1 " Vim support file to define the default menus |
2 " You can also use this as a start for your own set of menus. | 2 " You can also use this as a start for your own set of menus. |
3 " | 3 " |
4 " Maintainer: Bram Moolenaar <Bram@vim.org> | 4 " Maintainer: Bram Moolenaar <Bram@vim.org> |
5 " Last Change: 2005 Mar 15 | 5 " Last Change: 2005 Jun 07 |
6 | 6 |
7 " Note that ":an" (short for ":anoremenu") is often used to make a menu work | 7 " Note that ":an" (short for ":anoremenu") is often used to make a menu work |
8 " in all modes and avoid side effects from mappings defined by the user. | 8 " in all modes and avoid side effects from mappings defined by the user. |
9 | 9 |
10 " Make sure the '<' and 'C' flags are not included in 'cpoptions', otherwise | 10 " Make sure the '<' and 'C' flags are not included in 'cpoptions', otherwise |
401 vunmenu &Tools.&Jump\ to\ this\ tag<Tab>g^] | 401 vunmenu &Tools.&Jump\ to\ this\ tag<Tab>g^] |
402 vnoremenu &Tools.&Jump\ to\ this\ tag<Tab>g^] g<C-]> | 402 vnoremenu &Tools.&Jump\ to\ this\ tag<Tab>g^] g<C-]> |
403 an 40.310 &Tools.Jump\ &back<Tab>^T <C-T> | 403 an 40.310 &Tools.Jump\ &back<Tab>^T <C-T> |
404 an 40.320 &Tools.Build\ &Tags\ File :exe "!" . g:ctags_command<CR> | 404 an 40.320 &Tools.Build\ &Tags\ File :exe "!" . g:ctags_command<CR> |
405 | 405 |
406 if has("folding") || has("spell") | |
407 an 40.330 &Tools.-SEP1- <Nop> | |
408 endif | |
409 | |
410 " Tools.Spellsing Menu | |
411 if has("spell") | |
412 an 40.335.110 &Tools.&Spelling.&Spell\ Check\ On :set spell<CR> | |
413 an 40.335.120 &Tools.&Spelling.Spell\ Check\ &Off :set nospell<CR> | |
414 an 40.335.130 &Tools.&Spelling.To\ &Next\ error<Tab>]s ]s | |
415 an 40.335.130 &Tools.&Spelling.To\ &Pevious\ error<Tab>[s [s | |
416 an 40.335.200 &Tools.&Spelling.-SEP1- <Nop> | |
417 an 40.335.210 &Tools.&Spelling.Set\ language\ to\ "en" :set spl=en spell<CR> | |
418 an 40.335.220 &Tools.&Spelling.Set\ language\ to\ "en_au" :set spl=en_au spell<CR> | |
419 an 40.335.230 &Tools.&Spelling.Set\ language\ to\ "en_ca" :set spl=en_ca spell<CR> | |
420 an 40.335.240 &Tools.&Spelling.Set\ language\ to\ "en_gb" :set spl=en_gb spell<CR> | |
421 an 40.335.250 &Tools.&Spelling.Set\ language\ to\ "en_nz" :set spl=en_nz spell<CR> | |
422 an 40.335.260 &Tools.&Spelling.Set\ language\ to\ "en_us" :set spl=en_us spell<CR> | |
423 an <silent> 40.335.270 &Tools.&Spelling.&Find\ More\ Languages :call <SID>SpellLang()<CR> | |
424 | |
425 func! s:SpellLang() | |
426 silent! aun &Tools.&Spelling.&Find\ More\ Languages | |
427 if &enc == "iso-8859-15" | |
428 let enc = "latin1" | |
429 else | |
430 let enc = &enc | |
431 endif | |
432 let found = 0 | |
433 let s = globpath(&rtp, "spell/*." . enc . ".spl") | |
434 if s != "" | |
435 let n = 300 | |
436 for f in split(s, "\n") | |
437 let nm = substitute(f, '.*spell[/\\]\(..\)\.[^/\\]*\.spl', '\1', "") | |
438 if nm != "en" | |
439 exe 'an 40.335.' . n . ' &Tools.&Spelling.Set\ language\ to\ "' . nm . '" :set spl=' . nm . ' spell<CR>' | |
440 let found += 1 | |
441 endif | |
442 let n += 10 | |
443 endfor | |
444 endif | |
445 if found == 0 | |
446 echomsg "Could not find other spell files" | |
447 elseif found == 1 | |
448 echomsg "Found spell file " . nm | |
449 else | |
450 echomsg "Found " . found . " more spell files" | |
451 endif | |
452 endfun | |
453 | |
454 endif | |
455 | |
406 " Tools.Fold Menu | 456 " Tools.Fold Menu |
407 if has("folding") | 457 if has("folding") |
408 an 40.330 &Tools.-SEP1- <Nop> | |
409 " open close folds | 458 " open close folds |
410 an 40.340.110 &Tools.&Folding.&Enable/Disable\ folds<Tab>zi zi | 459 an 40.340.110 &Tools.&Folding.&Enable/Disable\ folds<Tab>zi zi |
411 an 40.340.120 &Tools.&Folding.&View\ Cursor\ Line<Tab>zv zv | 460 an 40.340.120 &Tools.&Folding.&View\ Cursor\ Line<Tab>zv zv |
412 an 40.340.120 &Tools.&Folding.Vie&w\ Cursor\ Line\ only<Tab>zMzx zMzx | 461 an 40.340.120 &Tools.&Folding.Vie&w\ Cursor\ Line\ only<Tab>zMzx zMzx |
413 an 40.340.130 &Tools.&Folding.C&lose\ more\ folds<Tab>zm zm | 462 an 40.340.130 &Tools.&Folding.C&lose\ more\ folds<Tab>zm zm |
518 let s:name = strpart(s:n, 0, s:i) | 567 let s:name = strpart(s:n, 0, s:i) |
519 let s:n = strpart(s:n, s:i + 1, 19999) | 568 let s:n = strpart(s:n, s:i + 1, 19999) |
520 endif | 569 endif |
521 " Ignore case for VMS and windows | 570 " Ignore case for VMS and windows |
522 let s:name = substitute(s:name, '\c.*[/\\:\]]\([^/\\:]*\)\.vim', '\1', '') | 571 let s:name = substitute(s:name, '\c.*[/\\:\]]\([^/\\:]*\)\.vim', '\1', '') |
523 exe "an 30.440." . s:idx . ' &Tools.&Set\ Compiler.' . s:name . " :compiler " . s:name . "<CR>" | 572 exe "an 30.440." . s:idx . ' &Tools.se&T\ Compiler.' . s:name . " :compiler " . s:name . "<CR>" |
524 unlet s:name | 573 unlet s:name |
525 unlet s:i | 574 unlet s:i |
526 let s:idx = s:idx + 10 | 575 let s:idx = s:idx + 10 |
527 endwhile | 576 endwhile |
528 unlet s:n | 577 unlet s:n |