Adeodato Sim : Making EnhancedCommentify.vim more useable for me
I use the enhanced commentify script from vim.org to easily comment
and decomment parts of code. It knows about comment delimiters in a ton
of languages, and it’s generally nice.
Lately, I’ve been a bit annoyed about commenting several lines with
different indent levels. In particular, given for example this snippet:
def foo():
if duck.is_hungry():
grab_food()
feed_duck()
If one instructs the script to comment the three last lines, the result
is:
def foo():
# if duck.is_hungry():
# grab_food()
# feed_duck()
When what I would like is:
def foo():
# if duck.is_hungry():
# grab_food()
# feed_duck()
There is one variable one can set to achieve this behavior:
EnhCommentifyUseBlockIndent. However, it only works when
commenting from visual mode. From normal mode (what I normally use —
that is, going to e.g. line 2 above, and pressing 3,c), it doesn’t
work, because from normal mode the commenting function does not receive
the block, it just gets called three times, once per line.
To solve this, the solution I found was to create a custom command that
accepts a range, and calls the function exactly once, for the whole
block.
In particular, this is all my enhanced commentify configuration from
~/.vimrc:
let EnhCommentifyPretty = "yes"
let EnhCommentifyUserBindings = "yes"
let EnhCommentifyRespectIndent = "yes"
let EnhCommentifyUseBlockIndent = "yes"
" The MyEnhancedCommentify bit is needed because the normal nmap just
" calls EnhancedCommentify() <count> times, thus UseBlockIndent can't
" work.
nmap <Leader>c :MyEnhancedCommentify<CR>
vmap <Leader>c <Plug>VisualTraditional
command! -range MyEnhancedCommentify
\ call EnhancedCommentify('', 'guess', <line1>, <line2>)

A few days ago, I asked
As
libqt3-compat-headers is a debian package containing headers from qt3 to help migrating from qt2 to qt3.
First of all: no, I'm not a huge fan of the genre. In fact, when I
don't feel too good, I tend to avoid them, since they can depress me at
times. But once in a while, a romantic comedy doesn't hurt, and I do
kindof like them at times. Early last week, I picked up a DVD of the
first movie at a low-price DVD shop nearby, and watched it.
In the past I was not blogging small things if they were not worth a full blog entry on their own (or if I did not have the time to make up a full entry of it :). Inspired by the example of 
The other day, I had an interesting problem, regarding Apache, the
The last day of each year
sees one of the strangest
traditions I've ever noticed.
A 40-year-old English-language film of
an 80-year-old music hall comedy is
played repeatedly on various stations
in Germany - and in Austria, Switzerland,
Denmark and Australia too.
There's not only the film, but
edited versions, localised versions,
spoofs and other shows based around it too.
The film still isn't shown on any English
stations, as far as I can tell.
I'd never heard of it before getting
It's now three weeks since I am officially a Ph.D. student at the 
Apparently some people worry that Gforge may be abandoned, or on the
verge of being superseded with the proprietary "Gforge Advanced
Server" rewrite. Let it be known that I for one have no plans to
switch to Gforge AS, for all the reasons you'd expect from a free
software user and advocate: I don't have access to the source code
(it's made illegible by some sort of industrial PHP obfuscator), I
can't hack it because the license doesn't allow me to, I can't audit
it for security flaws, I can't adapt it to particular needs, etc.
Since a significant part of my income comes from maintaining Gforge
instances for clients, with local modifications for their particular
needs, it's an economical necessity that Gforge stays free. And
evolving.
Right. Having said that, I guess I have to show concrete evolutions
in addition to principles and ideals. So what changed recently?
Three days ago I released KCheckGMail v0.5.7.3: nothing but a one-bug fix release.
As I stand in a near cattle-car packed South Station, waiting while no trains arrive and no trains depart (”signal difficulties”), I wonder if forces are conspiring to make MBTA service so poor that it enters a death spiral of poor reputation for reliability, increasing fares, lower ridership, less revenue, etc.. One or two long delays or canceled trains in a short time span can be ignored, but after a while it may become impossible for the T to recover the lost goodwill. There’s a saying in trademark law, “once you’ve lost a customer, they’re often gone forever.”
Are signal difficulties for real, by the way?
More on this topic: