1

Today I install sublime text 3. I install plugin SublimeCodeIntel. This plugin help me for autocomplete functions in php. In my projects I use Yii framework. Can I add yii framework to this plugin.

MattDMo
  • 100,794
  • 21
  • 241
  • 231
user2969404
  • 27
  • 2
  • 10

1 Answers1

1

You should be able to. First, open Preferences -> Package Settings -> SublimeCodeIntel -> Settings-Default, copy the entire contents, open ... -> SublimeCodeIntel -> Settings-User, and paste the contents into it. You can now close Settings-Default.

Scroll all the way down to the bottom and customize the settings in the "PHP" array. Set "php" to the full path to the php or php.exe binary on your system. In "codeintel_scan_extra_dir", add directories to the list of folders you'd like to scan. For example, you could put ["/path/to/project/vendor/yiisoft"], or just ["/path/to/project/vendor"] if you want to include everything in that directory for code analysis.

If you set up a separate Sublime project for each job, you can add this information to your .sublime-project file. With your project open, select Project -> Edit Project, and set it like this:

{
    "folders":
    [
        {
            "follow_symlinks": true,
            "path": "/home/mattdmo/Development/Client1/site"
        }
    ],
    "settings":
    [
        {
            "codeintel_language_settings": {
                "PHP": {
                    "php": "/usr/local/bin/php",
                    "codeintel_scan_extra_dir": ["vendor"],
                    "codeintel_scan_files_in_project": true,
                    "codeintel_max_recursive_dir_depth": 25,
                    "codeintel_scan_exclude_dir":["css", "img"]
                }
            }
        }
    ]
}

Paths are relative to the directory where the .sublime-project file is stored. Read the above link and the official docs for more information. If you don't put a certain setting in the project file (for example, the "codeintel_scan_files_in_project" setting), its value will be taken from the user settings you configured above, or the plugin's default settings you opened initially. So, set base values you always use in the plugin's user settings, then just set project-specific things in the project file.

MattDMo
  • 100,794
  • 21
  • 241
  • 231
  • Thank You! Do You know, Sublime3 has a plug that if we click on any function then it will show all parameter and description like phpDesigner8 (https://www.youtube.com/watch?v=ZuUF5mpsH2c) – user2969404 Jan 27 '15 at 00:48
  • @user2969404 I'm glad I could help. If this answered your original question, please indicate that by clicking the check mark next to it to [accept the answer](http://stackoverflow.com/help/accepted-answer). Regarding your second question, try [searching](https://packagecontrol.io/search) Package Control. SublimeCodeIntel should also have some of that functionality, read its documentation. There may also be plugins specific for PHP. – MattDMo Jan 28 '15 at 00:26