Adventures in emacs
Posted By matt on August 13, 2008
Meta-x indent-region is a useful command. It indents a region of code.
It is bound to Ctrl-Meta-\. \ is right below Backspace.
After dumping myself out of my X Session, I rebound it. Indent starts with i, so I bound it to control-i.
Then I tried to make a makefile. Tab wouldn't insert tabs. Kept complaining that it couldn't indent the region because there was no region selected. WTF?
Control-i maps to TAB. TAB maps to the tab key. Apparently, they're all intertwined.
After struggling to liberate the TAB key and/or control i (I tried (global-unset-key [(control i)]), as well as trying to explicitly set \t) I finally gave up and mapped it to control-r (because it is a region, after all).
Don't get me wrong, I love emacs because I can make it do some really cool stuff. Sometimes, however, it drives me right up the wall.
For the curious, I'm making a Makefile to run my whole website hierarchy through php and save the html in a file of the same base name. Then, when I sync my dev copy to my hosting provider with rsync, I simply won't propagate the makefile or php files. The result? Static page speed with the maintenance ease of PHP for menus and other “convenience” things. (The website doesn't have any truly dynamic content).
Comments
Leave a Reply
Please note: Comment moderation is currently enabled so there will be a delay between when you post your comment and when it shows up. Patience is a virtue; there is no need to re-submit your comment.