Re: automatic code completion in vim

2007-01-04 Thread Vissale NEANG
It's because your tag file is not sorted correctly, the last tag main should be the first tag in the file. The script does a tag binary search and the tags file must be sorted to work properly (:help tag-binary-search). Best regards, Vissale 2007/1/3, zhengda [EMAIL PROTECTED]: Vissale NEANG

Re: automatic code completion in vim

2007-01-04 Thread Zheng Da
On 1/4/07, Vissale NEANG [EMAIL PROTECTED] wrote: It's because your tag file is not sorted correctly, the last tag main should be the first tag in the file. The script does a tag binary search and the tags file must be sorted to work properly (:help tag-binary-search). Best regards, Vissale

Re: automatic code completion in vim

2007-01-04 Thread Vissale NEANG
You can use the vim sort command (:help sort) instead of gnu sort. Moreover it's portable. 2007/1/4, Zheng Da [EMAIL PROTECTED]: On 1/4/07, Vissale NEANG [EMAIL PROTECTED] wrote: It's because your tag file is not sorted correctly, the last tag main should be the first tag in the file. The

Re: automatic code completion in vim

2007-01-04 Thread Zheng Da
On 1/4/07, Vissale NEANG [EMAIL PROTECTED] wrote: You can use the vim sort command (:help sort) instead of gnu sort. Moreover it's portable. 2007/1/4, Zheng Da [EMAIL PROTECTED]: On 1/4/07, Vissale NEANG [EMAIL PROTECTED] wrote: It's because your tag file is not sorted correctly, the last

Re: automatic code completion in vim

2007-01-04 Thread Vissale NEANG
There is also an autotag plugin (just found it): http://www.vim.org/scripts/script.php?script_id=1343 But I have not yet try it. It seems you need to compile vim with python. 2007/1/4, Zheng Da [EMAIL PROTECTED]: On 1/4/07, Vissale NEANG [EMAIL PROTECTED] wrote: You can use the vim sort

Re: automatic code completion in vim

2007-01-04 Thread Zheng Da
On 1/4/07, Vissale NEANG [EMAIL PROTECTED] wrote: There is also an autotag plugin (just found it): http://www.vim.org/scripts/script.php?script_id=1343 But I have not yet try it. It seems you need to compile vim with python. 2007/1/4, Zheng Da [EMAIL PROTECTED]: On 1/4/07, Vissale NEANG

Re: automatic code completion in vim

2007-01-04 Thread Zheng Da
This plugin seems to work well. Thank you so much Zheng Da On 1/4/07, Zheng Da [EMAIL PROTECTED] wrote: On 1/4/07, Vissale NEANG [EMAIL PROTECTED] wrote: There is also an autotag plugin (just found it): http://www.vim.org/scripts/script.php?script_id=1343 But I have not yet try it. It

Re: automatic code completion in vim

2007-01-04 Thread A.J.Mechelynck
Zheng Da wrote: On 1/4/07, Vissale NEANG [EMAIL PROTECTED] wrote: It's because your tag file is not sorted correctly, the last tag main should be the first tag in the file. The script does a tag binary search and the tags file must be sorted to work properly (:help tag-binary-search). Best

Re: automatic code completion in vim

2007-01-04 Thread A.J.Mechelynck
Zheng Da wrote: [...] By the way, how to compile vim with python. I run ./configure --enable-pythoninterp After I compiled vim and installed it, vim --version|grep python still shows -python +quickfix +reltime -rightleft -ruby +scrollbind +signs +smartindent In order to be able to compile Vim

Re: automatic code completion in vim

2007-01-03 Thread Vissale NEANG
Hello, I am the maintainer of the script and I can reproduce the problem: 1 int main(){ 2hello h; 3hello::hello(); 4h. 5hello::C-xC-o- the popup menu only appear here 6tmp1 t1; 7t1. 8 } At line 4, the popup menu doesn't appear because of the brace at line 1.

Re: automatic code completion in vim

2007-01-03 Thread Zheng Da
On 1/3/07, Vissale NEANG [EMAIL PROTECTED] wrote: Hello, I am the maintainer of the script and I can reproduce the problem: 1 int main(){ 2hello h; 3hello::hello(); 4h. 5hello::C-xC-o- the popup menu only appear here 6tmp1 t1; 7t1. 8 } At line 4, the popup

Re: automatic code completion in vim

