sun wrote:
The idea of the comment shown above was to leave something to remind
you that
you had to come back later, since, as you said, you want to leave the
indent
there "for future use"; also, the comment would be sure to stay in
place even
if the "bare indent" didn't. But if just adding, let's say, a period,
then
backspacing over it, makes the indent remain, then you don't have to
type a
lengthy comment unless you need it.
You may even try (untested)
:inoremap <CR> <CR>.<BS>
Note: Next time, please use "Reply to all" rather than "Reply to sender",
unless you're straying off-topic.
Best regards,
Tony.
> Do I need always type a char then <BS>?
> Is there a better solution? I wander whether the vim option can do
> this automatically.
>
With the mapping above, you don't have to add a character then delete it: you
hit the Return key, and Vim (with 'nopaste') maps it to "hit Return, hit dot,
hit backspace", i.e., the insertion-deletion game is played automatically
whenever you hit Return in Insert mode. What more do you want?
...or at least that's how I think it works.
Best regards,
Tony.
--
Speer's 1st Law of Proofreading:
The visibility of an error is inversely proportional to the
number of times you have looked at it.