Quantcast
Channel: Block editing *live* in Emacs or Vim - Unix & Linux Stack Exchange
Viewing all articles
Browse latest Browse all 5

Answer by Tom for Block editing *live* in Emacs or Vim

$
0
0

For example, I'd like to remove the N first characters of each line, but the first and last lines contain less than N characters.

Emacs: start selection at the first line and simply add the missing number of characters (e.g. spaces) to the last line and then use kill-rectangle

Alternatively, see artist-mode or picture-mode which allow you to freely move in the window regardless of line lengths.

Paste block inline

Emacs: First save the block by either kill-rectangle or saving it to a register, then go to the insertion point, use delete-rectangle and then insert the saved rectangle.

looks like a 400+ lines plugin is necessary

In case of Emacs why is it a problem? A plugin can be compiled and the emacs philosophy is you don't put everything into the core, but use plugins to extend the editor.


Viewing all articles
Browse latest Browse all 5

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>