-
-
Notifications
You must be signed in to change notification settings - Fork 7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
New Editor (based on RSyntaxTextArea ) - 1.6.4 #3019
Conversation
@ArduinoBot build this please |
A really tiny detail, on Retina displays the Sketch name on the Tab is pixelated, while all the other text everywhere else is correctly rendered. What could be the cause of it? |
@duff2013 try now ;) |
@00alis you can attach a screenshot ?! |
@ArduinoBot build this please |
There are a lot of changes here that may or may not be considered improvements, depending on your expectations. (Note that the following is mostly Mac centric, although I'm guessing there may be similar issues on other platforms.) For example, this changes the behavior of Command-Left to go to the first non-whitespace character of a line instead of the first character. This corresponds with Processing's behavior but differs from the Mac default (e.g. in Xcode). Similarly, selecting text and hitting tab in Xcode seems to behave like a normal character entry (the selected text is replaced with the typed tab character), whereas other applications (like Processing) indent selected lines when you press tab. Similar comment for Command-F using the current selection as the find text. This is non-standard behavior on Mac, which has a separate keyboard shortcut (Command-E) to search for the currently-selected text. The Alt-Up and Alt-Down behavior (moving the current line up or down) is something I've never experienced in another application and wouldn't expect to happen here. Similar with Command-J (outside of vi). The syntax highlighting look different. I believe we just deliberately chose colors for various kinds of keywords; do we want to change them again? The default font also looks different. Again, who should be deciding on these aspects? This patch also seems to break some things. I can no longer click on links to open them, for example. I also can't Alt-Backspace to delete the word preceding the cursor (a standard Mac behavior). Are there improvement here that I'm missing? Otherwise, this seems to just change a lot of things without necessarily making anything better. |
@damellis |
This improvement is mainly focused on replacing the old editor at RSyntaxTextArea. This has been proposed numerous times, the RSyntaxTextArea is a component that possesses enough interesting features (that were not explored in this modification, still ...), and evolves independently of the Arduino way. One of the main points is to integrate Autocomplete Documentation of libraries in the Editor : #2692 Many of the things that you said was OSX details, I did not know (I use Linux), so there would have to meet these requirements. Could you help! |
@ArduinoBot build this please |
Here is the screenshot, even though it is not really helpful on non-retina displays. Anyway text should not pixelate at all.
We recently updated the syntax highlight of the Arduino code to match the 3 syntax groups we have (Functions, Structure and Variables). We are going to keep these new colors and keywords, because they have been carefully tested and approved. I don't see a difference in the default font, @damellis could you provide more details? Thanks! |
@ricardojlrufino I'm working on some of the reported issues while constantly merging with master. I'm pushing my changes onto https://github.com/ffissore/Arduino/tree/1.6.4-new-editor |
ATM I'm working on restoring keywords.txt color mappings |
@ricardojlrufino I've just rebased and force pushed on my branch https://github.com/ffissore/Arduino/tree/1.6.4-new-editor In order to keep this PR in sync, please: #fetch all modifications occured in the meanwhile
git fetch --all
#rebase your local copy (supposing remote is called upstream)
git rebase upstream/master
#merge my modifications (supposing remote is called ffissore)
git merge ffissore/1.6.4-new-editor
#force push onto your branch
git push -f origin 1.6.4-new-editor ArduinoBot will take care of building a fresh IDE |
As you can see, I've reverted two commits because they were either useless or changing a well documented/known behaviour/look&feel |
Trying ffissore/Arduino/tree/1.6.4-new-editor, here are a few comments: Alt-Backspace (to delete the word preceding the cursor) doesn't work. I think this is a Mac-specific keyboard shortcut, but it does work in the current 1.6.3 release. URLs in comments are no longer clickable. Code-folding isn't really useable unless line numbers are visible. Maybe if code-folding is enabled, the column next to the line numbers showing the code-folding icons should be visible, even if the line numbers themselves aren't? I like the way that code-folding in Xcode shows the closing terminator (see screenshot). How hard would it be to do something like that? I find the Alt-Up and Alt-Down (to move the current line up and down) disconcerting. Also, on Mac those keyboard shortcuts have a different meaning (move up or down a paragraph). I'd suggest removing the line-moving behavior, at least on Mac. Command-Up and Command-Down should go to the top or bottom of the editor on Mac, although this doesn't work in 1.6.3 either. This version changes the behavior of the Command-Left key to go to the first non-whitespace character in the line instead of the first character in the line. I don't think there's a clear better option here (some people prefer one and some people the other) but this is a change that may trip up people who are used to the other behavior. (Of course, the current behavior may trip up people that are used to the opposite.) In this version, the font and colors look the same as 1.6.3. |
Also, on Mac the standard is that Command-E uses the current selection for the find text, and that Command-F re-opens the search dialog without changing the find text to the current selection. It would be nice to stick to the standard. |
@ffissore I did the merge ! |
@ArduinoBot build this please |
Latest Build-251 (osx) hyperlinks are still not clickable, a.k.a not going to the website. |
There are two alternatives:
But I'll see how to enable by default ... |
Enabling [CTRL,CMD]+click to open hyperlinks
Looks like this isn't going to make it into the 1.6.4 release, is it? |
@ArduinoBot build this please |
Indeed no, it won't make it into 1.6.4, but we should be missing just proper Mac keyboard shortcuts. Merging this PR and gathering feedback through the nightly is the most conservative and secure approach at the moment |
I'd really like to work on building some features on top of this work.... so my hope is this can get merged shortly after 1.6.4 releases. Let's not hold up merging and allowing maximum time for community testing and feedback only because a couple keyboard shortcuts are missing on 1 platform. |
Rebased and merged. See https://github.com/arduino/Arduino/commits/5bc6cee1185cf780a6e0445e43accf5842f515e8 |
The bug, that no UniCode Character is accepted when typed in the editor is still present in 1.6.4. You told me via mail that there is a new editor but the bug is the same. No äöü are accepted. Who tested this? I work with a Mac OS X 10.10.3 on a Mac Book Pro. |
I haven't told you it was solved in 1.6.4. Indeed the fix is in the hourly build and will be released with 1.6.5 |
Hello & thanx for the information. It is always a little bit difficult for me because I use a Teensy 3.1 and Best regards Jörg Schreiber Jörg Schreiber Consulting Telefon: 0208-880710 Ust.-ID: DE212722362 http://www.jsob.de/ Von: Federico Fissore notifications@github.com I haven't told you it was solved in 1.6.4. Indeed the fix is in the hourly � |
Hi again, I have another problem for some time: I would like to make optional #includes, means on teensy I would like to The sense behind this is having a platform independent library for my Do you have a suggestion? Best regards Jörg Schreiber Jörg Schreiber Consulting Telefon: 0208-880710 Ust.-ID: DE212722362 http://www.jsob.de/ Von: Federico Fissore notifications@github.com I haven't told you it was solved in 1.6.4. Indeed the fix is in the hourly � |
@j-s-com while I'm really happy to see you involved into the IDE development, please don't mix different issues into one. Issues are for bug and improvement proposal only. One issue, one bug/proposal. In your case, your issue is affecting many users. Please consider searching for existing issues before posting new ones |
This is issue #2792, and also this conversation: https://groups.google.com/a/arduino.cc/forum/#!topic/developers/JwdS_1Y8o-4 Those are probably the best place to talk of improving the preprocessing to discover build dependencies. |
Arduino New Editor
These amendments replace the old editor for the RSyntaxTextArea, which is an updated library and evolves separately
It is considered a prerequisite to integrate Autocomplete (#849)
Improvements and adjustments
[x] Syntax highlight (using xml files)
[ ] load the list dynamically (is currently fixed in the code)
[x ] Code Folding
[x] Add 'Auto Format' to Editor context menu
[x] Removed menu: Find using selection (not required!)
[x] Open Reference and Links using CTRL + Click
[x] Preferences for syntax highlighting theme
[x] Muli-line ident using TAB
[x] Automatic closing doc/comment block
[x] [Linux] Installation Script that creates shortcuts on the menu and desktop (with SplashScreen)
[x] [Linux] Best ICON for Alt+TAB
[x] [Linux] fix CTRL+'/' not working (need test on MacOS !)
[x] FIX: Ugly Icon and Name on Linux (ALT+TAB Window)
New Shortcuts
Tests
[x] comment / uncomment using shortcuts, menu, popup menu
[x] Copy to HTML and Forum
[x] Auto Format
[x] Find using selection (shortcut CTRL+F)
[ ] Fix Encoding & Reload (what is this ?)
[x] Find in Reference
[x] Open URL (from comment's)
[x] Add new Tab
[x] Open / Save sketch with multiple files
[x] Highlight compilation errors (even in other tabs)
[x] Undo / Redo (even in other tabs)
[x] Undo / Redo in Context Menu (even in other tabs is consistent)
- Improved Ctrl-z system (before was 1 for 1 character, so boring)
[x] Keywords.txt (including libraries)
[x] Keep Selection / Cursor when switch between Tabs
[x] Auto-close / Identation brackets in if/method/etc..
[x] Auto ident on new Line.
[x] Menu shortcuts (tests)
[x] Syntax coloring: use the same colors (only a small modification)
[x] Preferences: Show Lines Numbers