Emacs: Insert A to Z Vertically 🚀

By Xah Lee. Date: . Last updated: .

Here's a command that inserts letters a to z, vertically in a column. It can also insert any sequence of Unicode characters.

(defun xah-insert-column-az ()
  "Insert letters A to Z vertically, similar to `rectangle-number-lines'.
The commpand will prompt for a start char, and number of chars to insert.
The start char can be any char in Unicode.

URL `http://xahlee.info/emacs/emacs/emacs_insert-alphabets.html'
Version: 2013-06-12 2019-03-07"
  (let (
        (xstartChar (string-to-char (read-string "Start char: " "a")))
        (xhowmany (string-to-number (read-string "How many: " "26")))
        (xcolpos (- (point) (line-beginning-position))))
    (dotimes (xi xhowmany )
        (insert-char (+ xi xstartChar))
        (forward-char xcolpos)))))

Emacs, Comment, Uncomment, Rectangle Edit