Move p4 package to perforce layer

This commit is contained in:
syl20bnr 2014-12-14 00:15:47 -05:00
parent f4b97397dc
commit d8322872b7
5 changed files with 70 additions and 35 deletions

View file

@ -0,0 +1,50 @@
# Perforce contribution layer for Spacemacs
![logo](p4.png)
<!-- markdown-toc start - Don't edit this section. Run M-x markdown-toc/generate-toc again -->
**Table of Contents**
- [Perforce contribution layer for Spacemacs](#perforce-contribution-layer-for-spacemacs)
- [Description](#description)
- [Install](#install)
- [Key bindings](#key-bindings)
<!-- markdown-toc end -->
## Description
This layers adds support for [Perforce][] (p4).
## Install
To use this contribution add it to your `~/.spacemacs`
```elisp
(setq-default dotspacemacs-configuration-layers '(perforce)
"List of contribution to load."
)
```
You'll have to install the `p4`` command line, [download page][].
Don't forget to setup the environment variables:
- `P4_PORT`
- `P4_CLIENT`
- `P4_USER`
- `P4_PASSWD`
## Key bindings
Key Binding | Description
---------------------|------------------------------------------------------------
<kbd>SPC p 4 a</kbd> | add a file in depot
<kbd>SPC p 4 d</kbd> | delete a file in depot
<kbd>SPC p 4 D</kbd> | p4-describe
<kbd>SPC p 4 e</kbd> | checkout a file
<kbd>SPC p 4 r</kbd> | rename a file
<kbd>SPC p 4 R</kbd> | revert a file
<kbd>SPC p 4 S</kbd> | submit CL
[Perforce]: http://www.perforce.com/
[download page]: http://www.perforce.com/downloads

BIN
contrib/perforce/p4.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

View file

@ -0,0 +1,20 @@
(defvar git-packages '(p4)
"List of all packages to install and/or initialize. Built-in packages
which require an initialization must be listed explicitly in the list.")
(defun spacemacs/init-p4 ()
(use-package p4
:commands (p4-add
p4-delete
p4-describe
p4-edit
p4-revert)
:init
(evil-leader/set-key
"p4a" 'p4-add
"p4d" 'p4-delete
"p4D" 'p4-describe
"p4e" 'p4-edit
"p4R" 'p4-revert
"p4r" 'p4-rename
"p4S" 'p4-submit)))

View file

@ -100,10 +100,6 @@
- [Regular normal state bindings](#regular-normal-state-bindings)
- [Lisp specific bindings](#lisp-specific-bindings)
- [Project management](#project-management)
- [Working with Git](#working-with-git)
- [Magit](#magit)
- [Quick guide for recurring use cases in Magit](#quick-guide-for-recurring-use-cases-in-magit)
- [Git gutter bitmaps](#git-gutter-bitmaps)
- [Registers](#registers)
- [Errors handling](#errors-handling)
- [Compiling](#compiling)
@ -112,7 +108,6 @@
- [Experimental Helm feature](#experimental-helm-feature)
- [Ledger](#ledger)
- [Org](#org)
- [Perforce](#perforce)
- [Python](#python)
- [JavaScript](#javascript)
- [rcirc](#rcirc)
@ -1711,18 +1706,6 @@ In `org`, [evil-org-mode][] is activated.
<kbd>M-o</kbd> | org-insert-heading+org-metaright
<kbd>M-t</kbd> | org-insert-todo-heading nil+ org-metaright
### Perforce
Key Binding | Description
---------------------------|------------------------------------------------------------
<kbd>SPC p 4 a</kbd> | add a file in depot
<kbd>SPC p 4 d</kbd> | delete a file in depot
<kbd>SPC p 4 D</kbd> | p4-describe
<kbd>SPC p 4 e</kbd> | checkout a file
<kbd>SPC p 4 r</kbd> | rename a file
<kbd>SPC p 4 R</kbd> | revert a file
<kbd>SPC p 4 S</kbd> | submit CL
### Python
Writing python code with spacemacs is supported by python contribution. Please see

View file

@ -73,7 +73,6 @@
org-bullets
;; annoying error message, disable it for now
;; org-trello
p4
page-break-lines
paradox
popup
@ -1402,23 +1401,6 @@ determine the state to enable when escaping from the insert state.")
(define-key org-agenda-mode-map "j" 'org-agenda-next-line)
(define-key org-agenda-mode-map "k" 'org-agenda-previous-line))))
(defun spacemacs/init-p4 ()
(use-package p4
:commands (p4-add
p4-delete
p4-describe
p4-edit
p4-revert)
:init
(evil-leader/set-key
"p4a" 'p4-add
"p4d" 'p4-delete
"p4D" 'p4-describe
"p4e" 'p4-edit
"p4R" 'p4-revert
"p4r" 'p4-rename
"p4S" 'p4-submit)))
(defun spacemacs/init-page-break-lines ()
(use-package page-break-lines
:init