|
QsvEditorBeta
IntroductionThe QtSourceView project currently consists of a framework for syntax highlighters. The project needs also a text editor control, more suitable for code editing.
Planned features
The editor should also have these characteristics:
Get the codePlease remember that this project is still being developed. The development phase of the QtSourceView library can be described as:
The status of the editor control is that the final set of features is been written, some have been implemented and some not. When the code is stable enough it will get cleaned up and documented and it will move to the library. If you still want to review the code, here is the SVN to get it from: svn co http://qtedit4.googlecode.com/svn/tools/qtsourceview/ qtsourceview The editor control is available as demos/demo4/demo4-debug.pro. Status/TODO
Feature walk trough
Line numbers should be displayed as a side panel, which can be optionally hidden. Then panel should also display information about the line: an icon representing it's state, or has it been modified since the file has been loaded. No popups, a file modification panel should be displayed if the file has been modified outside the editor (edited, or deleted). If the file has been modified, place a link to reload the file. When text has been found the search control should change it's color to blue. If not found, the color should change to green. Search control should have a button for clearing the text, which should also set the background to white. When searching, you can press escape to close the control, and then pressing it once more will clear the selection. The replace widget will start changing text only when the enter key or "Replace" button have been pressed, however, the "Text to find" input line will change colors, as the find control, to help the user understand what will happen when he presses the replace button. The Goto line control will also display the length of the file being edited. The user should be able to press control+b (shortcut taken from Kate) to toggle mark a line as a bookmark and to navigate between bookmarks in the same file, he should press control+page up, page down to navigate between them. Since this is done using a QAction, shortcuts can be modified. Lines marked as bookmark should have a different background. The editor should display spaces as "dots" and tabs as ">>" arrows. This is to aid people coding in languages like python in which blocks are defined as indentations. This also helpes developers to enforce the coding styles of their projects. The most important line of the text editor is the one being edited at the moment. It should be easy to identify it. The line should have a different background and the line on the side panel should be marked with bold. In code editors, line can have different states, for example bookmark, brakpoint, current line in the debugger and more. Lines with such state should have a different background. If a line has 2 different status (both bookmark and breakpoint) the effective background color should be a composition of all the colors of the status of that line. The editor will have a smart home/end, this means that pressing home will navigate not to the first char of the line, but to the first non white-space character. Same for pressing end. Pressing control+up arrow should scroll the page up without moving the text cursor, same for control+down arrow. Printer margins display where the document will cut off if it would be printed. Some projects (like Debian) demand that their documentation must be trimmed at 80 rows, so this will help people editing Debian documentation. The tab size should be modified using, by specifying a number of spaces, not pixels. When the user presses ( the editor will also automatically add ). If some text is selected, and the user presses ", the selected text will be surrounded by ". If a user presses [ and text editor adds ], upon deletion of [ or ] both chars will be deleted. The bracket list should be easy to modify by the user. When the user loads a file, keep note of all modified lines, so he can know what did he change, even without asking the version control system about it. The editor needs a configuration dialog. It should be able to modify most aspects of the control, while still not beeing too complicated to use. Also, since in some applications developers will have several controls in their applications, the configuration dialog shuold emit a signal new configuration is available which all editors should connect to. This way, pressing Ok on the configuration dialog will modify n controls. VIM (also emacs and kate) have support for setting the tab width per file, this is called modeline magic, and is described in the following links: The editor should have support for this. The editor should be able to print it's content. Need to create a dialog for printing part of the document, having a banner etc. |
► Sign in to add a comment