Skip to content

Commit

Permalink
Move lorem ipsum to SPC x i l and declare prefixes
Browse files Browse the repository at this point in the history
This a rarely used key binding so we can nest it a little bit more and
free some key bindings in the `text insert` namespace.
  • Loading branch information
syl20bnr committed Nov 3, 2015
1 parent 5f7c3d0 commit 34ce7a0
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 35 deletions.
62 changes: 31 additions & 31 deletions doc/DOCUMENTATION.org
Original file line number Diff line number Diff line change
Expand Up @@ -2106,37 +2106,37 @@ adding a major-mode to the variable =spacemacs-indent-sensitive-modes= in your
*** Text manipulation commands
Text related commands (start with ~x~):

| Key Binding | Description |
|-------------+---------------------------------------------------------------|
| ~SPC x o~ | use avy to select a link in the buffer and open it |
| ~SPC x u~ | set the selected text to lower case |
| ~SPC x U~ | set the selected text to upper case |
| ~SPC x a a~ | align region (or guessed section) using default rules |
| ~SPC x a r~ | align region using user-specified regexp |
| ~SPC x a m~ | align region at arithmetic operators (+-*/) |
| ~SPC x a .~ | align region at . (for numeric tables) |
| ~SPC x a ,~ | align region at , |
| ~SPC x a ;~ | align region at ; |
| ~SPC x a =~ | align region at = |
| ~SPC x a &~ | align region at & |
| ~SPC x a ¦~ | align region at ¦ |
| ~SPC x c~ | count the number of chars/words/lines in the selection region |
| ~SPC x d w~ | delete trailing whitespaces |
| ~SPC x g l~ | set languages used by translate commands |
| ~SPC x g t~ | translate current word using Google Translate |
| ~SPC x g T~ | reverse source and target languages |
| ~SPC x i l~ | insert lorem-ipsum list |
| ~SPC x i p~ | insert lorem-ipsum paragraph |
| ~SPC x i s~ | insert lorem-ipsum sentence |
| ~SPC x J~ | move down a line of text (enter micro-state) |
| ~SPC x K~ | move up a line of text (enter micro-state) |
| ~SPC x l s~ | sort lines |
| ~SPC x l u~ | uniquify lines |
| ~SPC x t c~ | swap (transpose) the current character with the previous one |
| ~SPC x t w~ | swap (transpose) the current word with the previous one |
| ~SPC x t l~ | swap (transpose) the current line with the previous one |
| ~SPC x w c~ | count the number of occurrences per word in the select region |
| ~SPC x w d~ | show dictionary entry of word from wordnik.com |
| Key Binding | Description |
|---------------+---------------------------------------------------------------|
| ~SPC x o~ | use avy to select a link in the buffer and open it |
| ~SPC x u~ | set the selected text to lower case |
| ~SPC x U~ | set the selected text to upper case |
| ~SPC x a a~ | align region (or guessed section) using default rules |
| ~SPC x a r~ | align region using user-specified regexp |
| ~SPC x a m~ | align region at arithmetic operators (+-*/) |
| ~SPC x a .~ | align region at . (for numeric tables) |
| ~SPC x a ,~ | align region at , |
| ~SPC x a ;~ | align region at ; |
| ~SPC x a =~ | align region at = |
| ~SPC x a &~ | align region at & |
| ~SPC x a ¦~ | align region at ¦ |
| ~SPC x c~ | count the number of chars/words/lines in the selection region |
| ~SPC x d w~ | delete trailing whitespaces |
| ~SPC x g l~ | set languages used by translate commands |
| ~SPC x g t~ | translate current word using Google Translate |
| ~SPC x g T~ | reverse source and target languages |
| ~SPC x i l l~ | insert lorem-ipsum list |
| ~SPC x i l p~ | insert lorem-ipsum paragraph |
| ~SPC x i l s~ | insert lorem-ipsum sentence |
| ~SPC x J~ | move down a line of text (enter micro-state) |
| ~SPC x K~ | move up a line of text (enter micro-state) |
| ~SPC x l s~ | sort lines |
| ~SPC x l u~ | uniquify lines |
| ~SPC x t c~ | swap (transpose) the current character with the previous one |
| ~SPC x t w~ | swap (transpose) the current word with the previous one |
| ~SPC x t l~ | swap (transpose) the current line with the previous one |
| ~SPC x w c~ | count the number of occurrences per word in the select region |
| ~SPC x w d~ | show dictionary entry of word from wordnik.com |

*** Searching and inserting Unicode characters
You can very easily search for and insert Unicode characters into the
Expand Down
1 change: 1 addition & 0 deletions layers/+distribution/spacemacs-base/config.el
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@
("xa" "align")
("xd" "delete")
("xg" "google-translate")
("xi" "insert")
("xl" "lines")
("xm" "move")
("xt" "transpose")
Expand Down
10 changes: 6 additions & 4 deletions layers/+distribution/spacemacs/packages.el
Original file line number Diff line number Diff line change
Expand Up @@ -1472,10 +1472,12 @@ It will toggle the overlay under point or create an overlay of one character."
lorem-ipsum-insert-paragraphs
lorem-ipsum-insert-sentences)
:init
(evil-leader/set-key
"xil" 'lorem-ipsum-insert-list
"xip" 'lorem-ipsum-insert-paragraphs
"xis" 'lorem-ipsum-insert-sentences)))
(progn
(spacemacs/declare-prefix "xil" "lorem ipsum")
(evil-leader/set-key
"xill" 'lorem-ipsum-insert-list
"xilp" 'lorem-ipsum-insert-paragraphs
"xils" 'lorem-ipsum-insert-sentences))))

(defun spacemacs/init-move-text ()
(use-package move-text
Expand Down

0 comments on commit 34ce7a0

Please sign in to comment.