pde.el try to integrate other libraies to cperl-mode.
First it rearrange key bindings. Some cperl-mode default key bindings
are remap to pde-cperl-map
, so more key bindings can be add to
cperl-mode-map.
cperl-toggle-electric
- Toggle the state of parentheses
doubling in CPerl mode.
cperl-linefeed
- Go to end of line, open a new line and indent
appropriately.
cperl-narrow-to-here-doc
- Narrows editing region to the
HERE-DOC at pos.
cperl-pod-spell
- Spell-check POD documentation.
cperl-invert-if-unless
- Change `if (A) {B}' into `B if A;' etc
(or visa versa) if possible.
cperl-next-interpolated-REx
- Move point to next REx which has
interpolated parts.
cperl-next-interpolated-REx-0
- Move point to next REx which
has interpolated parts without //o.
cperl-next-interpolated-REx-1
- Move point to next REx which
has interpolated parts without //o.
pde-imenu-tree
- Display tree view of imenu.
pde-pod-to-manpage
- View pod in current buffer using woman.
pde-perldoc-tree
- Display pod tree.
perltidy-buffer
- Call perltidy for whole buffer.
perltidy-region
- Tidy perl code in the region.
perltidy-subroutine
- Call perltidy for subroutine at point.
perltidy-dwim
- Perltidy Do What I Mean.
If with prefix argument, just show the result of perltidy.
You can use C-x C-s to save the tidy result.
If region is active call perltidy on the region. If inside
subroutine, call perltidy on the subroutine, otherwise call
perltidy for whole buffer.
inf-perl-send
- If mark active, send region, otherwise send current line
inf-perl-send-line
- Send current line to the perl process.
inf-perl-load-file
- Send whole buffer to process
inf-perl-send-region
- Send region to process.
inf-perl-set-cwd
- Set working directory of interpreter to
current default-directory
inf-perl-send-region-and-go
- Send region and switch to process
buffer
inf-perl-switch-to-perl
- Switch to perl process buffer.
inf-perl-switch-to-end-perl
- Switch to end of perl process buffer.
tabbar-mode can make a tabbar for all buffers. I prefer using ido-mode to switch between buffers. But here I want add a tabbar for a few buffers to group them and make emacs looks like IDE. So that why tabbar-x. See tabbar-x.
ffap is a good command. To use it in cperl-mode to find perl module, need some hack.
indent-region need to mark a region. Not very convenient. So I write a dwim command.
Indent the region between paren. If region selected, indent the region. If character before is a parenthesis(such as "]})>"), indent the region between the parentheses. Useful when you finish a subroutine or a block. Otherwise indent current subroutine. Selected by beginning-of-defun and end-of-defun.
Settings after cperl-mode is loaded or only for buffer that major-mode
is cperl-mode are defined in pde-perl-mode-hook
Hooks to run when enter cperl-mode. It define a new style “PDE”, turn on display information of function on echo area, turn abbrev-mode on, activate perldoc, auto chmod when save perl script but not module or pod, and bind keys.
This key bindings are added:
flymake-mode
- Minor mode to do on-the-fly syntax checking.
perldb-ui
- Debugger with perldb-ui.
run-perl
- Start or switch to interactive perl shell.
The old C-c C-h commands are removed, and make
describe-prefix-bindings work. If you realy need them,
define them in pde-cperl-map
.