Skip to content

Instantly share code, notes, and snippets.

@ionling
Created April 29, 2021 11:43
Show Gist options
  • Save ionling/9fa34d6df14b295a0b28dd2ea83e117f to your computer and use it in GitHub Desktop.
Save ionling/9fa34d6df14b295a0b28dd2ea83e117f to your computer and use it in GitHub Desktop.
Emacs golines wrapper
;; Require golines tool.
;; See https://github.com/segmentio/golines
(defun v-go-shorten-lines ()
"Shorten long lines in current file."
(interactive)
(save-buffer)
(shell-command
(format "golines --no-reformat-tags -m %s -w %s"
fill-column buffer-file-name)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment