Re: 答复: [Help]How can I add some char before a block?

2007-04-12 Thread Steven Woody

On 4/13/07, 陈方荣 [EMAIL PROTECTED] wrote:


---
Best regards
陈方荣
 -邮件原件-
 发件人: Tim Chase [mailto:[EMAIL PROTECTED]
 发送时间: 2007年4月13日 :09:44
 收件人: Ricky Zhou
 抄送: 陈方荣; Vim
 主题: Re: [Help]How can I add some char before a block?

  How can I add some char before a block? Just like C++
  comment.
 
  Use V to select the block you want, then type :s/^/\/\//

 You can make this a little easier/shorter to type by using

   :s!^!//

 The alternative delimiters (you can use a variety of characters,
 though I tend to choose !, @, or #) allow you to include
 certain characters without concern for having to escape the
 primary delimiter.

 There's also blockwise-visual mode:

   :help v_b_I

 which can also be an easy/lazy way to do it, especially if you're
 already in blockwise-visual mode.

 -tim




It's work.
Thanks.





comment is not a mechinism designed to erase codes.  using #if 0 ...
#endif to erase a block of code. it's the right way and looks clean.

--
woody

then sun rose thinly from the sea and the old man could see the other
boats, low on the water and well in toward the shore, spread out
across the current.


Re: ***SPAM***

2007-04-09 Thread Steven Woody

On 4/10/07, 李长青 [EMAIL PROTECTED] wrote:

hi,all:
   I am new to Vim,I am using Vim7.0 now,and it has no Syntax even when I set 
Syntax on,It stell has no syntax hignlighting,why?  Please help me. On Vim6.4 
,It has syntax hignlighting, but now (vim7.0) it doesn't.

Thanks.

yhntgbty
[EMAIL PROTECTED]
2007-04-10



i just copy the /usr/share/vim/vim70/vimrc_example.vim to
/usr/share/vim/vimrc and everything works fine then.

--
woody

then sun rose thinly from the sea and the old man could see the other
boats, low on the water and well in toward the shore, spread out
across the current.


Re: auto complete function of the tab does not work

2006-12-14 Thread Steven Woody

thank you all! the problem has been resolved.  actually, 'verboset set
cp?' returns 'compatiable', so i recheck where is my _vimrc file and
found it was lost.  i rewrite the file and everything goes fine.

thank you again!

On 12/15/06, Yegappan Lakshmanan [EMAIL PROTECTED] wrote:

On 12/13/06, A.J.Mechelynck [EMAIL PROTECTED] wrote:

 To see if Vim finds your vimrc, look at the top of the output of the

 :scriptnames

 command. To see _where_ it looks for a vimrc, use (on [g]vim for Windows)

 :echo $HOME
 :echo $VIM


In Vim7, Vim sets the MYVIMRC environment variable to the first
found .vimrc/_vimrc file. Similarly sets the MYGVIMRC variable to
the first found .gvimrc/_gvimrc file.

So to get the location of the vimrc used by Vim, use

:echo $MYVIMRC
:echo $MYGVIMRC

- Yegappan




--
woody

then sun rose thinly from the sea and the old man could see the other
boats, low on the water and well in toward the shore, spread out
across the current.


auto complete function of the tab does not work

2006-12-13 Thread Steven Woody

i just installed a 7.0 of vim on windows.  i remembered, in the
previous version, when i need to open a  file using the ':ed' command,
i can press tab after giving first few characters of the file ( or
path ), vim would auto complete the reset.

but after i installed the new vim 7.0. the tab does not work.  can
anyone know why?  i think i might miss some in the .vimrc.

--
woody

then sun rose thinly from the sea and the old man could see the other
boats, low on the water and well in toward the shore, spread out
across the current.


an indentation question

2006-08-18 Thread steven woody

i use vim on both linux and windows. but i found their indentation
behavior a little differently.

say i was coding a c program on the below line

void  foo_fun( int p1

then i press return on linux, the cursor come to a pleasant position,
that became,

void foo_fun( int p1
   , int p2 );

but when i was on windows and do the same thing, it became

void foo_fun( int p1
, int p2 );

and i dont like that.

i compared .vimrc files on linux and windows, but got nothing.  so i
am wandering whether someone here got know a setting which helps.

thanks.

--
then sun rose thinly from the sea and the old man could see the other
boats, low on the water and well in toward the shore, spread out
across the current.