halfbrained / cuda_console_complete Goto Github PK
View Code? Open in Web Editor NEWCudaText Console Auto-Completion plugin
CudaText Console Auto-Completion plugin
seems you get locals() on EVERY on_key?
# get Console locals()
Parcel._locals.clear()
app_proc(PROC_EXEC_PYTHON, 'from cuda_cns_complete.cns_complete import Parcel; '+
'Parcel._locals.update(locals())')
need 1 time! save them and re-use.
except:
pass
wee need to see crashes!
win10. on typing in console ctrl+space, I got space added after the text 'os.path.e'. then completion listbox appears.
must block space-key!
patch:
def on_cns_key(self, id_dlg, key_code, data='', info=''):
state = data
if key_code == VK_SPACE and state == 'c':
self.complete()
return False # block typing of Space key
add one line instead
Does code checks for lexer Python? it cannot work in C++ files
count = dlg_proc(hcons, DLG_CTL_COUNT)
for i in range(count):
props = dlg_proc(hcons, DLG_CTL_PROP_GET, index=i)
if props and props.get('type') == 'editor_edit':
dlg_proc(hcons, DLG_PROP_SET, prop={
'keypreview': True, # Should be True if form needs to handle on_key_down.
'on_key_down': self.on_cns_key,
})
break
2021.02.01
initial version
=dlg
, ctrl+space=dlg
.=ddlg_color()
- 2 d chars!s='dl<caret>www'
this must not give work. now it gives dlg_
names!
why do u read in config()?
As of Python 3.6, f-strings are a great new way to format strings.
dlg_proc(hcons, DLG_PROP_SET, name='input', prop={
'keypreview': True, # Should be True if form needs to handle on_key_down.
'on_key_down': self.on_cns_key,
})
Also works in document tabs; this goes nicely with "Execute selected text in console" command from "CudaExt" plugin.
Other auto-completion plugins will interfere with this plugin's functionality in document tabs if command in "Command Palette" is assigned "Ctrl+Space" hotkey.
и что тогда юзеру делать? не поянтно.
надо написать про чтото типа "вызывайте комплит для редактора через Plugins/.... или дайте команде плагина другой хоткей".
del
dlg_proc(DLG_CTL<caret>_DELETE
choose DLG_CTL_HANDLE -> wrong result
let's add opts?
from settings/plugins.ini you can read one option
[console_complete]
replace_right_part=1
and second option for string in listbox 1st column
prefix=id
maybe opt-3, bool-- "add 3rd listbox column with brackets"
add_func_params=1
CudaText plugin: Console Auto-Completion
and
CudaText plugin: File URI Handler
and
CudaText plugin: Extended Selection
del
fn_config = os.path.join(app_path(APP_DIR_SETTINGS), 'plugins.ini')
SECTION = 'console_complete'
these globals also suggested!
f[ctrl+space]
->
file_open
finder_proc
fn_config
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.