halfbrained / cuda_embed_ed Goto Github PK
View Code? Open in Web Editor NEWCudaText plugin. Show documents in an embedded editor
CudaText plugin. Show documents in an embedded editor
API
---
Plugins can use such API to open the embedded editor for any
given filename inside the current document:
try:
from cuda_embed_ed import open_file_embedded
open_file_embedded(file_name, line_index_of_gap, caption)
except ImportError:
msg_status('Plugin "Embedded Editor" is not installed')
[item1]
section=events
events=on_close_pre
let's make this event 'lazy', is it OK for plugin?
https://wiki.freepascal.org/CudaText_API#Lazy_events
currently plugin loads on closing the XML^ huge file.
I'm not sure is it issue of cuda_embed_ed or of cudatext itself.
When I press "Plugins -> Embedded Editor -> Toggle" content of included file is not shown, only controls "To new tab", name of included file, "Save" and "Close" is displayed. See attached image.
May be there is some incompability appeared, because I'm running Cudatext in Windows XP environment with Python 3.4. When I tested in Windows 7 there is all showed ok.
@Alexey-T can you help?
if lexer name contains "Pascal" (case insens) then search for this pattern
{$I dir/filename.ext}
$I
can be $i
too.
/
can be \
too on win32.
maybe add an option "pascal_lexer_names=" to comma separated lex names.
PROC_GET_UNIQUE_TAG: Gets integer value, which is unique for the current CudaText process (it starts with 100, increasing with each call). Use this value for Editor.markers() and Editor.attr() tag values.
// list of regex patterns
// path is extracted from a named group: path, so every patter must contain one
->
// list of regex patterns
// file path is extracted from a named regex group with the name "path",
// so every pattern must contain this named group
When file is found and opened:
"Opened 'nnnnnn.css' in embedded window"
When not found:
"No embedded file was found"
Hi, I would very much like to configure the "embedded Editor" to edit Functions and Sub in quasi Zen-Mode.
It is a feature I absolutely loved from the days of Quickbasic 4.5.
You could ( and you could only ) edit your Functions in a separate Window. That included of course the ability to search and replace certain terms only in the scope of that Function.
I know there ist that ability hidden somewhere in CudaText. But I do not trust that or rather me.
Although I am working on Scripts (that should at least be short) I do have up to 4000 Lines of Code in one Script.
If a search and replace operation goes wrong, I have a hard time to fix al the replaces entries.
The Structure of my Functions are those of VBScript, but are in fact .catvbs:
Function funcReadWritePersonalIniFile(tVarName, txtWert, iRWModus)
' Thema : Liesst oder aendert den Wert e i n e r bestimmten Variable
' der persoenlichen Einstellungen.
' Eingabe : 1. Name der Variablen als String
. . .
End Function
So, is there a way to do it?
Thank you very much
Cheers
to
[embedded_editor]
editor_max_lines=24
Currently plugin searches for path on caret position. Maybe it should be cursor? Or give an option?
I have some files that used encoding different from 'utf-8'. When I trying to see them in window of embedded editor pluging I got message:
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xa4 in position 185: invalid start byte
ERROR: Exception in CudaText for toggle: UnicodeDecodeError: 'utf-8' codec can't decode byte 0xa4 in position 185: invalid start byte
Can you consider to do changes for respecting file encoding in Embedded Editor. See attached patch.
diff --git a/embed_ed.py b/embed_ed.py
index cc9d2fd..3547650 100644
--- a/embed_ed.py
+++ b/embed_ed.py
@@ -385,7 +385,7 @@ class Hint:
if self.h is None:
self.h, self.ed = self.init_form()
- with open(full_path, 'r', encoding='utf-8') as f:
+ with open(full_path, 'r', encoding=ed.get_prop(PROP_ENC, '')) as f:
text = f.read()
self.full_path = full_path
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.