Skip to content

Instantly share code, notes, and snippets.

@smandy
Created January 31, 2013 15:01
Show Gist options
  • Save smandy/4683427 to your computer and use it in GitHub Desktop.
Save smandy/4683427 to your computer and use it in GitHub Desktop.
(defun current-csv-length () (interactive)
( let (
( myStr (thing-at-point 'line ))
)
(message (number-to-string (length (split-string myStr ","))))
)
)
(defun message-current-para () (interactive)
(message (thing-at-point 'paragraph))
)
(defun csv-current-line () (interactive)
(let ( ( myStr (thing-at-point 'line)) )
(message (prin1-to-string (split-string myStr ",")))
) )
(global-set-key (kbd "M-O p") 'current-csv-length)
(global-set-key (kbd "M-O n") 'csv-current-line)
(global-set-key (kbd "M-O w") 'message-current-para)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment