[CrackMonkey] emacs vs. vim

Aaron Lehmann aaronl at vitelus.com
Tue Apr 24 00:26:01 PDT 2001


	" ^* characters are representative of control characters of course
	autocmd BufRead *.c,*.h map gc :s/[^ \t]//gc^Mqi/* ^[A */^[0j
	autocmd BufRead *.c,*.h map ^U :set nows^M$?\/\* *^M:s,/\* *,,^M0/ \=\*\/^M:s, \=\*/,,^M:set ws^Mj

(I just indented that with >}j ! beaujolais!)

I challenged myself to write a macro to insert a C comment, and one to
uncomment the current one under the cursor.

This would be SO MUCH EASIER in Emacs-Lisp. And it wouldn't look like
line noise. And maybe I could get it to work with a prefix argument.

Meanwhile, I thought I'd share the insanity and maybe start a hearty
flamewar in the process.

And just watch me reformat my message with gq}!!





More information about the Crackmonkey mailing list