Created
April 24, 2009 11:46
-
-
Save nperez/101080 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Stolen from Kent Cowgill | |
" Settings for perl stuff. | |
189 " perltidy things! true, perl-support provides this, but i had gotten | |
190 " used to hitting "_t" to run my source through perltidy. | |
191 nnoremap <silent> _t :%!perltidy -q<Enter> | |
192 vnoremap <silent> _t :!perltidy -q<Enter> | |
193 " instead of man pages, read perldoc on hitting K over a keyword! | |
194 autocmd BufRead,BufNewFile *.pm,*.pl,*.t,*.ptml setlocal keywordprg=perldoc\ -f | |
195 " type "#!P<CR>" in insert mode, and it expands to a default perl fileheader | |
196 iabbrev #!P #!/usr/bin/perl<CR><CR>use strict;<CR>use warnings;<ESC>:filetype detect<CR>o | |
197 " hit "#!+" when cursor is on a \w+, and a POD stub will be created above | |
198 " the cursor, and you'll be dumped into insert mode in the appropriate place. | |
199 nnoremap <silent> #!+ bywko<cr>=item <ESC>p$xo<CR><CR>=cut<CR><ESC>3ko | |
200 vnoremap <silent> #!+ bywko<cr>=item <ESC>p$xo<CR><CR>=cut<CR><ESC>3ko | |
201 " hit "#!-" and you get POD stub doumentation for the top of a file | |
202 nnoremap <silent> #!- i<cr>=head1 NAME<cr><cr><cr>=head1 SYNOPSIS<cr><cr><cr>=head1 DESCRIPTION<cr><cr><cr>=head2 Header<cr><cr>=over 20<cr><cr>=item ItemName<cr><cr>=cut<cr><ESC> | |
203 vnoremap <silent> #!- i<cr>=head1 NAME<cr><cr><cr>=head1 SYNOPSIS<cr><cr><cr>=head1 DESCRIPTION<cr><cr><cr>=head2 Header<cr><cr>=over 20<cr><cr>=item ItemName<cr><cr>=cut<cr><ESC> | |
204 " hit "#!_" and you get POD stub doumentation for the bottom of a file | |
205 nnoremap <silent> #!_ i<cr>=back<cr><cr>=head1 AUTHOR<cr><cr>Kent Cowgill - <[email protected]><cr><cr>=head1 BUGS<cr><cr><cr>=head1 ACKNOWLEDGEMENTS<cr><cr><cr>=head1 SEE ALSO<cr><cr><cr>=cut<ESC> | |
206 vnoremap <silent> #!_ i<cr>=back<cr><cr>=head1 AUTHOR<cr><cr>Kent Cowgill - <[email protected]><cr><cr>=head1 BUGS<cr><cr><cr>=head1 ACKNOWLEDGEMENTS<cr><cr><cr>=head1 SEE ALSO<cr><cr><cr>=cut<ESC> | |
207 | |
208 noremap ,ai :r!grep "^sub" % \| awk '{print "=item " $2}' | |
209 noremap ,ap maG:r ~/.vim/codesnippets-perl/podtemplate<cr>'a | |
210 | |
211 " Settings specific for the perl-support plugin | |
212 " my perl includes pod | |
213 let perl_include_pod = 1 | |
214 " syntax color complex things like @{${"foo"}} | |
215 let perl_extended_vars = 1 | |
216 " give package names another color | |
217 let perl_want_scope_in_variables = 1 | |
218 " folding! | |
219 "let perl_fold = 1 | |
220 " misc settings, not that i've ever used them |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment