nnoremap F5 50A-esc50barlD
Dear Jürgen,
I think it should be without the additional bar, ie.
nnoremap F5 50A-esc50barD
Correct me if I'm wrong.
-- Peter
--
There's no trick to being a humorist when you have the whole government
working for you. --Will Rogers
Dear Vidar,
some time ago I wrote a function to create a nice-looking headers for my
Python scripts. I hope it'll give you some inspiration. Feel free to copy
modify it according to your needs.
What it does: After pressing F8 (see the mapping below) it asks for the
header text. When
or change these lines
if a:mode[1] == T
...
elseif a:mode[1] == t
to
if a:mode[1] ==# T
...
elseif a:mode[1] ==# t
Well, yes, after this correction, the script has became my good friend ;-)
What I like most is it's ability to recognize (), [], {}, and /* */.
To make
My last idea: I would suggest changing the text Opening tag in the \T case
to HTML tag. The reason is, it's both opening and closing. And then, release
it :)
Have fun,
Peter
To check if the cursor is within a comment or string context:
synIDattr(synID(line(.), col(.), 1), name) =~? 'comment\|string'
Syntax has to be enabled.
Thanks, Gerald,
this is exactly what I needed. Thanks also to the others, for useful hints.
-- Peter
Not really a request for help, but I was wondering if you guys ever use
the 's' command.
It's just a shortcut for 'cl', which I almost never need. Since I don't
assume it was put in to be complete or something, I'm intrigued by it's
enigmatic purpose. :)
Well, I use it when I want to