comment command tightness

2006-08-18 Thread Dimitriy V. Masterov
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

strange :w behavior

2006-06-30 Thread Dimitriy V. Masterov
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

Re: strange :w behavior

2006-06-30 Thread Dimitriy V. Masterov
Great advice. Putting set nobackup in my _gvimrc remedies the problem. I believe that the underlying issue was the compatible setting. DVM

copy highlighted text to a temporary file

2006-06-27 Thread Dimitriy V. Masterov
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

Re: copy highlighted text to a temporary file

2006-06-27 Thread Dimitriy V. Masterov
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(')