4 ms·
Doesn't sound crazy at all to me! I do this all the time using multiline editing in Sublime Text. It's the one part of a more modern IDE I have a hard time gi
by quickpost 7y ago
Doesn't sound crazy at all to me! I do this all the time using multiline editing in Sublime Text. It's the one part of a more modern IDE I have a hard time giving up (transitioning to Spacemacs currently). Will have to try out this script and see if it helps bridge the gap!
- brlewis 7y agoIf emacs keyboard macros haven't bridged the gap for you, try https://github.com/magnars/multiple-cursors.el https://github.com/magnars/multiple-cursors.el Keyboard macros: https://www.emacswiki.org/emacs/KeyboardMacros https://www.emacswiki.org/emacs/KeyboardMacros
- MultusSalus 7y agoI’ve been using this for a few things, and while it’s a little more unwieldy than Sublime’s it works fine for most of my uses so I’d definitely recommend giving it a go.
- quickpost 7y agoPerfect - I'll try this out. Thanks for helping me out despite my newby-ness!
- numlocked 7y agomultiple-cursors is AMAZING and i use it all the time, but it does NOT work well for more than a few hundred lines of text. It gets incredibly slow.
- eterm 7y agoI tend to do it in sublime with a regex: Find/replace all: ^(.*)$\n with "$1",
- useragent86 7y agoThat also works well in Emacs: C-M-% runs the command query-replace-regexp (found in global-map), which is an interactive compiled Lisp function in ‘replace.el’. It is bound to C-M-%, <menu-bar> <edit> <replace> <query-replace-regexp>. (query-replace-regexp REGEXP TO-STRING &optional DELIMITED START END BACKWARD REGION-NONCONTIGUOUS-P) Replace some things after point matching REGEXP with TO-STRING. As each match is found, the user must type a character saying what to do with it. For directions, type <help> at that time.