Commit graph

96 commits

Author SHA1 Message Date
Rémi Verschelde ae8f984cf3
Merge pull request #21730 from reisraff/fixing_key_shortcut
#21500 Fixing key shortcut
2018-09-13 12:09:17 +02:00
Rémi Verschelde 1a16dabfb5
Merge pull request #21982 from luzpaz/misc-typos
Misc. typos
2018-09-13 10:59:00 +02:00
luz.paz 08bde5b2de Misc. typos
Found via `codespell -q 3 -I ../godot-word-whitelist.txt --skip="./thirdparty,*.po"`
2018-09-12 21:39:17 -04:00
Rémi Verschelde 277b24dfb7 Make core/ includes absolute, remove subfolders from include path
This allows more consistency in the manner we include core headers,
where previously there would be a mix of absolute, relative and
include path-dependent includes.
2018-09-12 09:52:22 +02:00
Rafael Reis d1d1f4a776 #21500 Fixing key shortcut 2018-09-03 11:39:07 -03:00
Hugo Locurcio af139af69e
Fix some editor shortcuts' default values not being set properly
This also changes the uppercase/lowercase/capitalize shortcuts
to Shift+F4, Shift+F5 and Shift+F6 respectively to avoid conflicts
with the new Find Next shortcut.

This closes #21612.
2018-09-01 16:20:47 +02:00
Rémi Verschelde ac38b7e97b
Merge pull request #21496 from tko/macos-complete
[macOS] change "Complete Symbol" shortcut to not conflict with Spotlight
2018-08-28 07:40:55 +02:00
Tommi Komulainen c2f0b4c9c6 [macOS] change "Complete Symbol" shortcut to not conflict with Spotlight
The default shortcut for Spotlight search is Command+Space so try not to
use it. Instead use Ctrl+Space similar to Xcode.
2018-08-27 20:39:43 +02:00
Tommi Komulainen 464756ec0f [macOS] fix conflicting keybindings for (Find and) Replace...
```
Play Scene        Command+R           (no change)
Replace...        Command+R        => Option+Command+F
Find Function...  Option+Command+F =>   Ctrl+Command+J
```

On macOS Option+Command+F is commonly used for Find and Replace so use
it instead to avoid conflicting with "Play Scene"

And as Option+Command+F is currently used by "Find Function..." rebind
the latter to Control+Command+J which is the Xcode shortcut for
"Jump to Definition"

Fixes #19817
2018-08-27 20:28:24 +02:00
Rémi Verschelde 52466d57e9 Make some debug prints verbose-only, remove others 2018-08-24 14:59:01 +02:00
George Marques eb48119821
Added system for GDScript warnings
- Count and panel per script.
- Ability to disable warnings per script using special comments.
- Ability to disable warnings globally using Project Settings.
- Option to treat enabled warnings as errors.
2018-08-10 16:00:47 -03:00
Ian 1bb13e95a8 context menu improvements 2018-07-26 08:58:35 -04:00
Paulb23 8ff747171f Allow opening and editing of any utf_8 file in script editor 2018-07-22 11:55:56 +01:00
Paulb23 765d6752bb Refactored text manipulation into CodeTexteditor 2018-07-22 11:48:59 +01:00
George Marques 03746da73f
Add editor highlight for type-safe lines
The line number is hightlighted to indicate that the line contains only
type-safe code.
2018-07-20 21:55:18 -03:00
Max Hilbrunner c488a74e0c
Merge pull request #19498 from guilhermefelipecgs/fix_regression
Fix "find and replace" initializing with wrong size
2018-07-05 04:23:18 +02:00
Max Hilbrunner 165f3c31a5
Merge pull request #19166 from Grula/issue-18779
Changed "Syntax Menu" into radio Menu
2018-07-03 17:39:17 +02:00
Guilherme Felipe 5bae3693bf Fix "find and replace" initializing with wrong size
Fix the code editor outside the allowed limits.
2018-06-13 14:08:04 -03:00
Rémi Verschelde 3f09cac267 Fix shortcuts using KEY_MASK_CTRL instead of KEY_MASK_CMD
KEY_MASK_CMD is automatically replaced by KEY_MASK_CTRL on non-OSX
and KEY_MASK_META (Command key) on OSX, so it should be used for all
Ctrl/Cmd + key shortcuts.

Also de-hacked the macOS shortcut replacements with proper conditional
definition. Not tested on macOS, cannot judge if they are good shortcuts.

