I confess, I'm an avid emacs user. Here are some modifications to my .emacs file. I will occasionally post new functions as I stumble upon them or write them.
;; Copies line and appends buffer name to the front of it ;; used in checking the Charniak/Gomez parsers ;; add this to your .emacs file (defun copy-line-with-filename (n) "Copy N lines at point to the kill-ring, and prepends with buffer-name." (interactive "p") (kill-ring-save (line-beginning-position) (line-beginning-position (1+ n))) (kill-append (concat (buffer-name) ": ") '1)) (global-set-key "\C-ck" 'copy-line-with-filename)
wcin the path
(defun word-count nil "Count words in buffer" (interactive) (shell-command-on-region (point-min) (point-max) "wc -w"))