Re: Opening files matching tags in another window
Hello, You can try this mapping with the left mouse button (I don't try with C-] because I can't type CTRL-] on my french keyboard :p ) : map :exe ":stj " . expand("") Best regards, Vissale 2007/5/24, cupaxe <[EMAIL PROTECTED]>: Hello, This is a newbie question. I want to have a functionality similar to "g CTRL-]" which implements the command ":stj [ident]". Is there something like that? I wasn't able to find it in ":help tags". Thanks, Krishna
Re: OmniCppComplete question
Hello, This is a known bug. It appears when you edit a new cpp file without saving it before running a completion. Just save the file before. It will be fixed for the next release. Best regards, Vissale 2007/5/19, madiyaan <[EMAIL PROTECTED]>: Hello, I installed this add-on as per the instructions in the help file. However, after building the tags database when I do a this-> it says: Omnicomplete: Pattern not found: When I do a object. (dot) I get this: Error detected while processing function omni#cpp#complete#Main..omni#cpp#namespaces#GetCo ntexts..omni#cpp#namespaces#GetUsingNamespaces..omni#cpp#namespaces#GetListFromCurrentBuff er..38_GetAllUsingNamespaceMapFromCurrentBuffer: line7: E713: Cannot use empty key for Dictionary Can anyone tell me what I'm missing? I'm sure it's something really elementary... -- View this message in context: http://www.nabble.com/OmniCppComplete-question-tf3780665.html#a10691989 Sent from the Vim - General mailing list archive at Nabble.com.
Re: Omnicomplete for C - pattern not found problem
Hi, You can try this C++ omnicomplete plugin http://www.vim.org/scripts/script.php?script_id=1520 It will work for C files if you copy the file ~/.vim/after/ftplugin/cpp.vim to ~/.vim/after/ftplugin/c.vim (I'll add it for the next release). Best regards, Vissale 2007/3/6, Zarko Coklin <[EMAIL PROTECTED]>: I found a partial answer to my question here: http://tech.groups.yahoo.com/group/vim/message/68078 However, not sure why would the following be declared as an invalid C code: struct foo { /* ... */ }; typedef struct foo foo_t; int main() { foo myfoo; /* ... */ } In fact, I have a lot of instances in the code where following is used. And what I got from Bram it sounds omnicompletion will not work!? To me this would be the most basic thing for omnicomplete to support. typedef struct foo { /* ... */ } foo_t; int main() { foo myfoo; /* ... */ foo. yields with "Pattern not found" } Need a quick answer? Get one in minutes from people who know. Ask your question on www.Answers.yahoo.com
Re: Re : Omni Confusion
I forgot to mention that you have to build your tags database with this command : ctags -R --c++-kinds=+p --fields=+iaS --extra=+q . You'll see more details on these parameters in the help file. Moreover, there is a recent bug where you have to disable the ignorecase function to complete correctly your code (eg: A* a), it will be fixed. Best regards, Vissale 2007/2/20, Bill McCarthy <[EMAIL PROTECTED]>: On Mon 19-Feb-07 6:14am -0600, Vissale NEANG wrote: > To use cpp completion with c files you can copy > ~/.vim/after/ftplugin/cpp.vim to ~/.vim/after/ftplugin/c.vim This apparently doesn't work with C. I've installed it and copied cpp.vim to c.vim as instructed above. It automatically goes into omni mode when I type the '>' in: b-> However it reports "Pattern not found" - yes I created the tags file. I tried again with each function parameter on a separate line - that didn't matter to your function, but worked perfectly after deleting after/ftplugin/c.vim If anyone else wants to see this happen, here is a complete, albeit trivial, program (try to omni complete a line of C code starting with b-> in the function myfunc(): #include #include typedef struct A { int a1; int a2; int a3; } A; typedef struct B { int b1; int b2; int b3; } B; void myfunc( A *a, B *b ); int main( void ) { A x; B y; myfunc( &x, &y ); printf( "%d %d %d\n", x.a1, x.a2, x.a3 ); printf( "%d %d %d\n", y.b1, y.b2, y.b3 ); return EXIT_SUCCESS; } void myfunc( A *a, B *b ) { a->a1 = 1; a->a2 = 2; a->a3 = 3; b->b1 = 4; b->b2 = 5; b->b3 = 6; } -- Best regards, Bill
Re : Omni Confusion
Hello, To use cpp completion with c files you can copy ~/.vim/after/ftplugin/cpp.vim to ~/.vim/after/ftplugin/c.vim Best regards vissale
Re: [vim 7.0] foOmni-cpp-complete stange behaviour
Hello, I think you have set the ignorecase option to on, isn't it? I can reproduce the bug when the ignorecase is on. The problem comes from my use of searchdecl(), I forgot to disable ignorecase when using it. Try the normal command 'gd' (same as searchdecl()) on your variable 'a' and you'll see the cursor moving to 'A' instead of 'a', this is what happen in the script. Thus for these 2 lines, after the call of searchdecl(): let lines[0] = lines[0][ sStart : ] let lines[-1] = lines[-1][ : sEnd ] The column position 'sEnd' is incorrect and the string 'A a;' disapears. I'll fix it for the next release by disabling the ignorecase option during searchdecl(). Thank you for reporting this bug Best regards, Vissale 2007/2/16, Alexey Vakhov <[EMAIL PROTECTED]>: Hi all, I want to migrate to Vim in everyday work. I instlalled OmniCppComplete-0.4 from vim.org. I installed this plugin, create dir with one cpp file. And run ctags (as documented) #ctags -R --c++-kinds=+p --fields=+iaS --extra=+q . cpp file --- #include struct A { int x; int y; }; int main() { A a; return 0; } After that I add to main function variable 'a' with type 'A'. And typed a. and got error message (Pattern not found). After some investigation of plugin I found that in function omni#cpp#utils#GetCode(posStart, posEnd) there are proceeded two lines (' {', 'A a;') but in omni/cpp/utils.cpp file let lines[0] = lines[0][ sStart : ] let lines[-1] = lines[-1][ : sEnd ] second code kills string ' A a;' !!! I commented this line and omnifunc began working but not so gut as ft-c-omni. I'm newbie in Vim and don't wont to change system files. Would you like to help me with this plugin? Thanks a lot. -- Alexey Vakhov mailto:[EMAIL PROTECTED] versions --- #cat tags !_TAG_FILE_FORMAT2/extended format; --format=1 will not append ;" to lines/ !_TAG_FILE_SORTED1/0=unsorted, 1=sorted, 2=foldcase/ !_TAG_PROGRAM_AUTHORDarren Hiebert/[EMAIL PROTECTED]/ !_TAG_PROGRAM_NAMEExuberant Ctags// !_TAG_PROGRAM_URL http://ctags.sourceforge.net/official site/ !_TAG_PROGRAM_VERSION5.6// A.\touch.cpp/^struct A$/;"sfile: A::x.\touch.cpp/^int x;$/;"mstruct:Afile: access:public A::y.\touch.cpp/^int y;$/;"mstruct:Afile: access:public Flametest.\test.vim/^function! Flametest()$/;"f main.\touch.cpp/^int main()$/;"fsignature:() x.\touch.cpp/^int x;$/;"mstruct:Afile:access:public y.\touch.cpp/^int y;$/;"mstruct:Afile:access:public #ctags --version Exuberant Ctags 5.6, Copyright (C) 1996-2004 Darren Hiebert Compiled: Jul 30 2006, 16:12:20 Addresses: <[EMAIL PROTECTED]>, http://ctags.sourceforge.net Optional compiled features: +win32, +regex, +internal-sort #gvim --version VIM - Vi IMproved 7.0 (2006 May 7, compiled May 7 2006 16:23:43) MS-Windows 32 bit GUI version with OLE support Compiled by [EMAIL PROTECTED] Big version with GUI. Features included (+) or not (-): +arabic +autocmd +balloon_eval +browse ++builtin_terms +byte_offset +cindent +clientserver +clipboard +cmdline_compl +cmdline_hist +cmdline_info +comments +cryptv +cscope +cursorshape +dialog_con_gui +diff +digraphs -dnd -ebcdic +emacs_tags +eval +ex_extra +extra_search +farsi +file_in_path +find_in_path +folding -footer +gettext/dyn -hangul_input +iconv/dyn +insert_expand +jumplist +keymap +langmap +libcall +linebreak +lispindent +listcmds +localmap +menu +mksession +modify_fname +mouse +mouseshape +multi_byte_ime/dyn +multi_lang -mzscheme +netbeans_intg +ole -osfiletype +path_extra +perl/dyn -postscript +printer -profile +python/dyn +quickfix +reltime +rightleft +ruby/dyn +scrollbind +signs +smartindent -sniff +statusline -sun_workshop +syntax +tag_binary +tag_old_static -tag_any_white +tcl/dyn -tgetent -termresponse +textobjects +title +toolbar +user_commands +vertsplit +virtualedit +visual +visualextra +viminfo +vreplace +wildignore +wildmenu +windows +writebackup -xfontset -xim -xterm_save +xpm_w32 system vimrc file: "$VIM\vimrc" user vimrc file: "$HOME\_vimrc" 2nd user vimrc file: "$VIM\_vimrc" user exrc file: "$HOME\_exrc" 2nd user exrc file: "$VIM\_exrc" system gvimrc file: "$VIM\gvimrc" user gvimrc file: "$HOME\_gvimrc" 2nd user gvimrc file: "$VIM\_gvimrc" system menu file: "$VIMRUNTIME\menu.vim" Compilation: cl -c /W3 /nologo -D_MT -MT -I. -Iproto -DHAVE_PATHDEF -DWIN32 -DFEAT_CSCOPE -DFEAT_NETBEANS_INTG -DFEAT_XPM_W32 -DWINVER=0x0400 -D_WIN32_WINNT=0x0400 /Fo.\ObjGOLYTR/ /Ox -DNDEBUG -DFEAT_OLE -DFEAT_MBYTE_IME -DDYNAMIC_IME -DFEAT_GUI_W32 -DDYNAMIC_ICONV -DDYNAMIC_GETTEXT -DFEAT_TCL -DDYNAMIC_TCL -DDYNAMIC_TCL_DLL=\"tcl83.dll\" -- Alexey Vakhov mailto:[EMAIL PROTECTED]
Re: automatic code completion in vim
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 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 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 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 int main(){ > > > > >> > 2hello h; > > > > >> > 3hello::hello(); > > > > >> > 4h. > > > > >> > 5hello::<- 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. Internally the script use the vim function "searchdecl" (same > > > > >> > behaviour as the command "gd") to search the declaration line of your > > > > >> > object "h". But "gd" works properly only if your brace starts a new > > > > >> > line because it uses internally the command "[[" (:help gd and :help > > > > >> > [[). So if you want to see the popup menu at line 4 you have to write > > > > >> > your code like this : > > > > >> > > > > > >> > 1 int main() > > > > >> > 2 { // This brace must starts the line > > > > >> > 3hello h; > > > > >> > 4hello::hello(); > > > > >> > 5h. // The popup menu should appear here > > > > >> > 6hello:: > > > > >> > 7tmp1 t1; > > > > >> > 8t1. > > > > >> > 9 } > > > > >> > > > > > >> > At line 8, the popup menu doesn't appear because, after the command > > > > >> > "gd", the script tokenizes the source code from line 5 to 7 and the > > > > >> > resulting code in our case is : > > > > >> > > > > > >> > h.hello::tmp1 t1; > > > > >> > > > > > >> > so the script found that the type of the object "t1" is > > > > >> > "h.hello::tmp1", this is not correct. > > > > >> > If you want to see the popup menu you have to, at least, terminate the > > > > >> > instruction at line 6 with ";" > > > > >> > > > > > >> > 1 int main() > > > > >> > 2 { // This brace must starts the line > > > > >> > 3hello h; > > > > >> > 4hello::hello(); > > > > >> > 5h.print(); // The popup menu should appear here > > > > >> > 6hello::hello(); // you have to terminate properly your > > > > >> > // instruction with ";" before the next > > > > >> declaration > > > > >> > 7tmp1 t1; > > > > >> > 8t1.// the popup menu should appear here > > > > >> > 9 } > > > > >> >
Re: automatic code completion in vim
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 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 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 int main(){ > > >> > 2hello h; > > >> > 3hello::hello(); > > >> > 4h. > > >> > 5hello::<- 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. Internally the script use the vim function "searchdecl" (same > > >> > behaviour as the command "gd") to search the declaration line of your > > >> > object "h". But "gd" works properly only if your brace starts a new > > >> > line because it uses internally the command "[[" (:help gd and :help > > >> > [[). So if you want to see the popup menu at line 4 you have to write > > >> > your code like this : > > >> > > > >> > 1 int main() > > >> > 2 { // This brace must starts the line > > >> > 3hello h; > > >> > 4hello::hello(); > > >> > 5h. // The popup menu should appear here > > >> > 6hello:: > > >> > 7tmp1 t1; > > >> > 8t1. > > >> > 9 } > > >> > > > >> > At line 8, the popup menu doesn't appear because, after the command > > >> > "gd", the script tokenizes the source code from line 5 to 7 and the > > >> > resulting code in our case is : > > >> > > > >> > h.hello::tmp1 t1; > > >> > > > >> > so the script found that the type of the object "t1" is > > >> > "h.hello::tmp1", this is not correct. > > >> > If you want to see the popup menu you have to, at least, terminate the > > >> > instruction at line 6 with ";" > > >> > > > >> > 1 int main() > > >> > 2 { // This brace must starts the line > > >> > 3hello h; > > >> > 4hello::hello(); > > >> > 5h.print(); // The popup menu should appear here > > >> > 6hello::hello(); // you have to terminate properly your > > >> > // instruction with ";" before the next > > >> declaration > > >> > 7tmp1 t1; > > >> > 8t1.// the popup menu should appear here > > >> > 9 } > > >> > > > >> > If you have other questions, I am there :) > > >> > > > >> > Best regards, > > >> > > > >> > Vissale > > >> > > > >> > 2007/1/2, zhengda <[EMAIL PROTECTED]>: > > >> > > 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, '$'), '.tmp.cc', 'b'
Re: automatic code completion in vim
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 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 int main(){ >> > 2hello h; >> > 3hello::hello(); >> > 4h. >> > 5hello::<- 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. Internally the script use the vim function "searchdecl" (same >> > behaviour as the command "gd") to search the declaration line of your >> > object "h". But "gd" works properly only if your brace starts a new >> > line because it uses internally the command "[[" (:help gd and :help >> > [[). So if you want to see the popup menu at line 4 you have to write >> > your code like this : >> > >> > 1 int main() >> > 2 { // This brace must starts the line >> > 3hello h; >> > 4hello::hello(); >> > 5h. // The popup menu should appear here >> > 6hello:: >> > 7tmp1 t1; >> > 8t1. >> > 9 } >> > >> > At line 8, the popup menu doesn't appear because, after the command >> > "gd", the script tokenizes the source code from line 5 to 7 and the >> > resulting code in our case is : >> > >> > h.hello::tmp1 t1; >> > >> > so the script found that the type of the object "t1" is >> > "h.hello::tmp1", this is not correct. >> > If you want to see the popup menu you have to, at least, terminate the >> > instruction at line 6 with ";" >> > >> > 1 int main() >> > 2 { // This brace must starts the line >> > 3hello h; >> > 4hello::hello(); >> > 5h.print(); // The popup menu should appear here >> > 6hello::hello(); // you have to terminate properly your >> > // instruction with ";" before the next >> declaration >> > 7tmp1 t1; >> > 8t1.// the popup menu should appear here >> > 9 } >> > >> > If you have other questions, I am there :) >> > >> > Best regards, >> > >> > Vissale >> > >> > 2007/1/2, zhengda <[EMAIL PROTECTED]>: >> > > 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, '$'), '.tmp.cc', 'b') >> > > > let tags = system('ctags --c++-kinds=+p --fields=+iaS >> --extra=+q -f >> > > > - .tmp.cc') >> > > > " Note: whitespaces around expand are tab chars. >> > > > let alltags = system('grep -v " '.expand('%').' " >> tags') >> > > > let tagstable = split(alltags, '\n') >> > > > call add(tagstable, tags) >> > > > call writefile(tagstable, 'tags', 'b') >> > > > redraw! >> > > > return ';' >> > > > endfunction >> > > > inoremap ; UpdateTags() >> > > > >> > > > Note: this is untested in real life, it doesn't return any errors. >> > > > >> > > > In good conditions execution of whole function takes 0.46s on >> big tags >
Re: automatic code completion in vim
Hello, I am the maintainer of the script and I can reproduce the problem: 1 int main(){ 2hello h; 3hello::hello(); 4h. 5hello::<- 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. Internally the script use the vim function "searchdecl" (same behaviour as the command "gd") to search the declaration line of your object "h". But "gd" works properly only if your brace starts a new line because it uses internally the command "[[" (:help gd and :help [[). So if you want to see the popup menu at line 4 you have to write your code like this : 1 int main() 2 { // This brace must starts the line 3hello h; 4hello::hello(); 5h. // The popup menu should appear here 6hello:: 7tmp1 t1; 8t1. 9 } At line 8, the popup menu doesn't appear because, after the command "gd", the script tokenizes the source code from line 5 to 7 and the resulting code in our case is : h.hello::tmp1 t1; so the script found that the type of the object "t1" is "h.hello::tmp1", this is not correct. If you want to see the popup menu you have to, at least, terminate the instruction at line 6 with ";" 1 int main() 2 { // This brace must starts the line 3hello h; 4hello::hello(); 5h.print(); // The popup menu should appear here 6hello::hello(); // you have to terminate properly your // instruction with ";" before the next declaration 7tmp1 t1; 8t1.// the popup menu should appear here 9 } If you have other questions, I am there :) Best regards, Vissale 2007/1/2, zhengda <[EMAIL PROTECTED]>: 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, '$'), '.tmp.cc', 'b') > let tags = system('ctags --c++-kinds=+p --fields=+iaS --extra=+q -f > - .tmp.cc') > " Note: whitespaces around expand are tab chars. > let alltags = system('grep -v " '.expand('%').' " tags') > let tagstable = split(alltags, '\n') > call add(tagstable, tags) > call writefile(tagstable, 'tags', 'b') > redraw! > return ';' > endfunction > inoremap ; UpdateTags() > > Note: this is untested in real life, it doesn't return any errors. > > In good conditions execution of whole function takes 0.46s on big tags > file (KMail source, tags size over 4MB, 1 lines). Delay noticeable > on my computer Sempron 2200, 512M RAM, old HD 5400rpm. In worse conditions > it was taking up to 0.75s:: > > FUNCTION UpdateTags() > Called 1 time > Total time: 0.527128 > Self time: 0.401542 > > count total (s) self (s) > 1 0.000551 call writefile(getline(1, '$'), '.tmp.cc', 'b') > 1 0.026373 0.000298 let tags = system('ctags --c++-kinds=+p > --fields=+iaS --extra=+q -f - .tmp.cc') > 1 0.91 let stags = split(tags, '\n') > 1 0.130731 0.031220 let alltags = system('grep -v " '.expand('%').' " > tags') > 1 0.128909 let tagstable = split(alltags, '\n') > 1 0.43 call extend(tagstable, stags) > 1 0.240341 call writefile(tagstable, 'tags', 'b') > 1 0.33 return ';' > > FUNCTIONS SORTED ON TOTAL TIME > count total (s) self (s) function > 1 0.527128 0.401542 UpdateTags() > > FUNCTIONS SORTED ON SELF TIME > count total (s) self (s) function > 1 0.527128 0.401542 UpdateTags() > > Note however I've made one fatal mistake. ``ctags fname`` will point to > tags in file .tmp.cc not our real current file! Filtering tags in Vim is > possible and on small sample quite fast but still 0.5s is long. Maybe we > should put that strain to the system:: > > function! UpdateTags() > call writefile(getline(1, '$'), '.tmp.cc', 'b') > call system('grep -v " '.expand('%').' " tags > tags2 && mv -f tags2 > tags') > let tags = system('ctags --c++-kinds=+p --fields=+iaS --extra=+q -f > - .tmp.cc | sed "s/\t\.tmp\.cc\t/\t'.expand('%').'\t/" >> tags') > return ';' > endfunction > inoremap ; UpdateTags() > > And here we have the winner:: > > FUNCTION UpdateTags() > Called 1 time > Total time: 0.145700 > Self time: 0.001068 > > count total (s) self (s) > 1 0.000523 call writefile(getline(1, '$'), '.tmp.cc', 'b') > 1 0.096118 0.000195 call system('grep -v " '.expand('%').' " tags > > tags2 && mv -f tags2 tags') > 1 0.049003 0.00029
Re: suggestions for ssh under windows
Hi, Maybe he can try OpenSSH for windows from here : http://sshwindows.sourceforge.net/ It doesn't need the full Cygwin package. Best regards, Vissale 2006/11/30, Charles E Campbell Jr <[EMAIL PROTECTED]>: Hello! I have a netrw user using WinXP who wants to use ssh; currently, he doesn't have such an executable. I tend to use cygwin, but that's like asking one to build a home instead of new cabinets for the kitchen. So, where can he get ssh for WinXP? I'm likely to put a synopsis of any answers in netrw's help. Thank you, Chip Campbell
Re: ctags and scoped jumping
Hi, I think it's possible, actually I am looking for working on it with my plugin OmniCppComplete (C++ omni completion). The main difficulty is to get the type of your object "f" and this script has some tools to do this. At the moment, when you complete an object, the script can find (not always, there is some bugs) the type of your object (foo here). It can also resolve namespaces and current context, it can see the difference between MyNamespace1::foo and MyNamespace2::foo. I'll work to make existing functions easier to use, so someone else or me can make easily a "contextual tags" plugin. Best regards, Vissale 2006/11/14, Aaron Griffin <[EMAIL PROTECTED]>: I've been curious about this for some time, and I've never found a solution. I figured I'd bring this up, just in case someone else did find something useful. It's easy to make ctags output parent::member tags for c/c++ classes and structs (--extra=+q), and while that's semi-useful, it doesn't help in the following (common) case: struct foo { int bar; }; struct foo f; f.x[y]z; /* [] indicates the cursor */ You cannot jump from here to foo::xyz, as f is not known to be of type 'foo'. Does anyone know of a way to make C-] work in the above case, assuing the tags file has the proper typename::member information? If you do, I will love you forever. Thanks in advance, Aaron Griffin -- Vissale Live For Speed Racer - http://www.liveforspeed.net
Re: c and gvim
Hi, You can also use the usefull plugin taglist.vim, it shows you the list of functions prototypes, classes and more in a splitted window. http://www.vim.org/scripts/script.php?script_id=273 If you want to use omni-completion for C++ you can use the OmniCppComplete plugin. http://www.vim.org/scripts/script.php?script_id=1520 Both use ctags. Regards, Vissale 2006/9/7, SHANKAR R-R66203 <[EMAIL PROTECTED]>: Hi All, I am basically a VHDL/verilog guy. But my team has fresh verification engineers who will be using c a lot. I want to know the useful plugins and any other important aspects, when using gvim for editing C/C++ As far as I know and searched - I could get c.vim -- plugin for gvim ctags/cscope -- tag generator. Any other important feature/plugin/tool one need to know for editing C, please let me know. Thanks and Regards, Shankar
Re: tag lookup for Class::member
Hi, You can build your ctags database with the option : --extra=+q after that you can run the cmd : :tag /^CRectangle::set_values$ Regards, Vissale 2006/8/16, A Bera <[EMAIL PROTECTED]>: Hi, I would like to search tags for Class::member in a c++ file. For example, I have the following class in a header file: class CRectangle { int x, y; public: void set_values (int,int); int area (void); }; Also I have their implementation in a different file. Now consider the following case: int main () { CRectangle rect; rect.set_values (3,4); cout << "area: " << rect.area(); return 0; } when I press ^] at set_values(), I would like to do a look-up on "CRectangle::set_values" not only "set_values" or "rect.set_values()". let me know how can I ask vim to do a look up for "CRectangle::set_values"? Thanks, A Bera - __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
Re: ctags for win32
Hi, I had some problems to send my previous mail to the vim list, sorry if you have already received this mail. Someone on the ctags-users mailing list has posted a ctags win32 binary (topic Binary for Windows NT/2000/XP and OS/2 (version 5.6).), here is the link to this binary built with MSVC 6.0: http://mb9x.ginps.com/files/ctags_w32_5-6.zip Regards, Vissale PS: ctags 5.6 can also be built with MSVC 2005 2006/7/28, A.J.Mechelynck <[EMAIL PROTECTED]>: Brett Calcott wrote: > I'm looking to get the latest version of ctags for win32. There > doesn't appear to be a binary on sourceforge. Or am I just being > dense? > > Cheers, > Brett > > From what I see at Sourceforge, version 5.6 of exuberant ctags isn't yet available for Windows. I suppose you can use version 5.5.4 while waiting for the 5.6 Windows release; or else, you might be able to compile a Cygwin-only version of 5.6. It is not obvious to me whether the 5.5.4 release .zip is source-only or includes the executable but that difference should be a minor problem. See http://sourceforge.net/project/showfiles.php?group_id=6556&package_id=6631 Best regards, Tony.