2017-06-06 22:50:49 +00:00
#+TITLE : Perl5 layer
2019-05-07 08:53:56 +00:00
#+TAGS : general|layer|multi-paradigm|programming
2019-05-05 17:26:40 +00:00
2017-06-06 22:50:49 +00:00
[[file:img/perl5.png ]]
2019-05-07 20:05:06 +00:00
* Table of Contents :TOC_5_gh:noexport:
2017-06-06 22:50:49 +00:00
- [[#description ][Description ]]
2017-08-06 02:14:10 +00:00
- [[#features ][Features: ]]
2017-06-06 22:50:49 +00:00
- [[#install ][Install ]]
- [[#layer ][Layer ]]
2017-10-02 18:17:50 +00:00
- [[#auto-completion-plsense ][Auto-completion: PlSense ]]
2018-12-05 03:03:03 +00:00
- [[#key-bindings ][Key bindings ]]
2017-06-24 21:17:56 +00:00
- [[#perldoc ][Perldoc ]]
- [[#pod-and-here-doc ][POD and HERE doc ]]
- [[#find-symbol ][Find Symbol ]]
2018-05-24 02:12:30 +00:00
- [[#formatting-code ][Formatting Code ]]
2017-06-06 22:50:49 +00:00
* Description
This layer adds support for the Perl5 language.
2017-08-06 02:14:10 +00:00
** Features:
2017-10-02 18:17:50 +00:00
- Syntactic and semantic checking using [[https://github.com/flycheck/flycheck ][flycheck ]]
- Auto-completion using [[https://github.com/CeleritasCelery/company-plsense ][company-plsense ]]
- Format code with =perltidy=
- Jump to symbol definition
2017-07-18 21:54:00 +00:00
- Interactive debug via [[https://github.com/realgud/realgud ][realgud ]] with [[http://search.cpan.org/~rocky/Devel-Trepan-0.73/lib/Devel/Trepan.pm ][trepan.pl ]]
2017-06-06 22:50:49 +00:00
* Install
** Layer
To use this configuration layer, add it to your =~/.spacemacs= . You will need to
add =perl5= to the existing =dotspacemacs-configuration-layers= list in this
file.
2017-06-24 21:17:56 +00:00
2017-10-02 18:17:50 +00:00
** Auto-completion: PlSense
=company-plsense= requires installation of the =plsense= server from [[https://github.com/aki2o/plsense#install ][here ]].
2018-12-05 03:03:03 +00:00
* Key bindings
2017-06-24 21:17:56 +00:00
** Perldoc
2018-05-24 02:12:30 +00:00
Browse formatted perldocs.
2017-06-24 21:17:56 +00:00
2018-12-05 03:03:03 +00:00
| Key binding | Description |
2017-06-24 21:17:56 +00:00
|-------------+---------------------------------|
2017-10-02 18:17:50 +00:00
| ~SPC m h h~ | view perldoc of symbol at point |
2017-06-24 21:17:56 +00:00
| ~SPC m h d~ | view perldoc of any symbol |
** POD and HERE doc
2017-10-02 18:17:50 +00:00
Select a POD or HERE doc.
2017-06-24 21:17:56 +00:00
2018-12-05 03:03:03 +00:00
| Key binding | Description |
2017-06-24 21:17:56 +00:00
|-------------+----------------------------------------|
| ~SPC m v~ | select entire POD or HERE doc at point |
** Find Symbol
2017-10-02 18:17:50 +00:00
Jump to symbol definition.
2017-06-24 21:17:56 +00:00
2018-12-05 03:03:03 +00:00
| Key binding | Description |
2017-06-24 21:17:56 +00:00
|-------------+-------------------------------------------|
| ~SPC m g g~ | jump to symbol definition |
| ~SPC m g G~ | jump to symbol definition in other window |
2017-10-02 18:17:50 +00:00
2018-05-24 02:12:30 +00:00
** Formatting Code
2017-10-02 18:17:50 +00:00
2018-12-05 03:03:03 +00:00
| Key binding | Description |
2017-10-02 18:17:50 +00:00
|-------------+-------------------------------|
| ~SPC m = =~ | format current line or region |
| ~SPC m = b~ | format current buffer |
| ~SPC m = f~ | format current function |