2007-01-03 Thread zhengda
Vissale NEANG wrote: What is you ctags command? Could you send me your tag file? Just for comparison I give you my tag file 2007/1/3, Zheng Da [EMAIL PROTECTED]: On 1/3/07, Vissale NEANG [EMAIL PROTECTED] wrote: Hello, I am the maintainer of the script and I can reproduce the problem: 1

Re: automatic code completion in vim

2007-01-02 Thread zhengda
Mikolaj Machowski wrote: On pon sty 1 2007, Mikolaj Machowski wrote: This won't work: you need a different variable name, see :help E706. Yeah, I forgot (not only about that). This is complete solution:: function! UpdateTags() call writefile(getline(1, '$'),

Re: automatic code completion in vim

2007-01-01 Thread Mikolaj Machowski
On pon sty 1 2007, Mikolaj Machowski wrote: Note: much faster, noticeable on big files, would be reading of tags file into buffer and just g//d proper lines and add tags at the end how to read tags into the buffer and what does g//d proper lines mean? :new somename :g/\t{filename}\t/d

Re: automatic code completion in vim

2007-01-01 Thread A.J.Mechelynck
Mikolaj Machowski wrote: Dnia pon sty 1 2007, napisałeś: remove() doesn't accept regexps only indexes. To remove offending lines use filter():: call filter(alltags, v:val !~ fname) I've made some tests and on big tags files it can be slow. The fastest method is:: let alltags

Re: automatic code completion in vim

2007-01-01 Thread Mikolaj Machowski
On pon sty 1 2007, Mikolaj Machowski wrote: This won't work: you need a different variable name, see :help E706. Yeah, I forgot (not only about that). This is complete solution:: function! UpdateTags() call writefile(getline(1, '$'), '.tmp.cc', 'b') let tags =

Re: automatic code completion in vim

2006-12-31 Thread Mikolaj Machowski
On nie gru 31 2006, Zheng Da wrote: but i remember that , the (enhanced) ctags do have the option to append the tag files. you can see the manual more seriously , so i think you can find it --append Yes, but they are not removing older entries. When doing corrections in file it may result

Re: automatic code completion in vim

2006-12-31 Thread zhengda
Mikolaj Machowski wrote: On sob gru 30 2006, Mikolaj Machowski wrote: Do you mean create tags files for every code file, and change tags file when switching between different code files? But how to combine all of these actions to a hotkey? If ctags can provide an update option, the problem

[Fwd: Re: automatic code completion in vim]

2006-12-30 Thread A.J.Mechelynck
Original Message Subject: Re: automatic code completion in vim Date: Sat, 30 Dec 2006 14:46:54 +0100 From: zhengda [EMAIL PROTECTED] To: A.J.Mechelynck [EMAIL PROTECTED] References: [EMAIL PROTECTED] [EMAIL PROTECTED] A.J.Mechelynck wrote: zhengda wrote: Hello, I hope vim

Re: automatic code completion in vim

2006-12-30 Thread Zheng Da
Do you mean create tags files for every code file, and change tags file when switching between different code files? But how to combine all of these actions to a hotkey? If ctags can provide an update option, the problem can be solved very easily. But it seems ctags doesn't provide this option

Re: automatic code completion in vim

2006-12-30 Thread Mikolaj Machowski
On sob gru 30 2006, Mikolaj Machowski wrote: Do you mean create tags files for every code file, and change tags file when switching between different code files? But how to combine all of these actions to a hotkey? If ctags can provide an update option, the problem can be solved very easily.

Re: automatic code completion in vim

2006-12-30 Thread dong wang
but i remember that , the (enhanced) ctags do have the option to append the tag files. you can see the manual more seriously , so i think you can find it --append I don't know whether this could be suit for you , but you can try it. 2006/12/31, Zheng Da [EMAIL PROTECTED]: Do you mean create

automatic code completion in vim

2006-12-29 Thread zhengda
Hello, I hope vim can run automatically a completion after a '.', '-' or '::' when I write c++ program. I know omnicppcomplete plugin can do this job. But omnicppcomplete needs tag database. So if I want omnicppcomplete to tell me members of a class, I have to keep updating the tag database

Re: automatic code completion in vim

2006-12-29 Thread A.J.Mechelynck
zhengda wrote: Hello, I hope vim can run automatically a completion after a '.', '-' or '::' when I write c++ program. I know omnicppcomplete plugin can do this job. But omnicppcomplete needs tag database. So if I want omnicppcomplete to tell me members of a class, I have to keep updating