In Vim, I often move lines by deleting them (either using ddor in visual line mode), moving the cursor to a new position, then pto insert them:
dd
p
first second third
And if my cursor is on the second line, I can use ddpto move it down:
ddp
first third second
But with Emacs + Evil mode, line wrapping does not work as expected: if, for example, my cursor is at I in the third, when I click p, I get:
first thisecondrd
How can I get Emacs + Evil mode to insert new lines when placing whole pulled lines?
C-a, (^ , ), , . , , , yank, , . ( , ?)
, , transpose-lines (Cx Ct Emacs - - xtl - https://github.com/syl20bnr/spacemacs/blob/master/my-keybindings.el).
, , , C-a C-k C-k C-a C-space C-n C-w ( , C-k, C-n, C-n ), , C-y yank.
C-a
C-k
C-space
C-n
C-w
C-y
, Emacs , . vi, C-f , ; backspace ; . , . , Emacs , , , vi - , , - , , , , .
C-f
, , ( , " Emacs + Evil mode " ), move-text.
move-text
, (move-text-up move-text-down) . ; - , .
move-text-up
move-text-down
, move-line-down ( second):
move-line-down
second
first line second| line third line
first line third line second| line
, ( ) n , .
n
M-up M-down ,
(define-key evil-normal-state-map "mu" 'move-line-up) (define-key evil-normal-state-map "md" 'move-line-down)
move-text package-install MELPA.
package-install
Source: https://habr.com/ru/post/1537975/More articles:Проверка правильности немодельного ввода - validationfabricjs: how to resize a frame after a clip image - fabricjsCombining pandas data using date as index - pythonThis web container is not running @Glassfish 4.0.01 web - restRunning preg_replace in html code too long - htmlHow can I pass an object that can implement an object? - interfaceHow to get all urls from a page (php) - phphttps://translate.googleusercontent.com/translate_c?depth=1&pto=aue&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1537978/how-can-i-ask-emacs-to-use-different-tags-for-different-source-files&usg=ALkJrhgYz1DlDWamNt-peodUG2qD4FVBKAне работает - htmlhttps://translate.googleusercontent.com/translate_c?depth=1&pto=aue&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1537980/propagate-qml-events-to-c&usg=ALkJrhhLCaj9gnDmb2QDJ63-ARI4uwPdtwAll Articles