change the filetype
I have a certain set of settings for cpp files. All those settings are located in ~/.vim/after/ftplugin/cpp.vim I would like to apply those settings to c files as well. I tried to put the following code into ~/.vim/after/ftplugin/c.vim set filetype=cpp but I got the error saying that the nesting is too deep. I also have pathogen plugin installed. If there is a way to do achieve my goal through it, that would be even better. Any help is appreciated. -- 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
Re: change the filetype
On 14:15 Sun 25 Nov , cyboman wrote: I have a certain set of settings for cpp files. All those settings are located in ~/.vim/after/ftplugin/cpp.vim I would like to apply those settings to c files as well. I tried to put the following code into ~/.vim/after/ftplugin/c.vim set filetype=cpp but I got the error saying that the nesting is too deep. I also have pathogen plugin installed. If there is a way to do achieve my goal through it, that would be even better. Any help is appreciated. -- 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 You can add source cpp.vim To the ~/.vim/after/ftplugin/c.vim filetype plugin file. Best, Marcin -- 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
Re: change the filetype
On 2012-11-25, cyboman wrote: I have a certain set of settings for cpp files. All those settings are located in ~/.vim/after/ftplugin/cpp.vim I would like to apply those settings to c files as well. I tried to put the following code into ~/.vim/after/ftplugin/c.vim set filetype=cpp but I got the error saying that the nesting is too deep. I think all you need to do is rename your cpp.vim file to c.vim because $VIMRUNTIME/ftplugin/cpp.vim executes runtime on ftplugin/c.vim. Therefore your c.vim file will be used by both c and cpp filetypes. Regards, Gary -- 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
Re: change the filetype
On Sunday, November 25, 2012 5:54:34 PM UTC-5, Gary Johnson wrote: On 2012-11-25, cyboman wrote: I have a certain set of settings for cpp files. All those settings are located in ~/.vim/after/ftplugin/cpp.vim I would like to apply those settings to c files as well. I tried to put the following code into ~/.vim/after/ftplugin/c.vim set filetype=cpp but I got the error saying that the nesting is too deep. I think all you need to do is rename your cpp.vim file to c.vim because $VIMRUNTIME/ftplugin/cpp.vim executes runtime on ftplugin/c.vim. Therefore your c.vim file will be used by both c and cpp filetypes. Regards, Gary Thanks Garry. I put my code in ~/.vim/after/ftplugin/c.vim -- 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