aqzhyi/Sublime-Better-Completion

Create Custom 'myAutoComplete'

Closed this issue · 1 comments

how can i create a "Custom AutoComplete" ?

i searched and couldnt find out how to do it ?
i manually installed your plug-in... everything works.
i enabled the ones i needed, at the bottom there is 3 you left false.

i added "myEasyPDO": true

then i went and looked at the folder..
..\Sublime Text 3\Packages\Sublime-Better-Completion-master\sublime-completions

thats where all the autocomplete files are
API-completions-{* NAME *}.sublime-settings

I created a :   API-completions-myEasyPDO.sublime-settings
(I used the same name i used for  'true' )

I looked at the HTML one to see how the syntax works
even a simple <h1> tag looks like this :
    [ "h1\tHTML/Element", "<h1>$1</h1>"],

i can see that the " \t " is a tab

one of the functions is like this:      Fetching a single value from DB
$count = $db->FetchValue('SELECT COUNT(ID) AS Total FROM widgets WHERE Quantity < ?', 'i', 2);

so to figure out how to add each function, i will start with that one...
and break it down to a template or basic structure

[ "FetchValue\tmyEasyPDO/Element", "$db->FetchValue($1);"],
or
[ "FetchValue\tmyEasyPDO/Element", "$db->FetchValue(SELECT $1 FROM $2 WHERE $3);"],

Could you look at that site and examples and see how i could implement this ?
no where in Package Control is there ANYTHING for MySQL PDO

there's only 12 functions, that i'm trying to incorporate
http://easypdo.robpoyntz.com/documentation     and
http://easypdo.robpoyntz.com/examples

if you could show me an example or add this library page...

also at the top of each autoComplete page there are a list of files... example for HTML is :
    "scope": "text.html - source - meta.tag, punctuation.definition.tag.begin",
and JAVASCRIPT it's
   "scope": "source.js - string, source.coffee, source.js.embedded.html",
So what what my reference be ???? for myEasyPDO ?? what are these for ? i couldnt find those files nowhere

Thanks for your help
TJ
info(at)securecloud.biz[dot]biz

Please try https://sublime.wbond.net/packages/ScopeAlways


/Users/pleasurazy/Library/Application Support/Sublime Text 3/Packages/User/sublime-API-Completions-Package.sublime-settings

qq20131217-3

/Users/pleasurazy/Library/Application Support/Sublime Text 3/Packages/User/API-completions-myEasyPDO.sublime-settings

qq20131217-2

untitled.php

qq20131217-1