comparison runtime/ftplugin/perl6.vim @ 4681:2eb30f341e8d

Updated runtime files and translations.
author Bram Moolenaar <bram@vim.org>
date Sat, 01 Jun 2013 14:50:56 +0200
parents 94601b379f38
children 11cd8d58372e
comparison
equal deleted inserted replaced
4680:fd8cc7fbc273 4681:2eb30f341e8d
1 " Vim filetype plugin file 1 " Vim filetype plugin file
2 " Language: Perl 6 2 " Language: Perl 6
3 " Maintainer: Andy Lester <andy@petdance.com> 3 " Maintainer: vim-perl <vim-perl@googlegroups.com>
4 " URL: http://github.com/petdance/vim-perl/tree/master 4 " Homepage: http://github.com/vim-perl/vim-perl
5 " Last Change: 2012 Mar 11 5 " Bugs/requests: http://github.com/vim-perl/vim-perl/issues
6 " Contributors: Hinrik Örn Sigurðsson <hinrik.sig@gmail.com> 6 " Last Change: 2013-05-11
7 " Contributors: Hinrik Örn Sigurðsson <hinrik.sig@gmail.com>
7 " 8 "
8 " Based on ftplugin/perl.vim by Dan Sharp <dwsharp at hotmail dot com> 9 " Based on ftplugin/perl.vim by Dan Sharp <dwsharp at hotmail dot com>
9 10
10 if exists("b:did_ftplugin") | finish | endif 11 if exists("b:did_ftplugin") | finish | endif
11 let b:did_ftplugin = 1 12 let b:did_ftplugin = 1
13 " Make sure the continuation lines below do not cause problems in 14 " Make sure the continuation lines below do not cause problems in
14 " compatibility mode. 15 " compatibility mode.
15 let s:save_cpo = &cpo 16 let s:save_cpo = &cpo
16 set cpo-=C 17 set cpo-=C
17 18
18 setlocal formatoptions+=crq 19 setlocal formatoptions-=t
20 setlocal formatoptions+=crqol
21 setlocal keywordprg=p6doc
22
19 setlocal comments=:# 23 setlocal comments=:#
20 setlocal commentstring=#%s 24 setlocal commentstring=#%s
21 25
22 " Change the browse dialog on Win32 to show mainly Perl-related files 26 " Change the browse dialog on Win32 to show mainly Perl-related files
23 if has("gui_win32") 27 if has("gui_win32")
24 let b:browsefilter = "Perl Source Files (*.pl)\t*.pl\n" . 28 let b:browsefilter = "Perl Source Files (*.pl)\t*.pl\n" .
25 \ "Perl Modules (*.pm)\t*.pm\n" . 29 \ "Perl Modules (*.pm)\t*.pm\n" .
26 \ "Perl Documentation Files (*.pod)\t*.pod\n" . 30 \ "Perl Documentation Files (*.pod)\t*.pod\n" .
27 \ "All Files (*.*)\t*.*\n" 31 \ "All Files (*.*)\t*.*\n"
28 endif 32 endif
29 33
30 " Provided by Ned Konz <ned at bike-nomad dot com> 34 " Provided by Ned Konz <ned at bike-nomad dot com>
31 "--------------------------------------------- 35 "---------------------------------------------
32 setlocal include=\\<\\(use\\\|require\\)\\> 36 setlocal include=\\<\\(use\\\|require\\)\\>
37 " gf and similar commands work. Thanks to Andrew Pimlott for pointing out 41 " gf and similar commands work. Thanks to Andrew Pimlott for pointing out
38 " the problem. If this causes a " problem for you, add an 42 " the problem. If this causes a " problem for you, add an
39 " after/ftplugin/perl6.vim file that contains 43 " after/ftplugin/perl6.vim file that contains
40 " set isfname-=: 44 " set isfname-=:
41 set isfname+=: 45 set isfname+=:
46 setlocal iskeyword=48-57,_,A-Z,a-z,:,-
47
48 " Set this once, globally.
49 if !exists("perlpath")
50 if executable("perl6")
51 try
52 if &shellxquote != '"'
53 let perlpath = system('perl6 -e "@*INC.join(q/,/).say"')
54 else
55 let perlpath = system("perl6 -e '@*INC.join(q/,/).say'")
56 endif
57 let perlpath = substitute(perlpath,',.$',',,','')
58 catch /E145:/
59 let perlpath = ".,,"
60 endtry
61 else
62 " If we can't call perl to get its path, just default to using the
63 " current directory and the directory of the current file.
64 let perlpath = ".,,"
65 endif
66 endif
67
68 let &l:path=perlpath
69 "---------------------------------------------
42 70
43 " Undo the stuff we changed. 71 " Undo the stuff we changed.
44 let b:undo_ftplugin = "setlocal fo< com< cms< inc< inex< def< isk<" . 72 let b:undo_ftplugin = "setlocal fo< com< cms< inc< inex< def< isk<" .
45 \ " | unlet! b:browsefilter" 73 \ " | unlet! b:browsefilter"
46 74
47 " Restore the saved compatibility options. 75 " Restore the saved compatibility options.
48 let &cpo = s:save_cpo 76 let &cpo = s:save_cpo
49 unlet s:save_cpo 77 unlet s:save_cpo