Enforcing auto-completion for a certain language

Post your questions and problem reports here

Moderator: kfury77

Forum rules
Please try to follow these guidelines. This will help to receive faster and more accurate response.
  • Check the Support section of the corresponding product first. Chances are you will find your answer there;
  • Do not create new topics for already reported problems. Add your comments to the existing topics instead;
  • Create separate topic for each problem request. Do NOT post a number of non-related problem reports in a single topic;
  • Give your topic a meaningful title. Titles such as "A question," "Bug report" and "Help!" provide others no clue what your message is about;
  • Include the version number of the software you are using;
  • This is not an official customer support helpdesk. If you need a prompt and official response, please contact our support team directly instead. It may take a while until you receive a reply in the forum;
Post Reply
bigprof
Posts: 2
Joined: Tue Oct 21, 2008 3:15 pm

Enforcing auto-completion for a certain language

Post by bigprof »

Hi,

I'm a happy registered user of Rapid PHP 2008. I have a question: When I'm editing a file that has for example a ".php" extension, RapidPHP recognizes the file normally as a PHP file and offers code completion based on PHP. Sometimes, however, I want to enforce code-completion for, say, CSS in that file for a while, and then switch back to PHP auto-completion. Is there a way to switch the auto-completion language dynamically while editing the file?
User avatar
Karlis
Site Admin
Posts: 3605
Joined: Mon Jul 15, 2002 5:24 pm
Location: Riga, Latvia, Europe
Contact:

Re: Enforcing auto-completion for a certain language

Post by Karlis »

The auto-complete works not based on file extension but based on the code. In PHP file if the caret sits between <style> and </style> tags, you will get CSS auto complete. You will get PHP auto complete when between <?php and ?> and so on.
Karlis Blumentals
Blumentals Software
www.blumentals.net
bigprof
Posts: 2
Joined: Tue Oct 21, 2008 3:15 pm

Re: Enforcing auto-completion for a certain language

Post by bigprof »

Thanks for the reply. You're right indeed. But in my case, I'm editing a file named "styles.css.php". It generates a dynamic style sheet. CSS files don't have a <style> tag, so that's why I need to enforce switching auto-complete to CSS. Your reply gave me the idea of adding the <style> tag while editing the file and deleting it before saving the file ... so this trick would do fine for now.
Post Reply