adzenith thanks for the quick reply.
this seems to work
view.scope_name(view.text_point(0,0)).split(' ')-2]
adzenith thanks for the quick reply.
this seems to work
view.scope_name(view.text_point(0,0)).split(' ')-2]
[quote=“atomi”]adzenith thanks for the quick reply.
this seems to work
view.scope_name(view.text_point(0,0)).split(' ')-2]
[/quote]
view.text_point(0,0) will always just be 0, I believe.
You can also call view.settings().get(“syntax”) in order to figure out which syntax file is being used.
I don’t understand… “will always just be 0”
Sorry.
Are you talking about the return value?
I’m getting as the return value fwiw punctuation.definition…
view.text_point() returns a a text_point, which is really just an integer index of the indicated character in the buffer. Because the character at row 0, col 0 is always the character at buffer index 0, view.text_point(0,0) will always return 0.
Let me know if I’m not making any sense.
Oh I understand now.
So,
view.scope_name(0)
would work just the same.
Thanks again.
Yeah!
I just found this too (in case it helps someone passing through here)
sublimetext.info/docs/reference/api.html
Cheers!
Thanks! I’ll take a look at integrating it
This will be because it remembers your selection when using ctrl+space: what you’re seeing is the expected behaviour if, at some point you have typed ‘p’, hit ctrl+space, and selected option. To revert this, do the same thing, and select p as the completion.
Ah, I see: I thought you were talking about including the header file names themselves.
This sort of functionality would have to be done by a plugin, although looking for stdio.h or cstdio isn’t enough: you’d also have to search through all included files, recursively, in case any of those files happen to include stdio.h. It may make more sense to look at integrating something like cx4a.org/software/gccsense/ via a plugin, to have GCC to tell you what the completion options are.
This thread seems as good a place as any to ask, is there any way to change the font the default theme uses in ST2? Not talking about for the actual file area, but for the tabs, status bar, sidebar, etc.
Also has “New view on current file” made it into ST2 yet? I haven’t been able to find it.
It’s presently hard coded to use the default UI font on each platform. I’m planning on reworking some of the theming stuff soon, I may be able to squeeze it in then.
It’s working for me.
It’s not in yet.
[quote=“vostok4”]Here is the full PHP function list with snippets for every function:
bitbucket.org/vostok4/sublimeph … ompletions[/quote]
I took a quick look at this, a couple of things I noticed:
{ "trigger": "yaz_es", "contents": "yaz_es(${1:id\n }, ${2:type\n }, ${3:args\n })" },
When triggered, this would select the parameter, and the whitespace on the following line
[quote=“jps”]
[quote=“vostok4”]Here is the full PHP function list with snippets for every function:
bitbucket.org/vostok4/sublimeph … ompletions[/quote]
I took a quick look at this, a couple of things I noticed:
{ "trigger": "yaz_es", "contents": "yaz_es(${1:id\n }, ${2:type\n }, ${3:args\n })" },
When triggered, this would select the parameter, and the whitespace on the following line
Good eyes. I’ll adjust the generating script to fix up that error case, and I’ll omit static functions from classes. Will update later today, thanks!
Cleaned up and removed the class functions, latest version here: bitbucket.org/vostok4/sublimeph … ompletions