matkuki / qscintilla_docs Goto Github PK
View Code? Open in Web Editor NEWDocumentation for QScintilla editing component of the PyQt framework
Home Page: http://qscintilla.com/
License: GNU General Public License v3.0
Documentation for QScintilla editing component of the PyQt framework
Home Page: http://qscintilla.com/
License: GNU General Public License v3.0
I am working on a simple editor using QScintilla and PyQt5. I can replace certain characters using SCI_SETREPRESENTATION (for e.g. I can show '-' instead of a space). However, all control characters are rendered inverted on a black background. I have read in the docs that the function SCI_SETREPRESENTATIONAPPEARANCE can be used to control the appearance but this function is not implemented in the port.
Is there an alternate method to format the display of control characters using QScintilla?
Any idea about this question ?
First of all, let me tell you I've read the whole https://qscintilla.com/margins/ section from the docs but I still don't understand why I'm not able
to make proper coloring in this issue Different colors to SublimeText.
Right now I'm hardcoding it to force the same margin color than Sublime using this statements but that's been ignored for some reason I don't understand.
Of course, the above is just a test and the margins should eventually be used from the .tmTheme, like here
Hopefully you can bring some light to this as I've tried to figure it out for a while already ;)
@matkuki Hi! nice to meet you, I've seen you're the author of qscintilla.com and let me tell you that's a really nice website to learn more about QScintilla. Qscintilla docs aren't very intuitive so a simple website like yours is definitely really helpful.
That said, reason I was contacting you is because I'm trying to solve some questions about QScintilla... I'd like to create a little qscintilla editor with some features borrowed from Sublime Text (commenting, bookmarks, folding, multiselection, find_all_under) but logic behind those is still not clear to me, recently I've been opening some question on Stackoverflow about some of them, for instance:
Considering you're quite the expert using QScintilla, let me ask you, any idea about these subjects? Asking you cos it seems Qscintilla isn't very popular on the Stackoverflow community, so I've noticed asking there I won't be getting too much help :/
Thanks in advance.
Bruno.
In your example qscintilla_docs/examples/custom_lexer_basic_with_folding.py there is no folding at all.
what is the QT_NO_ACCESSIBILITY ,What is its function ?
I found a problem,is a bug . when i change a end-of-line of doc from windows to linux format,too slow !
I am in qt5.12 。The doc size is 480k, it took at least three minutes。I debug found if define this QT_NO_ACCESSIBILITY, The speed picked up immediately。
void QsciScintillaQt::NotifyParent(SCNotification scn) --- the code which define with QT_NO_ACCESSIBILITY,tow slow .
Can author give some advice?
The QScintilla auto-indent builtin feature behaves really bad, look at:
Would you know how to tackle this one?
Ty in advance :)
At this page (https://qscintilla.com/text-wrapping/) example for startFlag.WrapFlagInMargin
must use wrap_visual_flags_3.png
rather than wrap_visual_flags_0.png
. Your PDF seems to have no such issue, and most likely it exists only on the website.
P.S. Thank you both for your work. Both docs and website are extremely useful considering how cryptic Scintillla and Qsci are.
Hiya! how you doing? Just to let you know I've created this SO thread you may be interested to give it a shot ;)
It's rewarded with 500 bounties!
Hopefully you'll find it an interesting subject :)
It would be really nice if you add macros to the documentation.
Here a description how they work:
First you need to create a macro with the QsciMacro Class. It takes QsciScintilla as argument.
macro = QsciMacro(self.editor)
You can start recording macros with startRecording(). It doesn't need to be in a thread or something else.
macro.startRecording()
You can stop recording with endRecording().
macro.stopRecording()
You can play a recorded macro with play()
macro.play()
If like to save a macro, call macro.save(). If will return a string, that can be saved in a file or something else.
f = open("myMacro.txt","w",encoding="utf-8")
f.write(macro.save())
f.close()
You can load a macro from a string, that you created with macro.save() with macro.load().
macro = QsciMacro(self.editor)
f =open("myMacro.txt","r",encoding="utf-8")
macro.load(f.read())
f.close()
macro.clear() clears a macro.
That was all I found about about macros. I hope it helps you to complete your great documentation.
when find or replace at regex, such as ^$\r\n, The newline symbol at the end of the line cannot be recognized. If you want to replace these characters, you will fail. It's not a good idea。
Sci::Position BuiltinRegex::FindText(Document *doc, Sci::Position minPos, Sci::Position maxPos, const char *s,
bool caseSensitive, bool, bool, int flags,
......
Sci::Position startOfLine = doc->LineStart(line);
Sci::Position endOfLine = doc->LineEnd(line); ------->myabe to change with LineStart(line+1)
when load a big text file, such as 30M size , i see The memory usage is within 400M.
but when i change into word warp mode, Memory crept up to 1.5 gigabytes.
After exiting the wrapping mode, memory can come down。
I found notepad++ no such problem. There should be a memory problem, can author find it?
Hello Matic,
Thanks for making this impressive documentation and https://github.com/matkuki/ExCo .
Question:
text = bytearray(editor.text().lower(), "utf-8")[start:end].decode("utf-8")
I wonder if there is an API giving us a Python bytes
or a Python proxy of CXX side bytes used in Scintilla? The current one is quite heavy.
Hi again! I've asked about this one few weeks ago and also opened an issue on scintilla tracker at sourceforge. It seems Neil Hodgson won't implement it though and I dont know how to overcome these limitations
So, if you know how to achieve this behaviour, could you please describe me how to implement it? By doing so the usability of pyblime v0.0.2 would be increased drastically and starting to feel like coding in sublime
Thanks!!! As usual... ;)
Hi, how you doing?
I've created a little standalone text editor that uses QScintilla and it supports some textmate features but it's on the very early stage and there is a lot of work to do to get it in shape. I'd need people with real skills like you to share the workload and make it usable, you can read a little bit about it here, would you like to join?
Yours,
Bruno
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.