sun wrote:
If you type an arbitrary character, then delete it immediately, does the extra
whitespace stay in place when you move the cursor away?

yes, the spaces remain.

If it does, you may

I meant "if it doesn't"

resort to adding a placeholder comment, like:

function MyFunc()
       {
               /* TODO: code needed here */
       };

you mean just add several character using a quick-key map? but then
everytime i type the code before "/* TODO: code needed here */", i
have to delete it.
can i change the default behavior of vim not to delete the indent?


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.
--
hundred-and-one symptoms of being an internet addict:
171. You invent another person and chat with yourself in empty chat rooms.

Reply via email to