2 ms·
Here's an emacs yas-snippet that does the same thing (and was inspired by yours) # -*- mode: snippet -*- # name: Piped Inspect # key: pin # --
by bostonvaulter2 5y ago
Here's an emacs yas-snippet that does the same thing (and was inspired by yours)
# -*- mode: snippet -*-
# name: Piped Inspect
# key: pin
# --
|> IO.inspect(label: "$2$1 (`(buffer-name)`:`(line-number-at-pos))`)")
I also like to use a non-piped version:
# -*- mode: snippet -*-
# name: Labeled Inspect
# key: lin
# --
IO.inspect($1, label: "$2$1 (`(buffer-name)`:`(line-number-at-pos))`)")
And occasionally a logger-based one:
# -*- mode: snippet -*-
# name: Logger Inspect
# key: logi
# --
Logger.info("$2$1: #{inspect($1)}")