Commit Graph

98 Commits

Author SHA1 Message Date
c4770a5b5d Tweak some editor texts' capitalization, use "Go to" instead of "Goto"
This also fixes a typo in the `debugger/debug_with_external_editor`
shortcut.
2018-09-25 22:51:13 +02:00
4efcf9c943 Fixed syntax highlighting setting not being saved
Fixed syntax highlighting setting not being saved
2018-09-20 11:31:53 +02:00
ae8f984cf3 Merge pull request #21730 from reisraff/fixing_key_shortcut
#21500 Fixing key shortcut
2018-09-13 12:09:17 +02:00
1a16dabfb5 Merge pull request #21982 from luzpaz/misc-typos
Misc. typos
2018-09-13 10:59:00 +02:00
08bde5b2de Misc. typos
Found via `codespell -q 3 -I ../godot-word-whitelist.txt --skip="./thirdparty,*.po"`
2018-09-12 21:39:17 -04:00
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
d1d1f4a776 #21500 Fixing key shortcut 2018-09-03 11:39:07 -03:00
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
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
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
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
52466d57e9 Make some debug prints verbose-only, remove others 2018-08-24 14:59:01 +02:00
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
8ff747171f Allow opening and editing of any utf_8 file in script editor 2018-07-22 11:55:56 +01:00
765d6752bb Refactored text manipulation into CodeTexteditor 2018-07-22 11:48:59 +01:00
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
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
165f3c31a5 Merge pull request #19166 from Grula/issue-18779
Changed "Syntax Menu" into radio Menu
2018-07-03 17:39:17 +02:00
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
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
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
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
c587cac304 Merge pull request #18308 from ericmccarthy7/develop
Fix clone down newline bug
2018-05-07 14:49:23 +02:00
0c1a71b047 Fix script editor CTRL+CLICK on singleton functions 2018-05-05 13:23:47 -05:00
1c419531a0 Change ".." punctuation for "..." in editor strings (#16507) 2018-04-22 19:36:01 +02:00
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
3a08f1748b Merge pull request #16571 from Zylann/find_in_files
Added find & replace in files
2018-04-08 17:24:26 -03:00
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
7d5a40c3e6 Ctrl+Clicking a enum now scrolls down to it in the docs. 2018-04-03 21:56:54 +02:00
f7c727e6c3 Abstracted the syntax highlighter from text edit 2018-04-02 12:41:44 +01:00
caa0d513ab ScriptTextEditor: fix capitalize offset 2018-03-12 01:37:41 +07:00
f637ad84e3 Added find & replace in files 2018-02-19 22:38:58 +01:00
7368978a48 Delete all selected lines using the delete line shortcut in script editor 2018-02-17 17:56:13 +03:00
dff0c41fe8 Merge pull request #16374 from ianb96/drop_at_mouse
Drop path text at mouse pos
2018-02-13 11:25:55 +01:00
3094e89782 Fix #16479 (deselect text when jumping to function) 2018-02-08 21:12:08 +03:00
06965f2770 drop path text at mouse pos 2018-02-03 22:35:44 -05:00
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
896a0c5ef5 Fixed member keywords colour not updating on settings change 2018-01-14 16:31:46 +00:00
419705db6e Add special coloring to members, to make shadowing more obvious. 2018-01-12 11:01:09 -03:00
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
b50a9114b1 Update copyright statements to 2018
Happy new year to the wonderful Godot community!
2018-01-01 14:40:47 +01:00
4b0f075e95 Respect text editor highlighting color changes
Fix #14838
2017-12-28 23:49:15 +09:00
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
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
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
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
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
48ad133cf9 Changed current line draw order and added code folding color 2017-12-07 19:17:43 +00:00
94adf24798 Add uppercase and lowercase to rightclickmenu in scripteditor 2017-12-07 16:09:02 +08:00