On Mar 19, 8:20 pm, Gary Johnson <[email protected]> wrote: > On 2010-03-19, Jagpreet wrote: > > Hi Vimmers, > > > I'm using code_complete.vim plugin for code completion. > > I have written my won snippets file but that's not getting executed > > with the plugin command > > > exec "silent! runtime ".g:user_defined_snippets > > > I suspect this is the only problem, co'z the output of > > command :scriptnames doesn't show the entry of my_snippets.vim > > > If I execute the command manually with :so <PATH>/my_snippets.vim then > > my_snippets.vim gets displayed in the listing(:scriptnames), also my > > snippets are working. > > > Is there anything wrong with the last line in the plugin > > exec "silent! runtime ".g:user_defined_snippets > > > I have defined g:user_defined_snippets in my .vimrc file. > > It would help greatly to know what that definition is and where you > actually put my_snippets.vim. > > My guess is that you've defined g:user_defined_snippets as > "my_snippets.vim" but put it somewhere that is not in your > 'runtimepath'. In other words, the <PATH> you referred to above is > not one of the directories in the 'runtimepath' list. Consequently, > the runtime command won't find it. > > See also > > :help :runtime > :help 'runtimepath' > > HTH, > Gary
Gary, :echo $VIMRUNTIME is " $HOME/VIM/vim/share/vim/vim72 " This path is set in my .bashrc I have compiled the source at some other server and copied the complete directory structure at $HOME/VIM now what path I defined at g:user_defined_snippets is $HOME/.vim/tools/ my_snippets.vim also what is defined in my_snippets.vim is somethings like this let g:template['c']['tdf'] = "typedef ".g:rs."...".g:re." ".g:rs."...".g:re."Type ;" let g:template['c']['static'] = "static ".g:rs."...".g:re." s_".g:rs."...".g:re." ;" This is to sync with the coding standards I use. also I tried using the command :help :runtime but no help available for me. I guess this is because of the directories I copied from some other servers. as a workaround I copied the my_snippets.vim at $HOME/.vim/plugin and it works but I was keen to know the reasons why exec "silent! runtime ".g:user_defined_snippets is failing. Do u still think this is runtimepath issue. Jagpreet -- You received this message from the "vim_use" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php To unsubscribe from this group, send email to vim_use+unsubscribegooglegroups.com or reply to this email with the words "REMOVE ME" as the subject.
