From f5afd6d68d926a929803ae2a07fdc7b232d6cfdc Mon Sep 17 00:00:00 2001 From: Ivan Malison Date: Tue, 30 Jun 2015 09:31:37 -0700 Subject: [PATCH] imalison:console-log-unique --- dotfiles/emacs.d/init.el | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/dotfiles/emacs.d/init.el b/dotfiles/emacs.d/init.el index 3e317ec0..7bd81ed1 100644 --- a/dotfiles/emacs.d/init.el +++ b/dotfiles/emacs.d/init.el @@ -1678,6 +1678,13 @@ window is active in the perspective." (("C-c b" . web-beautify-js)) :init (progn + (setq imalison:identifier-count 0) + (defun imalison:console-log-unique () + (interactive) + (let* ((string-identifier (int-to-string imalison:identifier-count)) + (identifier-string (cl-loop for i from 0 to 30 concat string-identifier))) + (insert (format "console.log('//////////%s//////////')" identifier-string)) + (setq imalison:identifier-count (+ imalison:identifier-count 1)))) (setq js2-bounce-indent-p nil js2-basic-offset 4 js2-indent-level 4