diff options
| author | Vasilij Schneidermann <mail@vasilij.de> | 2017-10-03 08:18:59 +0200 |
|---|---|---|
| committer | Vasilij Schneidermann <mail@vasilij.de> | 2017-10-03 08:18:59 +0200 |
| commit | 5a9fd7233891da2508bde343e1cd7468b75c3800 (patch) | |
| tree | 71eb2cb22cce629f27718a78e54579e8974cf93f /evil-common.el | |
| parent | 427cf5faa57e8794ac93f594dc3d1972e687a25a (diff) | |
Escape parentheses and space characters properly
Diffstat (limited to 'evil-common.el')
| -rw-r--r-- | evil-common.el | 44 |
1 files changed, 22 insertions, 22 deletions
diff --git a/evil-common.el b/evil-common.el index c18280d..0a12e02 100644 --- a/evil-common.el +++ b/evil-common.el @@ -2545,13 +2545,13 @@ The tracked insertion is set to `evil-last-insertion'." (if (< (evil-column (line-end-position)) col) (move-to-column (+ col begextra) t) (move-to-column col t) - (insert (make-string begextra ? ))) + (insert (make-string begextra ?\s))) (remove-list-of-text-properties 0 (length text) yank-excluded-properties text) (insert text) (unless (eolp) ;; text follows, so we have to insert spaces - (insert (make-string endextra ? ))) + (insert (make-string endextra ?\s))) (setq epoint (point))) (forward-line 1))) (setq evil-last-paste @@ -3615,26 +3615,26 @@ transformations, usually `regexp-quote' or `replace-quote'." (cons repl str))))) (defconst evil-vim-regexp-replacements - '((?n . "\n") (?r . "\r") - (?t . "\t") (?b . "\b") - (?s . "[[:space:]]") (?S . "[^[:space:]]") - (?d . "[[:digit:]]") (?D . "[^[:digit:]]") - (?x . "[[:xdigit:]]") (?X . "[^[:xdigit:]]") - (?o . "[0-7]") (?O . "[^0-7]") - (?a . "[[:alpha:]]") (?A . "[^[:alpha:]]") - (?l . "[a-z]") (?L . "[^a-z]") - (?u . "[A-Z]") (?U . "[^A-Z]") - (?y . "\\s") (?Y . "\\S") - (?( . "\\(") (?) . "\\)") - (?{ . "\\{") (?} . "\\}") - (?[ . "[") (?] . "]") - (?< . "\\<") (?> . "\\>") - (?_ . "\\_") - (?* . "*") (?+ . "+") - (?? . "?") (?= . "?") - (?. . ".") - (?` . "`") (?^ . "^") - (?$ . "$") (?| . "\\|"))) + '((?n . "\n") (?r . "\r") + (?t . "\t") (?b . "\b") + (?s . "[[:space:]]") (?S . "[^[:space:]]") + (?d . "[[:digit:]]") (?D . "[^[:digit:]]") + (?x . "[[:xdigit:]]") (?X . "[^[:xdigit:]]") + (?o . "[0-7]") (?O . "[^0-7]") + (?a . "[[:alpha:]]") (?A . "[^[:alpha:]]") + (?l . "[a-z]") (?L . "[^a-z]") + (?u . "[A-Z]") (?U . "[^A-Z]") + (?y . "\\s") (?Y . "\\S") + (?\( . "\\(") (?\) . "\\)") + (?{ . "\\{") (?} . "\\}") + (?\[ . "[") (?\] . "]") + (?< . "\\<") (?> . "\\>") + (?_ . "\\_") + (?* . "*") (?+ . "+") + (?? . "?") (?= . "?") + (?. . ".") + (?` . "`") (?^ . "^") + (?$ . "$") (?| . "\\|"))) (defconst evil-regexp-magic "[][(){}<>_dDsSxXoOaAlLuUwWyY.*+?=^$`|nrtb]") |
