Nope, SciTE cannot gather such dynamic information. It is
bare-bones for the most part, and caters for lots of languages,
while the Visual Studio interface is very highly optimized for a
few particular languages. So yeah, be aware that many of the more
nifty features will be missing. But experienced programmers
usually have many editor and shell windows open, so most of us are
quite happy without those features. As always, YMMV.
> The second question is can Scite use visual studios 2005 or 2008 to
> compile the code? I got it working for php but not C.
You need to configure the command.* settings accordingly, set it
in your user properties file or a per-directory properties file.
Visual Studio has an integrated C/C++ compiler. PHP code is never
compiled, unless you are using a Zend optimizer? So you are always
just editing PHP code.
To configure C/C++ settings, you need to know what the
command-line options are, then set the property files accordingly.
The other way is the old school method: just use SciTE as an
editor, and run "make" or "nmake" using a separate command line
window.
HTH,
--
Cheers,
Kein-Hong Man (esq.)
Kuala Lumpur, Malaysia
For this to work, SciTE would need to know what a variable is,
therefore it should compile the file with an internal compiler
(a more complicated lexer might be enough) for every supported
language. At the momoent, this isn't so.
Maybe the attached LUA file (dabbrev.lua) can help you.
It will search for all words in the current buffer that begin
with the word at the cursor and display a list of such words.
You have to type at least the first char of the
variable/function/... you want to insert.
(the list is currently unsorted)
To use dabbrev, save it to your scite directory.
You will need to download SciteExtMan and put it
in the scite directory.
Then create a file named "startup.lua" and add:
require('extman')
require('dabbrev')
scite_Command 'Complete symbol (dynamic)|dabbrev|Ctrl+J'
Finally edit your SciTeUser.properties and
ext.lua.startup.script=$(SciteDefaultHome)/startup.lua
You can modify the shortcut as you see fit.
Now open the file from your first example, type
ln
and press Ctrl-J. "ln" should expand to lname.
If you type
st
and press Ctrl-J, scite should display a list:
struct
stud
Possible improvements of dabbrev are:
- sort list
- search all loaded buffers for possible completions
- search a ctags file
- case-sensitive search
- create the list based on current syntax context, for
example do not include words from comments when in code
- ...
Marko