简体   繁体   中英

how to deal with EMACS paste cascading

when I paste something into EMACS, like "Ctrl+V" then right mouse click into the EMACS screen, I frequently enter into this cascaded result

|  Xxxxxxx |  Xxxxxxx |  Xxxxxxx |     Xxxxxxx |
    |    10    |    39    |       Xxxxxxx  |    -1.0000     |
        |    10    |    51    |       Xxxxxxx |  -100001.0000  |
            |    10    |    55    |       Xxxxxxx |   -1000.0000   |
                |    10    |   407    |       Xxxxxxx |  -10000.0000   |
                    |    10    |   717    |       Xxxxxxx |    -10.0000    |

so I have to move cursor into each line and press "=" to align them

|  Xxxxxxx |  Xxxxxxx |       Xxxxxxx |     Xxxxxxx |
|    10    |    39    |       Xxxxxxx |    -1.0000     |
|    10    |    51    |       Xxxxxxx |  -100001.0000  |
|    10    |    55    |       Xxxxxxx |   -1000.0000   |

there should be a much quicker way, isn't it ?

My guess is that you're inserting this text into an Emacs that's running inside a terminal emulator rather than as an X11/GUI application. So the text you're inserting looks to Emacs like you're typing it at the keyboard, so all the line breaks are received by Emacs in the form of LF characters, which are ASCII chars also known in Emacs parlance as Cj , which is bound by default to newline-and-indent . So you can circumvent this annoying effect with (global-set-key [?\\Cj] 'newline) or you can switch to running Emacs as a GUI application.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM