I am using this commenting mapping to place /* */ around text:
map C-c :s/^\(.*\)$/\/\* \1 \*\//CR:nohlsCR
However, I would like it be tighter, meaning that instead of
/* blah blah blah */
I would like to see
/* blah blah blah */
Is there a way to do this?
DVM
I am having a strange issue with :w. Instead of just writing the whole
buffer to the current file, it also creates another copy of the file.
I don't think this is normal behavior. Is there a way to turn it off?
I am running Vim 7.0 on XP.
Dimitriy
Great advice. Putting set nobackup in my _gvimrc remedies the
problem. I believe that the underlying issue was the compatible
setting.
DVM
I am trying to find a way to copy text that I've highlighted with the
mouse to a temporary file with a .do extension, so that I might use it
in the script below, and then delete it. I am not sure how to proceed
from here. Any advice would be greatly appreciated.
fun! RunLines()
!start
Many thanks for all your attention. This was awesomely educational. I
had to delay the deletion of the file so that Stata would have it to
work on. In the end, I wound up with the following script:
fun! RunDoLines()
let selectedLines = getbufline('%', line('), line('))
if col(')