From fe9de0afd8627617cc924d6043bb024b0858c3ef Mon Sep 17 00:00:00 2001 From: Fabian Wilk Date: Sun, 23 Apr 2017 13:01:34 -0400 Subject: [PATCH] Add key binding SPC d w SPC for built-in commnand just-one-space --- doc/DOCUMENTATION.org | 102 +++++++++--------- .../spacemacs-base/keybindings.el | 3 +- 2 files changed, 53 insertions(+), 52 deletions(-) diff --git a/doc/DOCUMENTATION.org b/doc/DOCUMENTATION.org index f4d7ceced..0739de016 100644 --- a/doc/DOCUMENTATION.org +++ b/doc/DOCUMENTATION.org @@ -1930,6 +1930,7 @@ The ~SPC j~ prefix is for jumping, joining and splitting. | ~J~ | join the current line with the next line | | ~SPC j k~ | go to next line and indent it using auto-indent rules | | ~SPC j n~ | split the current line at point, insert a new line and auto-indent | +| ~SPC j o~ | split the current line at point but let point on current line | | ~SPC j s~ | split a quoted string or s-expression in place | | ~SPC j S~ | split a quoted string or s-expression, insert a new line and auto-indent | @@ -2634,56 +2635,57 @@ 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 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 a {~ | align region at { | -| ~SPC x a }~ | align region at } | -| ~SPC x a ​,​~ | align region at , | -| ~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 a~ | align region (or guessed section) using default rules | -| ~SPC x a c~ | align current indentation region 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 ¦ | -| ~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 i~ | cycle symbol naming styles | -| ~SPC x i u~ | change symbol style to ~under_score~ | -| ~SPC x i U~ | change symbol style to ~UP_CASE~ | -| ~SPC x i k~ | change symbol style to ~kebab-case~ | -| ~SPC x i c~ | change symbol style to ~lowerCamelCase~ | -| ~SPC x i C~ | change symbol style to ~UpperCamelCase~ | -| ~SPC x j c~ | set the justification to center | -| ~SPC x j f~ | set the justification to full | -| ~SPC x j l~ | set the justification to left | -| ~SPC x j n~ | set the justification to none | -| ~SPC x j r~ | set the justification to right | -| ~SPC x J~ | move down a line of text (enter transient state) | -| ~SPC x K~ | move up a line of text (enter transient state) | -| ~SPC x l d~ | duplicate line or region | -| ~SPC x l s~ | sort lines | -| ~SPC x l u~ | uniquify lines | -| ~SPC x o~ | use avy to select a link in the frame and open it | -| ~SPC x O~ | use avy to select multiple links in the frame and open them | -| ~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 u~ | set the selected text to lower case | -| ~SPC x U~ | set the selected text to upper case | -| ~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 | -| ~SPC x TAB~ | indent or dedent a region rigidly | +| Key Binding | Description | +|---------------+---------------------------------------------------------------| +| ~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 a {~ | align region at { | +| ~SPC x a }~ | align region at } | +| ~SPC x a ​,​~ | align region at , | +| ~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 a~ | align region (or guessed section) using default rules | +| ~SPC x a c~ | align current indentation region 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 ¦ | +| ~SPC x c~ | count the number of chars/words/lines in the selection region | +| ~SPC x d w~ | delete trailing whitespaces | +| ~SPC x d SPC~ | Delete all spaces and tabs around point, leaving one space | +| ~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 i~ | cycle symbol naming styles | +| ~SPC x i u~ | change symbol style to ~under_score~ | +| ~SPC x i U~ | change symbol style to ~UP_CASE~ | +| ~SPC x i k~ | change symbol style to ~kebab-case~ | +| ~SPC x i c~ | change symbol style to ~lowerCamelCase~ | +| ~SPC x i C~ | change symbol style to ~UpperCamelCase~ | +| ~SPC x j c~ | set the justification to center | +| ~SPC x j f~ | set the justification to full | +| ~SPC x j l~ | set the justification to left | +| ~SPC x j n~ | set the justification to none | +| ~SPC x j r~ | set the justification to right | +| ~SPC x J~ | move down a line of text (enter transient state) | +| ~SPC x K~ | move up a line of text (enter transient state) | +| ~SPC x l d~ | duplicate line or region | +| ~SPC x l s~ | sort lines | +| ~SPC x l u~ | uniquify lines | +| ~SPC x o~ | use avy to select a link in the frame and open it | +| ~SPC x O~ | use avy to select multiple links in the frame and open them | +| ~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 u~ | set the selected text to lower case | +| ~SPC x U~ | set the selected text to upper case | +| ~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 | +| ~SPC x TAB~ | indent or dedent a region rigidly | *** Text insertion commands Text insertion commands (start with ~i~): diff --git a/layers/+distributions/spacemacs-base/keybindings.el b/layers/+distributions/spacemacs-base/keybindings.el index 42f768aed..6952d11c3 100644 --- a/layers/+distributions/spacemacs-base/keybindings.el +++ b/layers/+distributions/spacemacs-base/keybindings.el @@ -218,8 +218,6 @@ "ik" 'spacemacs/evil-insert-line-above "ij" 'spacemacs/evil-insert-line-below) ;; format --------------------------------------------------------------------- -;; `SPC j k' key binding for a frequent action: go and indent line below the point -;; `SPC J' split the current line at point and indent it (spacemacs/set-leader-keys "jo" 'open-line "j=" 'spacemacs/indent-region-or-buffer @@ -438,6 +436,7 @@ "xar" 'spacemacs/align-repeat "xa|" 'spacemacs/align-repeat-bar "xc" 'count-region + "xd SPC" 'just-one-space "xdw" 'delete-trailing-whitespace "xjc" 'set-justification-center "xjf" 'set-justification-full