Fixes #10761.
2018-06-11 07:53:28 +02:00
NIkola Grulovic bc666c42ff Syntax Menu as sub-menu of Edit
Moved syntax menu to be sub-menu of edit, as-well made choices radio buttons
2018-06-01 21:32:19 +02:00
Juan Linietsky 6e9517ca83
Merge pull request #18642 from flashyincceo/engine-click
Fix script editor CTRL+CLICK on singleton functions
2018-05-07 11:49:34 -03:00
Max Hilbrunner c587cac304
Merge pull request #18308 from ericmccarthy7/develop
Fix clone down newline bug
2018-05-07 14:49:23 +02:00
Peter Folkins 0c1a71b047 Fix script editor CTRL+CLICK on singleton functions 2018-05-05 13:23:47 -05:00
Hugo Locurcio 1c419531a0 Change ".." punctuation for "..." in editor strings (#16507) 2018-04-22 19:36:01 +02:00
Eric McCarthy 02b7b916b7 Fix clone down newline bug
Previously cloning down at the end of a script was broken if there was
not an additional empty line.

This fix ensures there is an empty line before attempting to clone
downwards.

Fixes #18206, cheers!
2018-04-19 20:35:42 -04:00
Juan Linietsky 3a08f1748b
Merge pull request #16571 from Zylann/find_in_files
Added find & replace in files
2018-04-08 17:24:26 -03:00
Rémi Verschelde 5ede505f14
Merge pull request #17923 from Paulb23/add_abstract_syntax_highlighter
Abstracted the syntax highlighter from text edit.
2018-04-04 09:50:51 +02:00
Felix Yang 7d5a40c3e6 Ctrl+Clicking a enum now scrolls down to it in the docs. 2018-04-03 21:56:54 +02:00
Paulb23 f7c727e6c3 Abstracted the syntax highlighter from text edit 2018-04-02 12:41:44 +01:00
Poommetee Ketson caa0d513ab ScriptTextEditor: fix capitalize offset 2018-03-12 01:37:41 +07:00
Marc Gilleron f637ad84e3 Added find & replace in files 2018-02-19 22:38:58 +01:00
Yan Pas 7368978a48 Delete all selected lines using the delete line shortcut in script editor 2018-02-17 17:56:13 +03:00
Rémi Verschelde dff0c41fe8
Merge pull request #16374 from ianb96/drop_at_mouse
Drop path text at mouse pos
2018-02-13 11:25:55 +01:00
Artem Varaksa 3094e89782 Fix #16479 (deselect text when jumping to function) 2018-02-08 21:12:08 +03:00
ianb96 06965f2770 drop path text at mouse pos 2018-02-03 22:35:44 -05:00
Razah 72901936cc Fix shortcut conflict
fix https://github.com/godotengine/godot/issues/16054
The clone_down shortcut that conflicts with the "editor / play" shortcut has been replaced by "SHIFT + COMMAND + C" instead of "COMMAND + B" on macOS
2018-01-25 19:24:51 +03:00
Paulb23 896a0c5ef5 Fixed member keywords colour not updating on settings change 2018-01-14 16:31:46 +00:00
Juan Linietsky 419705db6e Add special coloring to members, to make shadowing more obvious. 2018-01-12 11:01:09 -03:00
Rémi Verschelde e4213e66b2 Add missing copyright headers and fix formatting
Using `misc/scripts/fix_headers.py` on all Godot files.
Some missing header guards were added, and the header inclusion order
was fixed in the Bullet module.
2018-01-05 01:22:23 +01:00
Rémi Verschelde b50a9114b1 Update copyright statements to 2018
Happy new year to the wonderful Godot community!
2018-01-01 14:40:47 +01:00
volzhs 4b0f075e95 Respect text editor highlighting color changes
Fix #14838
2017-12-28 23:49:15 +09:00
MattUV a55870cd81 Adds an option to move cursor with right click in TextEdit
Fixes #14832
- Added an option in the editor settings/cursor to make the cursor move with right click.
- If the option is activated (true by default), a right click will move the cursor before displaying context menu.
 - If there is a selection, a right click on it will keep it selected, a right click outside it will unselect it.
 - The option is available in textEdit via an inspector property (or via GDScript): caret_moving_by_right_click
 - The option is available in the script editor and the shader editor via the editor settings
 - The documentation has been updated with the new property, and a few other entries in TextEdit.xml.
2017-12-20 09:01:09 +01:00
Rémi Verschelde 03fb1fd7fa
Merge pull request #14613 from voithos/fold-jump-bugfix
Account for folded code blocks when navigating via members list
2017-12-16 01:16:25 +01:00
MattUV db020f3cea Modifies indentation behaviours
Partially fixes #14559 (see the issue for details);
Removes some code redondancy ;
Adds the possibility to indent left and right without selecting text ;
Adds the entries to the context menu when text is not selected ;
Renames indent_selection_left() and indent_selection_right() to indent_left() and indent_right() ;
Unifies context menus of shader text editor and script text editor.
2017-12-15 10:04:56 +01:00
Zaven Muradyan f139d0e4e6 Account for folded code blocks when navigating via members list
Previously, the editor would attempt to set the scroll position to the
function's line number, but this would result in an invalid scroll
whenever functions above the target were folded.

This changes callback to use a combination of `goto_line` and
`set_edit_state` to navigate to the target line and reset the cursor to
column 0.

Using `goto_line` also has the side effect of automatically unfolding
the target function, which seems like useful behavior.

Fixes #14572.
2017-12-12 21:40:12 -08:00
MattUV e669ca2576 Modify shortcuts and menus to fold/unfold code
Fix #13180
As the same shortcut cannot be assigned to two actions, I removed the ability to fold (fold_line()) or unfold (unfold_line()) via menu (still possible by code), and there is a single fold/unfold action (toggle_fold_line()).

The new default shortcut is now Alt+F
2017-12-08 19:21:48 +01:00
Paulb23 48ad133cf9 Changed current line draw order and added code folding color 2017-12-07 19:17:43 +00:00
sersoong 94adf24798 Add uppercase and lowercase to rightclickmenu in scripteditor 2017-12-07 16:09:02 +08:00
Andreas Haas faaa012b84
Script Editor: Use first non-whitespace comment delimiter.
As suggested by @neikeq in https://github.com/godotengine/godot/pull/13489#issuecomment-348690816
2017-12-04 18:33:43 +01:00
Andreas Haas 07aa9d0506
Script Editor: Make comment delimiter language dependent. 2017-12-01 20:54:36 +01:00