diff --git a/contrib/perforce/README.md b/contrib/perforce/README.md new file mode 100644 index 000000000..24108f27b --- /dev/null +++ b/contrib/perforce/README.md @@ -0,0 +1,50 @@ +# Perforce contribution layer for Spacemacs + +![logo](p4.png) + + +**Table of Contents** + +- [Perforce contribution layer for Spacemacs](#perforce-contribution-layer-for-spacemacs) + - [Description](#description) + - [Install](#install) + - [Key bindings](#key-bindings) + + + +## 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 +---------------------|------------------------------------------------------------ +SPC p 4 a | add a file in depot +SPC p 4 d | delete a file in depot +SPC p 4 D | p4-describe +SPC p 4 e | checkout a file +SPC p 4 r | rename a file +SPC p 4 R | revert a file +SPC p 4 S | submit CL + +[Perforce]: http://www.perforce.com/ +[download page]: http://www.perforce.com/downloads diff --git a/contrib/perforce/p4.png b/contrib/perforce/p4.png new file mode 100644 index 000000000..cbaaf0574 Binary files /dev/null and b/contrib/perforce/p4.png differ diff --git a/contrib/perforce/packages.el b/contrib/perforce/packages.el new file mode 100644 index 000000000..935ca51ab --- /dev/null +++ b/contrib/perforce/packages.el @@ -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))) diff --git a/doc/DOCUMENTATION.md b/doc/DOCUMENTATION.md index b6993c78f..5a74a56f1 100644 --- a/doc/DOCUMENTATION.md +++ b/doc/DOCUMENTATION.md @@ -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. M-o | org-insert-heading+org-metaright M-t | org-insert-todo-heading nil+ org-metaright -### Perforce - - Key Binding | Description ----------------------------|------------------------------------------------------------ -SPC p 4 a | add a file in depot -SPC p 4 d | delete a file in depot -SPC p 4 D | p4-describe -SPC p 4 e | checkout a file -SPC p 4 r | rename a file -SPC p 4 R | revert a file -SPC p 4 S | submit CL - ### Python Writing python code with spacemacs is supported by python contribution. Please see diff --git a/spacemacs/packages.el b/spacemacs/packages.el index a274d2b46..917e9275f 100644 --- a/spacemacs/packages.el +++ b/spacemacs/packages.el @@ -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