c9s / cpan.vim
- Source
- Commits
- Network (2)
- Issues (0)
- Downloads (2)
- Wiki (1)
- Graphs
-
Branch:
master
cpan.vim /
| name | age | message | |
|---|---|---|---|
| |
Makefile.bak | Mon Oct 26 13:48:28 -0700 2009 | |
| |
README.mkd | Tue Nov 17 09:22:38 -0800 2009 | |
| |
TODO | Sun Oct 18 05:14:12 -0700 2009 | |
| |
VIMMETA | Wed Nov 18 11:01:49 -0800 2009 | |
| |
perl-functions | Thu Oct 01 09:44:12 -0700 2009 | |
| |
perl-keywords | Thu Oct 01 09:44:12 -0700 2009 | |
| |
utils/ | Mon Oct 26 13:59:34 -0700 2009 | |
| |
vimlib/ | Sat Dec 05 11:42:41 -0800 2009 |
README.mkd
cpan.vim
Vim plugin for perl hackers
* Author: Cornelius ( 林佑安 ) <cornelius.howl@DELETE-ME.gmail.com>
* Site: http://oulixe.us/
* Date: Sun Sep 19 10:47:15 2009
* Repository: http://github.com/c9s/cpan.vim
* Screencast: [cpan.vim](http://www.youtube.com/watch?v=erF0NWUIbr4)
* Keywords: perl , cpan , vim
FEATURES
* provide a quick way to search install cpan modules
* easily open module file or in new tab
* cpan module completion
* browser integration
INSTALL
To install cpan.vim , you need to install VIM::Packager
$ sudo cpan VIM::Pacakger
back to cpan.vim directory:
$ vim-packager build # this initialize makefile from meta file (VIMMETA)
$ make # this will install dependencies
$ make install # do install
or you can just copy vimlib/plugin/cpan.vim file to your ~/.vim/plugin/
directory.
and you will need to install those dependencies if you want to install manually:
libperl.vim
search-window.vim
RECOMMENDED SETTINGS
cpan.vim doesn't bind window key mapping for you by default. you need to config your settings by yourself.
nnoremap <silent> <C-c><C-m> :OpenCPANWindowS<CR>
nnoremap <silent> <C-c><C-v> :OpenCPANWindowSV<CR>
inoremap <C-x><C-m> <C-R>=CompleteCPANModuleList()<CR>
USAGE
CPAN Window:
- type `<C-c><C-m>` to open cpan window horizontally
type `<C-c><C-v>` to open cpan window vertically
- type pattern to search cpan modules
- press `<enter>` to go to the first matched module file.
- press `<C-t>` to go to the first matched module file in new tab.
- press @ to search module by current pattern in your browser
- support bash style bindings , eg: `<C-a>, <C-e>, <C-f>, <C-b>`
- press <Tab> to switch cpan window mode (search all modules or
installed modules)
- `<C-n> or <C-p>` to select result
- press <enter> to go to the module file.
- press t to go to the module file in new tab
- press @ to see the module documentation in your browser
- press ! to see the module documentation by perldoc command
- press $ to see the module documentation inside vim window
- press I to install the module
- support bash style bindings , eg: `<C-a>, <C-e>, <C-f>, <C-b>`
- `<ESC><ESC>` to close cpan window
Commands
- :ReloadModuleCache
- :ReloadInstalledModuleCache
- :ReloadCurrentLibModuleCache
Options
g:cpan_browser_command : command for launching browser
g:cpan_win_type : v (vertical) or s (horizontal) cpan window
g:cpan_win_width
g:cpan_win_height
g:cpan_win_mode : default cpan window mode
(search installed modules or all modules or currentlib ./lib)
g:cpan_max_result : max search result
g:cpan_install_command : command for installing cpan modules
g:cpan_user_defined_sources : user-defined package source paths
g:cpan_install_command = ''
g:cpan_browser_command = ''
g:cpan_win_mode = g:CPAN.Mode.Installed
g:cpan_win_type = 'vsplit' " v (vertical) or s (split)
g:cpan_win_width = 30
g:cpan_win_height = 10
g:cpan_max_result = 50
g:cpan_user_defined_sources = []

