Compare commits

...
Sign in to create a new pull request.

1,638 commits

Author SHA1 Message Date
Joey Payne
ca8da0a3f3 Merge remote-tracking branch 'upstream/master' 2015-06-04 14:23:14 -06:00
Lennart Kats
f10da4cdb0 Merge pull request #2523 from ajaxorg/fix/various
Fix several small issues
2015-06-01 17:59:08 +02:00
Lennart Kats
d953740339 Merge pull request #2507 from ajaxorg/c9
Sync with cloud9
2015-06-01 17:39:25 +02:00
nightwing
6cec0b28b2 improve tmlanguage importer 2015-06-01 13:50:32 +04:00
nightwing
3f31ca57ed fix typo 2015-06-01 01:06:39 +04:00
Joey Payne
fb7144b622 Merge remote-tracking branch 'upstream/master' 2015-05-31 11:49:42 -06:00
nightwing
2249d06337 fix #2484 Hard-coded characterWidth in static_highlight.js
and remove dependence on mockdom
2015-05-31 17:42:00 +04:00
nightwing
1514d5f374 fix #2483 Exception on ctrl-alt-shift-click when $enableJumpToDef is true 2015-05-31 17:42:00 +04:00
nightwing
446e3e1bf9 fix #2522 Popup position is off when gutter isn't shown 2015-05-31 17:42:00 +04:00
Harutyun Amirjanyan
652dd7009c Merge pull request #2516 from ajaxorg/fix/highlighter
fix highlighting of tables in Gherkin  mode
2015-05-31 16:45:58 +04:00
Harutyun Amirjanyan
3d23e1e98f Merge pull request #2518 from ajaxorg/autocompleter
fix autocomplete blur handler
2015-05-31 16:45:36 +04:00
Harutyun Amirjanyan
cafc7e7ce1 Merge pull request #2521 from puffnfresh/patch-1
Fix invalid syntax in autoresize.html
2015-05-31 16:45:13 +04:00
Brian McKenna
abdc4c7510 Fix invalid syntax in autoresize.html
The options literal had a duplicate key.
2015-05-29 09:55:02 -06:00
nightwing
8c1d0ab7cf fix autocomplete blur handler 2015-05-28 13:56:33 +04:00
nightwing
9f57989043 fix highlighting of tables in Gherkin mode 2015-05-28 13:40:56 +04:00
nightwing
2a089863e2 fix highlighting of line-height:1.5 in less mode 2015-05-22 22:14:29 +04:00
nightwing
386c508042 convert paste into command 2015-05-22 22:14:15 +04:00
nightwing
dc7643db8d better invisible tabs (fixes #2109) 2015-05-22 21:57:13 +04:00
nightwing
5705a7c2c1 fix toggle comments in handlebars mode 2015-05-22 02:34:43 +04:00
nightwing
2e2d9bcdc9 add more php extensions 2015-05-22 02:34:43 +04:00
nightwing
a799a4086f fix quote pairing for "\n" 2015-05-22 02:34:43 +04:00
nightwing
af5c7a9c3b improve require support in worker 2015-05-22 02:34:30 +04:00
nightwing
fe96eef206 fix require for paths ending with .js in the worker 2015-05-21 23:01:27 +04:00
Lennart Kats
0a3b002e28 Merge pull request #1819 from ajaxorg/v-1.2
Refactor document delta handling for v1.2
2015-05-21 11:15:29 +02:00
nightwing
60439d927f update changelog 2015-05-21 13:01:17 +04:00
Lennart Kats
95bb17d04b Merge pull request #2496 from ajaxorg/fix/renderer
fix renderer issues with autosize
2015-05-21 10:57:04 +02:00
Lennart Kats
2c1b565591 Merge pull request #2500 from ajaxorg/fix/tokenizer
fix highlighting stopping randomly in the middle of the file
2015-05-21 10:53:05 +02:00
Harutyun Amirjanyan
53ea1a8665 Merge pull request #2502 from Pike/patch-1
Add array-of-tables to keygroup markup for toml files.
2015-05-20 22:30:19 +04:00
Axel Hecht
9534e4ea92 Add array-of-tables to keygroup markup
The markup for array-of-tables at https://github.com/toml-lang/toml#array-of-tables is
[[ foo ]]

Right now, the last ] isn't part of the markup. Figured making this an explicit token is the most apparent way to fix this.
2015-05-20 14:53:02 +02:00
nightwing
fa86327b3d fix highlighting stopping randomly in the middle of the file 2015-05-19 17:43:10 +04:00
Joey Payne
a68e8bea01 Merging latest commits.
Merge remote-tracking branch 'upstream/master'
2015-05-16 16:02:51 -06:00
nightwing
88d8cf3447 fix renderer test 2015-05-15 02:48:12 +04:00
nightwing
9e9aa8f328 use scroller as mousetarget to not miss mouse events on scrollmargin 2015-05-15 02:44:24 +04:00
nightwing
93c39ca5b0 handle hscrollbar change during autoresize 2015-05-15 02:43:41 +04:00
nightwing
0db985a3d7 fix #2495 editor freezes when setting scrollmargin and maxLines together 2015-05-15 01:53:19 +04:00
Ruben Daniels
ad5802be06 Merge pull request #2488 from ajaxorg/rounded-corners
Add rounded corners for selections
2015-05-10 19:07:21 -07:00
nightwing
0abd9ec30e rounded corners for selections 2015-05-10 14:01:28 +04:00
Harutyun Amirjanyan
6d205a8f7e Merge pull request #2470 from ajaxorg/fix/leak
Fix memory leak
2015-05-07 01:28:22 +04:00
Harutyun Amirjanyan
d2dc26f5a5 Merge pull request #2479 from bcjordan/patch-4
Update comment, add missing semicolon [ci skip]
2015-05-07 01:27:42 +04:00
Brian Jordan
ef4537a099 Update edit_session.js
Fix extra `the`
2015-05-05 09:07:46 -07:00
Harutyun Amirjanyan
46f76b4b06 Merge pull request #2473 from Leushenko/master
Add indentation for Scheme
2015-05-05 16:31:02 +04:00
Harutyun Amirjanyan
71d1ca9d20 Merge pull request #2476 from bcjordan/patch-2
Remove unused variable `EditSession`
2015-05-05 16:26:41 +04:00
Harutyun Amirjanyan
263a45db02 Merge pull request #2477 from bcjordan/patch-3
Remove unused parameter `mutateData` & add ;s
2015-05-05 16:26:28 +04:00
Joey Payne
9323a2616b Added support for nim programming language. 2015-05-04 22:54:09 -06:00
Brian Jordan
ad22b71cfe Update comment, add missing semicolon [ci skip] 2015-05-01 10:56:08 -07:00
Brian Jordan
cd8099b0ad Remove unused parameter mutateData & add ;s 2015-04-30 17:38:19 -07:00
Brian Jordan
a61d304cbb Remove unused variable EditSession 2015-04-30 17:14:16 -07:00
Alex Gilding
e72f1d8337 Add indentation for Scheme
Just copied over the Clojure indentation rules to Scheme and changed
the keywords to suit the language, so that Scheme programs can be
automatically indented too
2015-04-28 20:24:13 +01:00
nightwing
d080fe51d4 fix #2468 error in strict mode 2015-04-28 19:01:24 +04:00
Harutyun Amirjanyan
32cb8c6b0e Merge pull request #2472 from ph1ll/master
Expose ClipboardEvent in editor paste event
2015-04-28 00:51:58 +04:00
Phill Campbell
3ce8d76c89 Expose ClipboardEvent in editor paste event 2015-04-27 18:49:12 +01:00
nightwing
a842dcdee3 do not retain ref to the first editor (fixes #2469) 2015-04-26 14:44:47 +04:00
Ruben Daniels
0dcb1281cd Merge pull request #2459 from ajaxorg/c9
Sync with c9
2015-04-25 12:30:37 -07:00
Harutyun Amirjanyan
65ad04082f Merge pull request #2460 from sevin7676/master
SQL Server typos and keyword completion modifier
2015-04-23 18:11:41 +04:00
Lennart Kats
b6f7e5d6a1 Merge pull request #2461 from ajaxorg/highlighter
Fix highlighter issues
2015-04-23 07:38:28 +02:00
sevin7676
5a3bf2570f no keyword if in brackets 2015-04-22 06:06:52 -04:00
sevin7676
2d7ebc34b6 no keyword if in brackets 2015-04-22 06:05:54 -04:00
sevin7676
87044e8816 forgot keyword completions 2015-04-22 05:38:01 -04:00
sevin7676
82453d884b better completions, no unneeded string rule 2015-04-22 05:28:31 -04:00
nightwing
636ace5178 fix typo 2015-04-22 13:20:39 +04:00
Harutyun Amirjanyan
3673aabe2a Merge pull request #2465 from bcjordan/patch-1
Remove unused variable `text`
2015-04-22 11:25:22 +04:00
Brian Jordan
694d7431b7 Remove unused variable text 2015-04-21 14:58:29 -07:00
nightwing
89b9a8ac72 address review comments 2015-04-20 18:25:32 +04:00
sevin7676
67c7da75b6 fix escape character
was using wrong escape char for string, sqlserver uses double single
quote to escape a single quote
2015-04-20 08:52:03 -04:00
sevin7676
662cd11975 no cache as its storing reference in filtered list 2015-04-20 05:08:54 -04:00
sevin7676
68d531ecb2 cleanup 2015-04-20 04:52:18 -04:00
sevin7676
e58fa3e6d7 remove completionModifer, one off for SQL Server Mode 2015-04-20 04:50:25 -04:00
nightwing
e610365e67 fix #2432 setPolling(false) doesn't turn off polling 2015-04-20 01:11:10 +04:00
nightwing
65b2cf2855 update test for rust mode 2015-04-19 20:35:57 +04:00
nightwing
2008ab813f fix bracket matching in modes imported from textmate 2015-04-19 20:29:28 +04:00
nightwing
ecb699aa11 support converting from cson 2015-04-19 20:28:12 +04:00
nightwing
63687f693b fix #2441 function highlighting in rust mode 2015-04-19 20:27:07 +04:00
nightwing
685ba18451 fix #2452 . is a valid XML tagname character 2015-04-19 20:05:25 +04:00
sevin7676
1ec6eb7b5d shorter names 2015-04-19 11:59:31 -04:00
sevin7676
1027dcea7c cache modifier 2015-04-19 11:52:54 -04:00
sevin7676
961f8c4893 completion modifier for SQL and JavaScript 2015-04-19 11:24:30 -04:00
sevin7676
27284cd29f added completionModifier
allows a highlight rule modify keyword completions
2015-04-19 11:23:10 -04:00
nightwing
04f4292fbc enable Emmet for handlebars mode 2015-04-19 17:34:22 +04:00
nightwing
4e6d48bf2e make sure operationEnd events are not emitted to wrong session 2015-04-19 17:34:22 +04:00
nightwing
80f43beb73 fix typo 2015-04-19 17:34:04 +04:00
sevin7676
cf0c81a25f more snippets 2015-04-19 08:37:22 -04:00
sevin7676
ee90854917 bug fix & typo fix 2015-04-19 08:18:04 -04:00
nightwing
ff4429dd5a fixes for emacs mode 2015-04-19 15:50:22 +04:00
nightwing
487408e84d fix +6291 Hard to tell what pane has focus in Vim mode 2015-04-19 15:50:06 +04:00
nightwing
2713d0a8db center cursor after vim jumplist motions
Conflicts:
	lib/ace/editor.js
2015-04-19 15:49:41 +04:00
nightwing
b0ce5630c9 add support for bindkey.position 2015-04-19 15:48:58 +04:00
Harutyun Amirjanyan
d89311e596 Merge pull request #2456 from kevinushey/bugfix/vim-normal-mode-yank
[vim] define 'Y' as 'keyToKey' mapping (fixes #2455)
2015-04-19 02:26:47 +04:00
Kevin Ushey
5482db1c4d [vim] fix 'Y' behaviour in visual mode 2015-04-18 15:19:28 -07:00
nightwing
eb70d5a6c8 Merge remote-tracking branch 'remotes/origin/master'
Conflicts:
	lib/ace/document.js
2015-04-19 01:04:25 +04:00
Harutyun Amirjanyan
abe0286420 Merge pull request #2458 from ajaxorg/vim
update vim mode
2015-04-18 22:00:47 +04:00
nightwing
094b8a147a update vim mode 2015-04-18 21:01:11 +04:00
Harutyun Amirjanyan
f0d01b93d4 Merge pull request #2457 from sevin7676/master
Add SQL Server (Microsoft SQL) Mode
2015-04-18 19:56:27 +04:00
nightwing
ef9cc542e7 fixes for indentedSoftWrap option 2015-04-18 19:53:49 +04:00
sevin7676
73808101cd cleanup 2015-04-18 10:06:55 -04:00
nightwing
0753f9aa12 Merge remote-tracking branch 'remotes/pull/2187' 2015-04-18 18:00:14 +04:00
Harutyun Amirjanyan
f270b4ae69 Merge pull request #2421 from mortalis13/master
Added new Sublime theme
2015-04-18 17:53:16 +04:00
sevin7676
121e0e51f4 add integer 2015-04-18 09:43:13 -04:00
sevin7676
846c2fb3d3 fix space 2015-04-18 09:35:39 -04:00
sevin7676
cd1c5a42c9 cleanup 2015-04-18 09:21:09 -04:00
sevin7676
282331b133 use pound as its the typical method 2015-04-18 09:12:11 -04:00
sevin7676
db0313f2ad fix case 2015-04-18 09:09:05 -04:00
sevin7676
37a80b35da missing execute in demo doc 2015-04-18 09:05:36 -04:00
sevin7676
75f66697f6 more cleanup 2015-04-18 08:55:29 -04:00
sevin7676
32847a6761 clean up 2015-04-18 08:53:11 -04:00
sevin7676
0d0b0b4356 updated demo doc and snippets 2015-04-18 08:45:13 -04:00
sevin7676
a0a31e16a2 cleanup 2015-04-18 08:27:22 -04:00
sevin7676
295ae4dc81 make pound optional for region 2015-04-18 08:25:47 -04:00
sevin7676
d38849ef9f added doc comment highlight to fix folding 2015-04-18 08:24:59 -04:00
sevin7676
184df6d18e inherit cstyle... trying to figure out best end marker 2015-04-18 07:29:10 -04:00
sevin7676
ff0cc12efc folding partially working.. 2015-04-18 06:37:29 -04:00
Morgan Yarbrough
1b9c8bfc88 FOLDING 2015-04-17 14:24:38 -04:00
Morgan Yarbrough
e42bc9a265 progress, and about to work on folding 2015-04-17 14:09:38 -04:00
Morgan Yarbrough
12be220297 even more keywords! 2015-04-17 12:53:42 -04:00
Morgan Yarbrough
7ae5c862c2 progress but not working yet 2015-04-17 11:17:31 -04:00
sevin7676
d8f7003fb8 add null back 2015-04-17 10:03:56 -04:00
sevin7676
76ac79f116 more progress 2015-04-17 10:00:13 -04:00
sevin7676
1a6e2f83f2 small fixes 2015-04-17 09:35:58 -04:00
sevin7676
6b62974118 good progress 2015-04-17 09:28:56 -04:00
sevin7676
461faa9184 more progress 2015-04-17 08:37:54 -04:00
sevin7676
ede82e7137 progress- save comments for reuse here 2015-04-17 08:11:21 -04:00
sevin7676
f0b3aa0a6f PARTIAL 2015-04-17 07:37:17 -04:00
mortalis13
fb5f272f81 Rename Sublime theme to iPlastic 2015-04-15 21:49:38 +03:00
mortalis13
c458f96d3a Edited lib/ace/sublime.css 2015-04-10 22:19:14 +03:00
Harutyun Amirjanyan
6070fe96f7 Merge pull request #2407 from xixixao/configure-block-select
Add configuration option for block select
2015-04-09 14:56:55 +04:00
Harutyun Amirjanyan
6a2d3fcb09 Merge pull request #2408 from bostikforever/vb-case-insensitive
VBScript is case insensitive
2015-04-09 14:52:56 +04:00
Harutyun Amirjanyan
8b29f7f3c9 Merge pull request #2411 from saxbophone/master
Wider SQL Command and Data Types Coverage
2015-04-09 14:51:33 +04:00
Harutyun Amirjanyan
48de4711eb Merge pull request #2418 from xixixao/selection-zero-height
Remove 0 height selection highlight
2015-04-09 14:50:26 +04:00
nightwing
bb3fa62824 Merge commit '510d060cb2' 2015-04-09 14:20:50 +04:00
Harutyun Amirjanyan
6bdc0d6cbb Merge pull request #2440 from grit96/patch-1
Make print margin in cobalt more visible
2015-04-09 14:20:07 +04:00
nightwing
510d060cb2 cleanup 2015-04-09 14:09:03 +04:00
Geraint White
da8d545985 Make print margin in cobalt more visible 2015-04-09 09:14:21 +01:00
César Izurieta
4f655e71d9 Make deepCopy work correctly with arrays 2015-04-05 04:39:36 -03:00
nightwing
8f686eb795 release v1.1.9 2015-04-03 13:43:18 +04:00
nightwing
6fad60f546 tweaks for the new release 2015-04-03 13:30:00 +04:00
nightwing
1ae86f896a update vim mode 2015-04-03 13:29:10 +04:00
nightwing
4e4df645cc add adoc extension for asciidoc files 2015-04-03 13:29:10 +04:00
Joshua Saxby
0bf729d88f added important keywords and data types missed out 2015-03-27 22:21:42 +00:00
Joshua Saxby
cc40177114 Revert "add some new types and change the type of existing keywords"
This reverts commit fcb4023e52.
2015-03-27 22:11:41 +00:00
Joshua Saxby
fcb4023e52 add some new types and change the type of existing keywords 2015-03-27 22:10:02 +00:00
mortalis
22f802a9ff new sublime theme 2015-03-27 12:37:59 +02:00
xixixao
14a8e1f5d9 Remove 0 height selection highlight 2015-03-25 18:07:38 +00:00
Harutyun Amirjanyan
a2e05ac438 Merge pull request #2410 from kevinushey/bugfix/r-sapply-snippet
correct snippet for 'sapply'
2015-03-21 18:06:48 +04:00
Kevin Ushey
f17c67cd01 correct snippet for 'sapply' 2015-03-19 15:30:41 -07:00
Bolutife Ogunsola
9c6720edca Update tokens test file for vbscript 2015-03-19 19:11:49 +01:00
Bolutife Ogunsola
4dd8eda928 VBScript is case insensitive 2015-03-19 18:03:01 +01:00
xixixao
cb83a974b4 Add configuration option for block select 2015-03-18 21:09:45 +00:00
Ruben Daniels
75556854b9 Merge pull request #2397 from ajaxorg/fix/various
Several small fixes
2015-03-17 15:12:49 -07:00
nightwing
7e9e5aea17 remove old code 2015-03-18 01:57:03 +04:00
nightwing
bb16d65cbb update jshint 2015-03-18 01:55:07 +04:00
Harutyun Amirjanyan
c39134411d Merge pull request #2387 from jmcphers/master
Prevent vim ex commandline from obscuring search results
2015-03-17 10:00:34 +04:00
Harutyun Amirjanyan
cb0816b183 Merge pull request #2399 from kevinushey/patch/vim-colon-selection
[vim] don't select range specifier on `:` insertion
2015-03-17 09:58:58 +04:00
Kevin Ushey
e551b090b7 don't select initial text on ':' 2015-03-16 15:50:31 -07:00
nightwing
c5602489f4 add styling for ace_invisble to all themes 2015-03-15 15:27:48 +04:00
nightwing
1c1d56b3ea make blurred state clearer in github theme 2015-03-15 15:18:10 +04:00
nightwing
a78bf8e5ef update links to emmet.js 2015-03-15 15:00:00 +04:00
nightwing
d9db903190 update rust mode 2015-03-15 15:00:00 +04:00
nightwing
4af37cd722 fix #2395 context menu regression in Firefox on mac 2015-03-15 15:00:00 +04:00
Harutyun Amirjanyan
dd69f5939c Merge pull request #2380 from trystanclarke/master
Fix typeerror "Cannot read property 'container' of undefined" in autocomplete
2015-03-15 00:09:42 +04:00
Harutyun Amirjanyan
cac9e261e3 Merge pull request #2386 from timdp/behaviours-keep-selection
CstyleBehaviour: keeping selections after insertion
2015-03-15 00:01:02 +04:00
Joshua Saxby
0216e8bbfd formatting 2015-03-11 21:27:36 +00:00
Joshua Saxby
38e3452313 added SQL data types 2015-03-11 21:05:54 +00:00
Joshua Saxby
fb7b23e627 started adding missing sql keywords and types 2015-03-11 18:42:21 +00:00
Jonathan McPherson
1b1006ac1d prevent vim ex commandline from obscuring search results (fixes #2384) 2015-03-10 14:17:17 -07:00
Harutyun Amirjanyan
101656ea5c Merge pull request #2385 from mikermcneil/patch-1
makes example work out of the box
2015-03-10 23:41:57 +04:00
Ruben Daniels
6a07619ad2 Merge pull request #2370 from ajaxorg/misc
Misc issues
2015-03-10 12:33:01 -07:00
Tim De Pauw
a5c619bda8 CstyleBehaviour: keeping selections after insertion 2015-03-09 17:44:03 +01:00
Mike McNeil
3adde642dc makes example work out of the box 2015-03-07 18:40:04 -08:00
trystanclarke
967177bbc5 Update autocomplete.js 2015-03-02 09:35:46 +00:00
nightwing
60c639a34b Merge branch 'pull/2375' 2015-02-28 22:17:25 +04:00
nightwing
de9e5226bf add tests from v1.2 branch and increase split size to improve performance 2015-02-28 22:16:19 +04:00
nightwing
76e05b7fd5 fix #2381: keycode for ; is missing 2015-02-28 21:51:18 +04:00
nightwing
2506bb0921 Merge branch pull/2376 2015-02-28 21:43:09 +04:00
nightwing
481bca1b09 use ellipsis character instead of dots 2015-02-28 21:41:30 +04:00
nightwing
01f5846ee3 static highlight can be used without editor.css 2015-02-28 20:40:54 +04:00
trystanclarke
cca4ab8b45 Merge pull request #1 from trystanclarke/trystanclarke-fix-autocomp-type-error
Update autocomplete.js
2015-02-27 16:18:03 +00:00
trystanclarke
ae4989eea1 Update autocomplete.js
Fix typeerror "Cannot read property 'container' of undefined" when using live autocomplete. Error can occur when editor loses focus and the autocomplete popup has never been shown.
2015-02-27 16:15:24 +00:00
Daniel Marcotte
6df244d429 Fit what metadata we can into autocompletes
The whole meta string currently gets dropped from the autocompletes
popup if it doesn't fit.  This leads to confusing autocompletes where
the meta for some entries are missing for no apparent reason.

So, instead of dropping the entire meta string when it doesn't fit,
insert what we can and append "..." to communicate that we clipped it.
2015-02-25 16:43:39 -08:00
Scott Glajch
b5064a4bb3 Fix for issue #2374, maximum call stack exceeded in 64 bit chrome when pasting large chunks. 2015-02-25 13:00:39 -05:00
nightwing
9905267e4d fix gutter in static highlight when wrapping is enabled 2015-02-25 00:14:14 +04:00
Harutyun Amirjanyan
bed3a18d49 Merge pull request #2366 from leanprover/add-lean-mode
add 'lean' mode for Lean Theorem Prover files
2015-02-24 23:25:57 +04:00
Soonho Kong
49ff504639 fix qqstring rule in lean-mode 2015-02-24 14:10:41 -05:00
Harutyun Amirjanyan
a035cd2558 Merge pull request #2373 from pamelafox/patch-2
Add ClassName to highlighting
2015-02-24 23:03:48 +04:00
Harutyun Amirjanyan
9a275f304d Merge pull request #2371 from pamelafox/patch-1
Adding cursive and fantasy to keywords list
2015-02-24 23:02:07 +04:00
Pamela Fox
b6910a3094 Add ClassName to highlighting
So that document.getElementsByClassName gets highlighted.
2015-02-24 10:59:36 -08:00
Soonho Kong
27ad846641 highlight names followed nameProviders in lean-mode 2015-02-24 13:21:40 -05:00
Soonho Kong
34d80e81ca clean up string rule for lean-mode 2015-02-24 13:21:22 -05:00
Soonho Kong
3c34a9852f add and sort keywords/storage-modifiers for lean-mode 2015-02-24 13:20:28 -05:00
Soonho Kong
a0fe09f3be clean up unused rules for lean-mode 2015-02-24 13:19:56 -05:00
Pamela Fox
906b6c9d8d Adding cursive and fantasy to keywords list 2015-02-24 09:30:43 -08:00
Soonho Kong
74800e84ee remove single quoted string (qstring) from lean-mode 2015-02-24 12:09:11 -05:00
Soonho Kong
8f49d3d897 add a small demo for lean mode 2015-02-24 11:11:34 -05:00
Soonho Kong
9654382294 use 'defaultToken' for comment/qqstring/qstring in lean-mode
Suggested by @nightwing
2015-02-24 11:02:06 -05:00
nightwing
5ce334e930 update CONTRIBUTING.md 2015-02-24 18:49:59 +04:00
nightwing
7572a9543e update syntax docs 2015-02-24 18:42:15 +04:00
Soonho Kong
b3da9336ee add 'lean' mode for Lean Theorem Prover files 2015-02-23 07:03:52 -05:00
nightwing
4bc34f4eae fix #2341 do not use ace_editor id for the default style 2015-02-18 23:26:22 +04:00
nightwing
16b542aea4 reduce crazy large negative top value on hidden textarea (fixes #2362) 2015-02-18 23:19:27 +04:00
Ruben Daniels
60a1281708 Merge pull request #2355 from ajaxorg/build-issues
Fix build issues
2015-02-16 11:28:20 -08:00
Ruben Daniels
2ff39c2192 Merge pull request #2322 from ajaxorg/altgr
Fix altgr handling
2015-02-16 11:27:45 -08:00
Ruben Daniels
34f57e7499 Merge pull request #2316 from ajaxorg/misc
Fix xml autodindent and several small issues
2015-02-16 11:27:16 -08:00
Harutyun Amirjanyan
04e75ea0db Merge pull request #2359 from invokr/master
Added new C++11 tokens to highlighting rules
2015-02-16 19:13:07 +03:00
Robin
b0475ce3e4 Added C++11 tokens to highlighting rules 2015-02-16 14:27:22 +00:00
Harutyun Amirjanyan
d86b2fd7ee Merge pull request #2332 from kevinushey/bugfix/xml-tag-highlighting
[xml] ensure tag name starts with letter
2015-02-16 15:27:42 +03:00
nightwing
0b20e4dc1d fix #2351 Minification fails on Windows 2015-02-12 19:46:21 +04:00
nightwing
388f0235b7 fix #2348 packaged require breaks node-webkit 2015-02-12 19:45:43 +04:00
nightwing
d9e4b52ee1 fix alt-e at the last error 2015-02-10 19:09:27 +04:00
nightwing
703a5394e3 toggle fold commands must work for all selections 2015-02-10 19:09:11 +04:00
nightwing
42b43b1fbe fix highlighting of indented bash heredocs 2015-02-10 19:08:56 +04:00
nightwing
3e32d5bf7e workaround for vim cursor getting stuck on folded lines 2015-02-10 19:07:55 +04:00
Harutyun Amirjanyan
385a285c58 Merge pull request #2334 from tylerlong/master
XAML is XML
2015-02-02 19:58:44 +04:00
Tyler Long
c840471248 XAML is XML
https://msdn.microsoft.com/en-us/library/cc295302.aspx
2015-01-29 14:47:57 +08:00
Kevin Ushey
3fe1383cdc [xml] ensure tag name starts with letter 2015-01-28 10:53:42 -08:00
Harutyun Amirjanyan
6b88b939c2 Merge pull request #2325 from mdinger/add_usize_isize_highlighting
Add Rust highlight support for isize, usize, us and is
2015-01-27 23:57:24 +04:00
mdinger
1621c1519c Add highlight support for isize, usize, us and is 2015-01-24 14:18:11 -05:00
nightwing
0da0566bac fix pagedown in vim mode 2015-01-24 18:53:41 +04:00
nightwing
b93d772720 do not overwrite ctrl-alt-0 on windows since that is used on German keyboard 2015-01-23 17:21:12 +04:00
nightwing
845a6d4e98 make detection of altGr more robust 2015-01-23 17:21:12 +04:00
nightwing
8df1eb70c5 fix typo 2015-01-23 17:07:20 +04:00
Harutyun Amirjanyan
63178a0511 Merge pull request #2318 from shiroyuki/patch-1
Add the missing mode "Django" to ext-modelist
2015-01-23 16:38:49 +04:00
nightwing
9f8cb78f37 fix require path for tests 2015-01-23 16:35:45 +04:00
nightwing
acd41efcb6 do not include all whitespace lines in vim paragraphs 2015-01-23 13:36:06 +04:00
nightwing
64eaf47c4d do not throw when running vim ':write' command 2015-01-23 13:32:20 +04:00
nightwing
c769031e78 [vim] fix w for non ascii chars 2015-01-22 22:38:32 +04:00
Juti Noppornpitak
8a8bc206db Add the missing mode "Django" to ext-modelist
This is to add Django as an alternative mode for HTML files. The placement of the entry is to ensure that Django syntax highlighter does not override HTML syntax highlighter.
2015-01-19 16:30:38 -05:00
nightwing
7db217dfe0 avoid emitting spurious changeWrapMode event 2015-01-19 01:15:24 +04:00
nightwing
847bfa4bfe cleanup 2015-01-19 01:13:05 +04:00
nightwing
135b9e5baf do not autoindent after self-closing tag 2015-01-19 01:10:03 +04:00
nightwing
c356c14940 fix weird pairing of quotes in cstyle behavior 2015-01-19 00:33:14 +04:00
nightwing
2d06dc6316 workaround for word-wrap bug on chrome 2015-01-19 00:28:51 +04:00
nightwing
8c4173ba11 Merge remote-tracking branch 'remotes/origin/master' 2015-01-18 23:44:18 +04:00
Harutyun Amirjanyan
fe57baaae1 Merge pull request #2289 from iDeBugger/master
Added XMLDOM and worker for XML syntax analysis
2015-01-18 22:37:58 +03:00
Harutyun Amirjanyan
0c3246e0df Merge pull request #2315 from xixixao/patch-1
Fix doc on editor.remove
2015-01-18 22:33:43 +03:00
Michal Srb
d21be42c8a Fix doc on editor.remove 2015-01-18 14:40:51 +00:00
Smirnov O. A
ccd5d689cc Updated xmldom dependency 2015-01-16 10:06:38 +03:00
Smirnov O. A
fb41c6ce4e Update update_deps.js for xmldom 2015-01-16 09:57:52 +03:00
Smirnov O. A
3b703dad56 Merge branch 'master' of github.com:iDeBugger/ace 2015-01-14 11:07:40 +03:00
Smirnov O. A
0a7d192b3d Merge remote-tracking branch 'upstream/master' 2015-01-14 11:06:22 +03:00
Harutyun Amirjanyan
c0b300a8e8 Merge pull request #2311 from yihangho/docs/spacing
Fix spacing in index.html
2015-01-13 17:03:16 +04:00
Yihang Ho
68abe8507a Fix spacing in index.html 2015-01-13 20:45:01 +08:00
Lennart Kats
d62315a740 Merge pull request #2309 from ajaxorg/misc
Fix several small issues
2015-01-13 09:54:25 +01:00
nightwing
eddc5563d8 update json worker tests 2015-01-12 02:23:50 +04:00
nightwing
57f6fbd768 tweak completer 2015-01-12 02:12:00 +04:00
nightwing
100022564c cancel gatherCompletions if cursor position changes 2015-01-12 01:13:27 +04:00
nightwing
b57f2e2ae3 fix inline editor demo 2015-01-11 23:23:53 +04:00
nightwing
264923e4df make worker events more consistent 2015-01-11 22:48:39 +04:00
nightwing
e1a5492a7f do not throw error when trying to match tag at the end of the document 2015-01-11 22:27:12 +04:00
nightwing
5e4facea44 fix livescript highlighting 2015-01-11 22:23:25 +04:00
Harutyun Amirjanyan
37ab8daabe Merge pull request #2300 from kevinushey/patch/vim-visual-block-move-to-eol
Conform with upstream change for Vim Visual Block + move to EOL behaviour
2015-01-07 22:49:58 +04:00
nightwing
55bf8e56d3 fix highlighting of ?" in ruby mode 2015-01-07 01:18:28 +04:00
nightwing
ced37c0c19 update jshint 2015-01-06 15:45:55 +04:00
Kevin Ushey
a50833cfea conform with upstream change
Ref:
1e5ae06ba4
2015-01-05 17:11:14 -08:00
iDeBugger
b2b0e73e0f Fixed some troubles with language and codestyle 2015-01-05 00:27:11 +03:00
nightwing
72edcd332d tweak mode_creator 2015-01-05 00:34:25 +04:00
nightwing
bcc2cd9b68 Merge remote-tracking branch 'remotes/origin/master' 2015-01-05 00:20:02 +04:00
nightwing
f4ea1ccb6a always call the callback form setMode 2015-01-05 00:17:16 +04:00
nightwing
a06739af9a Merge remote-tracking branch 'remotes/origin/fix/webkit-focus-bug' 2015-01-04 23:54:53 +04:00
nightwing
aceddd9f8f Merge branch 'pull/2273' 2015-01-04 23:54:00 +04:00
nightwing
ad9aa35ffe Revert "Reduced size of sample document" 2015-01-04 23:52:40 +04:00
nightwing
b66fb6def8 Merge branch 'pull/2269' 2015-01-04 23:50:57 +04:00
nightwing
0054bb8794 cleanup 2015-01-04 23:48:28 +04:00
nightwing
4603c34b10 workaround for webkit focus bug 2015-01-01 02:00:02 +04:00
Bernhard Weichel
07d01fda44 fixed a few typos and added more snippets 2014-12-29 22:10:03 +01:00
Smirnov O. A
4aff48a837 Added XMLDOM and worker for XML syntax analysis 2014-12-24 14:44:31 +03:00
Harutyun Amirjanyan
4b8a9a475b Merge pull request #2284 from darabos/patch-1
Fix getVScrollBarAlwaysVisible
2014-12-23 23:30:26 +04:00
Matthias S. Benkmann
eccc98b83b net.put => net.request('PUT'; improved usability for "Save" buttons 2014-12-23 16:33:56 +01:00
Matthias S. Benkmann
e7afb4f19e support glob patterns for --puttable; reformat for ancient terminals 2014-12-23 15:51:23 +01:00
Matthias S. Benkmann
8919b113d1 add server upload buttons and Ctrl-S bindings to mode_editor
in combination with PUT support in ./static.py (or whatever other web server)
this allows people to save both the highlighting rules and the demo documents right
from the mode editor for a better workflow.
2014-12-23 13:03:09 +01:00
Matthias S. Benkmann
ded43d9d69 HTTP PUT support for static.py
change host default to 127.0.0.1 for better security
improved option parsing
2014-12-23 13:03:09 +01:00
Bernhard Weichel
14850f5b9e Reduced size of sample document 2014-12-22 16:55:40 +01:00
Lennart Kats
7ff1f1dd0d Merge pull request #2283 from ajaxorg/misc
Sync with cloud9
2014-12-22 13:29:17 +01:00
nightwing
8ff856186d update tests for c mode 2014-12-22 02:47:38 +04:00
nightwing
b46a0fb4f9 do not include xml tag attributes in the fold range 2014-12-22 02:47:31 +04:00
Daniel Darabos
b9a4f293ed Fix getVScrollBarAlwaysVisible.
By accident it was returning `$hScrollBarAlwaysVisible`.
2014-12-21 22:52:21 +01:00
nightwing
724b66857d Merge remote-tracking branch 'remotes/pull/2281' 2014-12-21 13:47:50 +04:00
nightwing
56cb246c78 max stack size on chrome is smaller now 2014-12-21 13:46:41 +04:00
nightwing
fed215d046 do not discard modifier info of modifier keys 2014-12-21 13:39:25 +04:00
nightwing
7a3257ab58 fix incorrect highlighting in c and haskell modes 2014-12-21 13:39:25 +04:00
nightwing
2d12ebb1df improve global access warning in the demo 2014-12-21 13:39:13 +04:00
Kevin Ushey
15b83aca5f fix move to EOL behaviour for visual block mode 2014-12-20 13:31:23 -08:00
nightwing
60dd224d96 remove old delta shim from vim mode 2014-12-20 19:53:51 +04:00
nightwing
067a1ee68b Merge remote-tracking branch 'remotes/origin/master' 2014-12-20 19:51:39 +04:00
Harutyun Amirjanyan
5ea0a9b802 Merge pull request #2280 from ajaxorg/vim2
Update vim mode to the latest version
2014-12-20 19:45:50 +04:00
nightwing
66ede32c42 update build submodule 2014-12-20 16:19:58 +04:00
nightwing
ed5c38b7c8 update list of users 2014-12-19 18:50:55 +04:00
nightwing
b5c9b7f395 fix typo in IE mouse handler 2014-12-19 18:45:25 +04:00
Lennart Kats
7b037f35ba Merge pull request #2267 from ajaxorg/fix/various
Fix various small issues
2014-12-16 16:06:41 +01:00
Harutyun Amirjanyan
52de738e8a Merge pull request #2275 from mehtaphysical/char_reserved_in_js
change variable char to character
2014-12-16 01:01:45 +04:00
Ryan Mehta
dafa24d5e1 change variable char to character 2014-12-15 12:33:49 -08:00
Bernhard Weichel
95eed25439 small fix in the snippets 2014-12-14 23:53:52 +01:00
Bernhard Weichel
7da354d5f3 fixed Uncaught TypeError: undefined is not a functionapp_config.js:147
(anonymous function)app_config.js:146 setDefaultValuesmode_creator.js:6
2014-12-14 23:40:47 +01:00
Bernhard Weichel
18b3c57de9 Merge branch 'master' of https://github.com/ajaxorg/ace into feature/ace_language_definition
# By nightwing (7) and others
# Via Harutyun Amirjanyan (4) and others
* 'master' of https://github.com/ajaxorg/ace:
  do not pair quotes inside strings
  fix toggleComment command in php mode
  fix copyLines* for multiple selections
  fix pairing of quotes in cstyle behavior
  add helper for creating tests
  Autocomplete exactMatch option
  add *~ (backup files created by various editors) to .gitignore
  Remove unneeded regex groups for Eiffel
  Update Eiffel programming language definition.
  add config.warn and refactor config to allow sharing with ace_tree
  do not use automatic scroll into view
  Teach tmlanguage.js to process multiple .tmLanguage files at once
2014-12-14 23:11:35 +01:00
Bernhard Weichel
8019a21475 added abc mode 2014-12-14 20:34:41 +01:00
nightwing
c5edaa3608 allow filtering tests in browser runner 2014-12-13 16:45:56 +04:00
nightwing
5a03993f65 update vim.js 2014-12-13 00:50:13 +04:00
Lennart Kats
5fc3bbbe09 Merge pull request #2249 from ajaxorg/misc
Several small fixes
2014-12-12 20:48:16 +01:00
nightwing
6b13aedf5f do not pair quotes inside strings 2014-12-12 17:38:39 +04:00
nightwing
ec18d9493d fix toggleComment command in php mode 2014-12-12 17:38:39 +04:00
nightwing
3fa54ce97e fix copyLines* for multiple selections 2014-12-12 17:38:39 +04:00
nightwing
852e0673ca fix pairing of quotes in cstyle behavior 2014-12-12 17:38:38 +04:00
nightwing
278f1d1674 add helper for creating tests 2014-12-12 17:38:38 +04:00
Harutyun Amirjanyan
232b3c0f8c Merge pull request #2272 from adamjimenez/autocomplete-exact
Autocomplete exactMatch option
2014-12-12 17:21:39 +04:00
nightwing
d8f0ab2a16 fix regression in setDefaultValues 2014-12-12 16:56:02 +04:00
Adam Jimenez
cfdb223e7a Autocomplete exactMatch option
Option to show only exact matches in autocomplete
2014-12-12 10:27:45 +00:00
Harutyun Amirjanyan
d68050c62b Merge pull request #2268 from mbenkmann/gitignore_backup_files
add *~ (backup files created by various editors) to .gitignore
2014-12-10 11:11:00 -08:00
Matthias S. Benkmann
119259b702 add *~ (backup files created by various editors) to .gitignore 2014-12-07 18:21:03 +01:00
nightwing
c49e5bfef9 disable warning 2014-12-07 01:26:44 +04:00
nightwing
2fc497477d highlight tags when cursor is before tagname 2014-12-07 01:26:24 +04:00
nightwing
e54882db64 use setAttribute instead of autocorrect setter, since the setter doesn't work on ipad 2014-12-07 01:08:06 +04:00
Harutyun Amirjanyan
e217418d39 Merge pull request #2266 from Conaclos/master
Update Eiffel definition
2014-12-06 13:03:03 -08:00
Victorien ELVINGER
354dc37ea6 Remove unneeded regex groups for Eiffel 2014-12-06 20:04:27 +01:00
Victorien ELVINGER
29597325d9 Update Eiffel programming language definition.
- Disable comments into strings
- Enable concise form for real numbers
- Enable juxtaposed digit separators
- Check char and string content.
2014-12-06 19:50:52 +01:00
Harutyun Amirjanyan
0d4566b42b Merge pull request #2264 from aroben/convert-many-tmlanguages
Teach tmlanguage.js to process multiple .tmLanguage files at once
2014-12-04 03:44:16 -08:00
Lennart Kats
e1933043dc Merge pull request #2254 from ajaxorg/do-not-scroll
Disable automatic scroll into view
2014-12-04 11:10:29 +01:00
nightwing
a71c17b46f add config.warn and refactor config to allow sharing with ace_tree 2014-12-04 14:02:49 +04:00
nightwing
8c1aa5c772 do not use automatic scroll into view
prepares for deprecating the feature in the next version of ace
2014-12-04 14:02:19 +04:00
Lennart Kats
35155075e0 Merge pull request #2219 from ajaxorg/vim2
better vim mode
2014-12-04 10:55:29 +01:00
Adam Roben
23a3ba85f0 Teach tmlanguage.js to process multiple .tmLanguage files at once
You can now pass more than one .tmLanguage file to tmlanguage.js and it will
process each one in turn. This can vastly speed up the processing of multiple
files as you don't have to pay the node/V8 startup cost for each file.

Note that the script's "dev mode" is now controlled by a --dev flag rather than
an unnamed second argument.
2014-12-03 13:56:22 -05:00
Lennart Kats
57a07f54b3 Merge pull request #2261 from ajaxorg/build
fix broken paths in kitchen-sink demo
2014-12-01 16:10:08 +01:00
Harutyun Amirjanyan
93bd34e1cf Merge pull request #2238 from sevin7676/master
cstyle Comment Folding (region and triple star single line block comment)
2014-11-29 23:59:14 -08:00
Harutyun Amirjanyan
16cdd9ddb3 Merge pull request #2259 from jpallen/patch-2
Highlight \ref, \vref, \cite and \citep as labels
2014-11-28 06:33:29 -08:00
James Allen
fc322711ca Highlight \ref, \vref, \cite and \citep as labels
The `\ref`, and `\cite` commands in LaTeX are similar to `\label`s in that they refer to user defined labels elsewhere in the text, and it makes sense to highlight them with the same color scheme. Particularly the coloring of arguments to `\ref` commands should match the color of `\label` commands because `\label` defines the strings that `\ref` then references.
2014-11-28 13:34:16 +00:00
sevin7676
c1a8e77760 Add comment to explain unusual naming and remove ending whitespace 2014-11-28 08:18:33 -05:00
Harutyun Amirjanyan
097d19e943 Merge pull request #2256 from devoncarew/devoncarew_dart_keywords
more dart keywords
2014-11-26 07:31:07 -08:00
Devon Carew
f7144da4ec more dart keywords 2014-11-25 13:37:36 -08:00
sevin7676
41df1f265f Fix fold widget range for region
End range should be at end of line as we don't want to display the
'#endregion' text after the fold widget (this is consistent with cstyle
region comment folding).

Added missing semi-colons.
2014-11-25 07:01:09 -05:00
sevin7676
1869024de6 changes per nightwing recommendations
Rename this.getFoldWidgetBase to avoid conflict with C# mode.

Use regex instead of substring and trim to determine single line block
comment.

Fixed formatting.

Renamed this.getRegionBlock to this.getCommentRegionBlock to prevent C#
mode conflict.

Updated this.getCommentRegionBlock regex to make nested regions work
properly.

Cleaned up this.startRegionRe (had unneeded parenthesis).
2014-11-25 06:58:45 -05:00
sevin7676
602a7efd5f removed unused line
the end of the range should be the end of the line as we don't want to
see [//#endreigon] in our fold widget.
2014-11-24 10:18:00 -05:00
sevin7676
03730ce381 extra comment to help explain code 2014-11-24 09:52:57 -05:00
sevin7676
f26841da41 tested and cleaned up 2014-11-24 09:48:41 -05:00
sevin7676
fb32897b85 progress
appears to be working, need to clean up still
2014-11-24 09:29:37 -05:00
nightwing
49b50ff347 fix broken paths in kitchen-sink demo 2014-11-23 20:06:41 +04:00
Harutyun Amirjanyan
a50fe34925 Merge pull request #2253 from wcandillon/patch-1
Remove references to built-in modules
2014-11-23 14:27:33 +04:00
William Candillon
332472ecc6 Remove references to built-in modules 2014-11-22 19:27:52 -08:00
nightwing
2f32304c2e update vim.js 2014-11-22 00:52:50 +04:00
nightwing
a40060c1ae increase timeout for intermittently failing placeholder_test.js 2014-11-21 23:15:39 +04:00
nightwing
b4d2cf810d fix failing test 2014-11-21 23:15:37 +04:00
nightwing
a185414f64 remove old vim mode 2014-11-21 23:15:34 +04:00
nightwing
f9de0a5661 use ctrl-c and mac repeat handling from old vim mode 2014-11-21 23:14:28 +04:00
nightwing
068c950517 add support for multiple selections 2014-11-21 23:14:27 +04:00
nightwing
bd7de6b43b fix find next for regexps matching empty range 2014-11-21 23:14:26 +04:00
nightwing
aa472742cc allow to customize cursor appearance 2014-11-21 23:14:24 +04:00
nightwing
8daf190b2e add CodeMirror api proxy for vim mode 2014-11-21 23:14:21 +04:00
nightwing
f47c3ea8bd add cm vim mode 2014-11-21 23:04:16 +04:00
Harutyun Amirjanyan
38ed6de508 Merge pull request #2246 from wcandillon/patch-1
Disable module resolver
2014-11-21 16:51:49 +04:00
Harutyun Amirjanyan
d8d1e08a86 Merge pull request #2236 from tenbits/master
Add Mask Highlighter
2014-11-21 16:50:44 +04:00
Harutyun Amirjanyan
2c796133e0 Merge pull request #2247 from aroben/custom-tmtheme
Teach tmtheme.js how to convert a non-built-in theme
2014-11-21 16:49:45 +04:00
Alex Kit
1587b96b3c Add Mask Highlighter 2014-11-21 05:08:12 +01:00
Adam Roben
11d15b2f28 Pretty-print CSS even when creating a new file 2014-11-20 15:19:27 -05:00
nightwing
eec012b24e fix ignoring empty delta 2014-11-20 23:28:09 +04:00
nightwing
004a19855a do not throw for broken anchors since that can break editor 2014-11-20 23:23:46 +04:00
nightwing
d619e4e746 allow passing newLineCharacter ot getValue 2014-11-20 23:02:34 +04:00
nightwing
27264bb9d9 fix infinite loop when inserting more than 0xF000 lines at once 2014-11-20 23:01:53 +04:00
Adam Roben
89702bf606 Make tmtheme.js handle elements with no settings
We just ignore them now rather than throwing an exception.
2014-11-20 10:56:57 -05:00
Adam Roben
f471e54ef0 Teach tmtheme.js how to convert a non-built-in theme
You can now pass a .tmTheme file on the command line to have it converted.
2014-11-20 10:56:32 -05:00
William Candillon
e0bd006ffc Update xqlint dependency 2014-11-18 13:55:32 -08:00
William Candillon
9f2473bce2 Disable module resolver 2014-11-18 13:48:02 -08:00
Lennart Kats
d097d41144 Merge pull request #2237 from ajaxorg/focus
fix focus related issues
2014-11-17 10:34:12 +01:00
Harutyun Amirjanyan
a0f7864b78 Merge pull request #2241 from jmeas/fix-position
Sets offset of fontMetrics div to be 0.
2014-11-16 19:14:29 +04:00
Jmeas
a45385be98 Sets offset of fontMetrics div to be 0.
Offsetting the fontMetrics div causes the 'ghost image' created when
drag and dropping an Ace Editor to be offset by that same amount. By
removing the offset we fix the problem. Closes #2240.
2014-11-15 19:59:07 +01:00
sevin7676
ef856d0f61 Javascript fixes
added forceMultiline parameter and removed line copied from C# folding
2014-11-15 09:15:25 -05:00
sevin7676
a70a9a88a9 new javascript folding in html mode 2014-11-15 09:03:31 -05:00
sevin7676
11bbc03e1d Javascript region folding 2014-11-15 08:48:20 -05:00
sevin7676
1bed3ec951 Javscript region folding 2014-11-15 08:38:21 -05:00
nightwing
bf7eba2253 fix focusing window with click on ie 2014-11-14 23:57:06 +04:00
nightwing
7326de2a48 reset cached scroll values when resizing
this is needed since scrollTop of scrollbar element can be reset to 0
when ace is moved in the document.
2014-11-14 23:57:06 +04:00
nightwing
1721ca8a0c fix unwanted scrolling into view of hidden textarea 2014-11-14 23:56:55 +04:00
Lennart Kats
c5c1bb2b13 Merge pull request #2235 from ajaxorg/hotfix/php_folding
Hotfix for regression in php folding
2014-11-12 17:08:35 +01:00
nightwing
3a8b279e43 update fold widgets in mixed modes when tokenizer state changes 2014-11-12 18:40:22 +04:00
nightwing
742e8c01a8 fix folding of li tags containing unclosed p tags 2014-11-12 18:38:50 +04:00
nightwing
5801b75b5d fix php folding 2014-11-12 18:37:59 +04:00
nightwing
a4532dd8b9 Merge remote-tracking branch 'remotes/origin/master' into v-1.2
Conflicts:
	build
	lib/ace/multi_select_test.js
2014-11-11 11:47:04 +04:00
nightwing
64f2fc4015 add newLineCharacter argument to getValue 2014-11-11 11:45:20 +04:00
nightwing
ffaf44ec0b copy insert start position before storing it in undoStack 2014-11-11 11:44:17 +04:00
nightwing
bacaeb07d8 cleanup 2014-11-11 11:40:18 +04:00
nightwing
271cefb44a fix typo 2014-11-08 23:52:05 +04:00
nightwing
b8e3198ba8 version 1.1.8 2014-11-08 23:45:22 +04:00
nightwing
a4d831f474 add more users 2014-11-08 20:56:18 +04:00
nightwing
c4e937939a Merge remote-tracking branch 'remotes/origin/mode_issues' 2014-11-08 16:25:19 +04:00
nightwing
5562566b37 Merge remote-tracking branch 'remotes/origin/emacs'
Conflicts:
	lib/ace/incremental_search_test.js
2014-11-08 16:02:02 +04:00
nightwing
d09740f494 fix emacs universal argument 2014-11-08 15:57:23 +04:00
Robert Krahn
e83252130c emacs: improved multi selection handling for emacs mark 2014-11-06 23:27:54 -08:00
nightwing
072dcb1c11 fix tripple brace highlighting in handlebars mode 2014-11-06 20:43:08 +04:00
Harutyun Amirjanyan
989d0ac3fb Merge pull request #2226 from LivelyKernel/isearch-regexp-support
isearch regexp support
2014-11-06 10:15:53 +04:00
Robert Krahn
775cdedefb isearch test fix 2014-11-05 15:30:05 -08:00
Robert Krahn
a93646d2f7 isearch: commands searchAsRegExp and selectAllMatches 2014-11-05 15:30:03 -08:00
Robert Krahn
7bb5b305be isearch: add regexp support 2014-11-05 15:30:01 -08:00
Robert Krahn
939e0739a7 adding improvements as suggested by @nightwing 2014-11-05 15:25:28 -08:00
Robert Krahn
8786e17e6b isearch test: ensure multi select 2014-11-05 15:25:27 -08:00
Robert Krahn
0a055cb725 isearch: being flexible about whether emacs mode is on or not 2014-11-05 15:25:26 -08:00
Robert Krahn
54d80d79ab emacs: make code strict conform 2014-11-05 15:25:16 -08:00
Robert Krahn
ea67201540 emacs: fix exchangePointAndMark in normal select mode 2014-11-05 15:25:15 -08:00
Robert Krahn
78b2147c3c emacs/isearch: select when moving cursor via isearch and emacs mark is set 2014-11-05 15:25:14 -08:00
Robert Krahn
b966cfd7da emacs: cleanup 2014-11-05 15:25:12 -08:00
Robert Krahn
24f3bab19d emacs: fix multi select exchangePointAndMark
Conflicts:
	lib/ace/keyboard/emacs.js
2014-11-05 15:25:08 -08:00
Robert Krahn
90034c3a44 fixing multi selection handling for various emacs commands
Conflicts:
	lib/ace/keyboard/emacs.js
2014-11-05 15:24:41 -08:00
nightwing
9ccf68dbb2 make sure missing emmet can't break tab key 2014-11-05 23:17:59 +04:00
nightwing
22de936727 fix bracket pairing for multiple selections 2014-11-05 23:15:45 +04:00
Lennart Kats
f133231df8 Merge pull request #2222 from ajaxorg/mode_issues
Fix mode issues
2014-11-05 14:47:05 +01:00
nightwing
e26c70ad53 update soy_template test 2014-11-05 17:36:14 +04:00
nightwing
f362d2e84a add markdown comment to elixir demo 2014-11-05 16:56:51 +04:00
nightwing
96061f72ae update ChangeLog 2014-11-05 16:51:34 +04:00
nightwing
70337ea5ba fix infinite loop in soy mode and make tokenizer more robust 2014-11-05 16:42:39 +04:00
nightwing
78cda6bc3a update architect-build 2014-11-02 15:33:23 +04:00
nightwing
c83f39e4a9 update tests for ruby mode 2014-11-02 15:33:10 +04:00
nightwing
399e25ceaf fix errors in imported elixir mode 2014-11-02 15:32:26 +04:00
nightwing
4da689e71b add elixir mode 2014-11-02 15:06:12 +04:00
nightwing
ca9bc7a97a improve highlighting of ruby strings 2014-11-01 21:44:53 +04:00
nightwing
5b3bbba54e fix xquery mode breaking autocompletion and add tests 2014-11-01 19:27:40 +04:00
nightwing
671a8d6543 support nested comments in rust mode 2014-11-01 18:15:00 +04:00
nightwing
fd4be8535f Merge pull request #2216 from adamjimenez/php-delegate
use mode delegates in PHP
2014-10-31 15:18:02 +04:00
nightwing
366675a7a7 fix inline php mode 2014-10-31 15:08:44 +04:00
Adam Jimenez
2bd2e37367 fix php indentation 2014-10-30 01:52:38 +00:00
Harutyun Amirjanyan
e08a925870 Merge pull request #2218 from SomeKittens/master
Add COPY as a Docker command to be highlighted
2014-10-30 04:34:30 +04:00
Randall Koutnik
c0b37c1ac2 Add COPY as a Docker command to be highlighted 2014-10-29 17:09:09 -07:00
nightwing
2e8d7184e2 Merge pull/2215 2014-10-29 23:19:25 +04:00
nightwing
f121ca93ff update comment too 2014-10-29 23:18:09 +04:00
Adam Jimenez
b204cd7236 use mode delegates in PHP
fixes #2197
2014-10-29 17:01:41 +00:00
Bolutife Ogunsola
292d92ab8c Update documentation to reflect change introduced in 9253fffb9f 2014-10-29 14:25:21 +01:00
Bolutife Ogunsola
5b30207d74 Fix typo 2014-10-29 14:25:21 +01:00
Harutyun Amirjanyan
20cd631f0a Merge pull request #2198 from adamjimenez/patch-2
Autoindent doesn't always occur
2014-10-29 16:37:17 +04:00
Adam Jimenez
8e3da36bc7 autoindent tweaks
use camelcase and start line indent
2014-10-29 12:08:30 +00:00
Adam Jimenez
5e724c5ebd autoindent from start of tag 2014-10-29 10:13:20 +00:00
Adam Jimenez
b3d0c62a8d tidy up autoindent
use voidElements and double quotes.
2014-10-29 09:54:16 +00:00
Lennart Kats
695e24c418 Merge pull request #2210 from ajaxorg/misc
Fix several small issues
2014-10-28 11:04:05 +01:00
nightwing
3ef6bc2097 do not show error for empty json files 2014-10-27 21:35:51 +04:00
Harutyun Amirjanyan
e8419e5742 Merge pull request #2208 from coderaiser/patch-2
feature(package) v1.1.7
2014-10-27 13:05:04 +04:00
Harutyun Amirjanyan
2de76b5251 Merge pull request #2207 from coderaiser/patch-1
Simplified reading version from package.json
2014-10-27 13:04:17 +04:00
coderaiser
f3d9c588bd feature(package) v1.1.7 2014-10-25 18:35:41 +03:00
coderaiser
d068e2f737 feature(version) simplified reading version from package.json 2014-10-25 18:34:22 +03:00
nightwing
1a70ef15e2 fix #2190 autocomplete doesn't show tooltip when list initially appears 2014-10-25 03:25:44 +04:00
nightwing
58d166d647 do not add extra semicolon in built files 2014-10-25 02:07:06 +04:00
nightwing
fd5a6ade03 fix #2183 scrollPastEnd breaks vScrollBarAlwaysVisible=false option 2014-10-24 16:40:53 +04:00
Adam Jimenez
289ada0a2f don't indent after closing tag 2014-10-23 09:28:42 +01:00
Harutyun Amirjanyan
af859e2b0c Merge pull request #2189 from takapa/master
Improve tooltips
2014-10-21 19:55:27 +04:00
Harutyun Amirjanyan
94514a8456 Merge pull request #2200 from adamjimenez/patch-5
Fix string tooltips not showing
2014-10-21 18:19:46 +04:00
Harutyun Amirjanyan
1d39be41a6 Merge pull request #2201 from adamjimenez/patch-6
send completion data to completer callback
2014-10-21 18:19:38 +04:00
Adam Jimenez
7b01a4273e send completion data to completer callback 2014-10-21 12:46:29 +01:00
Adam Jimenez
bf8e9ddf45 Fix string tooltips not showing 2014-10-21 10:35:34 +01:00
Chris Ainsley
cef48f6887 Responded to suggestions by nightwing
Removed style changes (no style changes are part of the PR).

Only change now should be that we create a <div/> element instead of a <pre/> element.
2014-10-20 21:33:23 +01:00
Adam Jimenez
631695a0e4 Autoindent doesn't always occur
Currently autoindent only kicks in as so: 
```
<div>|</div>
```

This allows it to also work with:
```
<div>|

</div>
```
2014-10-20 17:30:26 +01:00
nightwing
525fe1ffe3 do not wrap change events in additional e.data 2014-10-18 00:56:13 +04:00
nightwing
bb827051a6 Merge branch 'master' into v-1.2
Conflicts:
	lib/ace/commands/command_manager.js
2014-10-17 19:25:02 +04:00
nightwing
c97858705d cleanup 2014-10-17 19:23:43 +04:00
Harutyun Amirjanyan
40a9c308b9 Merge pull request #2191 from maxh/patch-1
Fix errors in Anchor docs
2014-10-14 14:53:10 +04:00
Max Heinritz
f8bf6f253a Fix errors in Anchor docs
At least, I think they are errors.
2014-10-13 11:54:33 -07:00
DanyaPostfactum
6502a3d2cb Update tests for wrap indent 2014-10-12 18:37:52 +10:00
DanyaPostfactum
f625dfeea3 Add indentSubsequentLines to options 2014-10-12 18:37:20 +10:00
takapa
2636e5de5f Improve tooltips
Allow tooltips in div element (currently tooltips only allow items in pre element which is tricky to format). Also fix wrapping, remove gradient fill, and introduce a maximum width of 500px by default.
2014-10-12 01:20:27 +01:00
DanyaPostfactum
60367772a9 Add wrap indent 2014-10-12 01:56:19 +10:00
Lennart Kats
3af776df12 Merge pull request #2186 from ajaxorg/highlighter-fixes
Highlighter fixes
2014-10-11 17:16:48 +02:00
nightwing
43cdfd792f Add HACK and XXX 2014-10-10 23:54:19 +04:00
Lennart Kats
a02ca596b9 Merge pull request #2073 from ajaxorg/multihash
Allow binding multiple commands to one key
2014-10-10 15:41:23 +02:00
nightwing
ed40c1f51f improve tmlanguage.js 2014-10-10 02:05:15 +04:00
nightwing
9683d80f84 highlight todo in javascript comments 2014-10-09 20:49:25 +04:00
nightwing
52e8bc3082 add elm mode (fixes #2099) 2014-10-09 16:41:49 +04:00
nightwing
23c64c6ebb Add highlighting for raw string literals in rust mode. 2014-10-09 16:39:14 +04:00
nightwing
9cc394d3b9 Merge pull request #2169
allow removing completers
2014-10-09 01:32:30 +04:00
nightwing
38ce8b8919 less java:) 2014-10-09 01:30:05 +04:00
takapa
28b95df12c Added setCompleters(...) function
Added setCompleters() method, so that completers can be explicitly set from a pre-populated array, or can be removed entirely (if null is passed, or setCompleters() is called without an argument or an empty array is passed.

Please check this carefully for rookie JavaScript bugs, as I'm not sure if the null/undefined test is best-practise here as I don't typically code in JavaScript in my day-job.
2014-10-08 22:07:23 +01:00
Ruben Daniels
18f999fc47 Merge pull request #2174 from ajaxorg/autoscroll
AutoScrollEditorIntoView doesn't work for search
2014-10-06 16:57:58 -07:00
Ruben Daniels
0609c8e1a8 Merge pull request #2175 from ajaxorg/misc
Fix several small issues
2014-10-06 16:57:39 -07:00
Ruben Daniels
61ca159312 Merge pull request #2148 from ajaxorg/autocomplete
Add documentation tooltip for autocompleter
2014-10-06 16:57:16 -07:00
Harutyun Amirjanyan
cc40b8ceb8 Merge pull request #2177 from richo/fix-username
Fix @richo's username
2014-10-06 18:56:30 +04:00
Richo Healey
1a6bb0591b Fix @richo's username 2014-10-05 19:22:17 -07:00
nightwing
6814187c51 fix name of templates/highlight_rules.js 2014-10-05 23:07:34 +04:00
nightwing
29023787e5 Merge remote-tracking branch 'remotes/origin/master' into v-1.2
Conflicts:
	build
	lib/ace/document.js
	lib/ace/editor.js
2014-10-05 23:04:57 +04:00
nightwing
2983c4b19f do not throw when trying to add intersecting folds 2014-10-05 22:53:31 +04:00
nightwing
c2ce33f368 fix search.$assembleRegExp not working for multiline strings 2014-10-05 22:53:31 +04:00
nightwing
a1042e0d94 fix reattaching linewidgets to editor 2014-10-05 22:53:31 +04:00
nightwing
6c0bc56500 improve error handling in worker 2014-10-05 22:53:31 +04:00
nightwing
ab6aa3be5c fix gutter colors in theme importer 2014-10-05 22:53:31 +04:00
nightwing
14fc8adac2 cleanup mode_creator tool 2014-10-05 22:53:30 +04:00
nightwing
6867d1f4c6 fix several highlighter issues 2014-10-05 22:53:30 +04:00
nightwing
6e9ce4dbc8 fix #2173 AutoScrollEditorIntoView doesn't work for search 2014-10-05 00:14:10 +04:00
takapa
9b8385b07d Update language_tools.js
Added removeCompleters() function to language tools exports as it is not possible to access the completers array directly.

This is currently utilized by Ace GWT to cleardown existing completers (for entirely programmatic completers without snippets or  keyword completions) but I feel it belongs in the mainline (I have to manage a fork at the moment and there seems to be no other workaround).
2014-09-30 19:55:06 +01:00
Harutyun Amirjanyan
54e022fab2 Merge pull request #2168 from phungleson/patch-1
Change line comment start to //
2014-09-30 18:57:10 +04:00
Son
47b9c6c225 Change line comment start to //
http://doc.rust-lang.org/guide.html#comments
2014-09-30 22:07:53 +08:00
Harutyun Amirjanyan
cec6779003 Merge pull request #2165 from Newbrict/master
clipped trailing whitespace
2014-09-27 23:57:58 +04:00
Dimitar Dimitrov
753fa6b904 clipped trailing whitespace 2014-09-27 13:58:04 -04:00
Harutyun Amirjanyan
f4356993b2 Merge pull request #2157 from cvoege/master
Added Find All Functionality to Ctrl-F searchbox.
2014-09-27 13:35:16 +04:00
Colton Voege
4b44bad687 Replace all with Alt-Enter fixed. 2014-09-25 12:57:32 -04:00
Colton Voege
a33cc3223a Merge branch 'master' of https://github.com/ajaxorg/ace 2014-09-25 12:54:50 -04:00
nightwing
1bb84debca update build submodule 2014-09-21 00:14:53 +04:00
nightwing
c62b0b134f fix regression in ace_popup 2014-09-21 00:04:01 +04:00
Harutyun Amirjanyan
79eda6d2a8 Merge pull request #2111 from wcandillon/patch-3
Update XQLint dependency
2014-09-20 12:35:08 +04:00
Ruben Daniels
961eee344c Merge pull request #2159 from ajaxorg/misc
Fix several small issues
2014-09-20 10:10:04 +02:00
nightwing
8a306d8a8e workaround for inaccurate font rendering on chrome 37 2014-09-20 01:43:52 +04:00
nightwing
121835bed8 add menuitem to the list of void tags 2014-09-20 00:07:54 +04:00
Colton Voege
378a72a91c Added Find All functionality to searchbox. 2014-09-17 13:33:29 -04:00
Ruben Daniels
a0327aebd9 Merge pull request #2156 from ajaxorg/dragcursor
improve drag cursor on windows
2014-09-17 15:20:33 +02:00
Ruben Daniels
0989419251 Merge pull request #2155 from ajaxorg/keyboard/emacs
fix #2154 Emacs copy/paste issue with highlighting marker
2014-09-17 15:20:12 +02:00
nightwing
b25f4b6a10 fix #2154 Emacs copy/paste issue with highlighting marker 2014-09-17 17:05:38 +04:00
nightwing
f68ca6266a improve drag cursor on windows 2014-09-16 00:34:39 +04:00
nightwing
953e452f70 add doc tooltip 2014-09-13 03:22:55 +04:00
Ruben Daniels
e894b5f9e0 Merge pull request #2137 from ajaxorg/autocomplete
Fix several small issues
2014-09-12 20:18:22 +02:00
Ruben Daniels
74f7d0095b Merge pull request #2135 from ajaxorg/tool/add_mode
Add tool/add_mode.js for creating stub files for a new mode
2014-09-12 20:18:07 +02:00
Ruben Daniels
c029ba57c5 Merge pull request #2138 from ajaxorg/demo/warn
show warning if build/src/ace.js is missing
2014-09-12 20:17:56 +02:00
Harutyun Amirjanyan
8cc22b10eb Merge pull request #2145 from tobiasahlin/clean-up-css
Clean up CSS
2014-09-12 20:58:44 +04:00
Tobias Ahlin
ec3750edcb float triggers display block 2014-09-11 10:26:49 +02:00
Tobias Ahlin
bde7daaf1b Use animation and font shorthand 2014-09-11 10:26:13 +02:00
Tobias Ahlin
6593e25de6 Keyframes can share values 2014-09-11 10:25:52 +02:00
Tobias Ahlin
87dcd881e3 Use font shorthand 2014-09-11 10:18:23 +02:00
Tobias Ahlin
eabb4b2cb5 float triggers display: block 2014-09-11 10:17:55 +02:00
Tobias Ahlin
6a0a108d2a Vendor prefixes are not needed for border-radius 2014-09-11 09:11:54 +02:00
Tobias Ahlin
a36e7bb0c1 position: fixed triggers display: block 2014-09-11 09:11:32 +02:00
Tobias Ahlin
f103d2632c px is redundant for zero values 2014-09-11 09:06:33 +02:00
Tobias Ahlin
f4afa89d4e Vendor prefixes aren't necessary for box-shadow 2014-09-11 00:55:33 +02:00
Tobias Ahlin
a89e3d0d9d Only -webkit prefix for transitions is necessary
Android and iOS safari both support it without the prefix, but hasn’t
for long
2014-09-11 00:53:25 +02:00
Tobias Ahlin
2cdd9fef70 Use font shorthand for ace_editor 2014-09-11 00:47:41 +02:00
Harutyun Amirjanyan
4ff4d1ee43 Merge pull request #2144 from girving/doc-fix
Fix documentation typo: "includeText" should be "insertText"
2014-09-11 01:58:48 +04:00
Geoffrey Irving
6795b35135 Fix documentation type: "includeText" should be "insertText" 2014-09-10 14:43:36 -07:00
Harutyun Amirjanyan
706f2ea172 Merge pull request #2143 from p2004a/fix-filteredlist-behaviour
Changed FilteredList.setFilter unique matches computing in autocomplete.js
2014-09-10 17:47:25 +04:00
nightwing
d2b6b43679 Merge branch 'pull/2139' 2014-09-10 17:18:36 +04:00
nightwing
aec7db80d8 fix more typos 2014-09-10 17:17:11 +04:00
Marek Rusinowski
c0c99ad5c6 changed FilteredList.setFilter unique matches computing 2014-09-10 12:35:04 +02:00
Chris Schmich
91db934fe6 Fixing another typo. 2014-09-09 20:33:09 -05:00
Chris Schmich
8b996b0a09 Fix typo. 2014-09-09 20:29:44 -05:00
nightwing
fb16e59f03 do not trigger keyLocation warning (fixes #1731) 2014-09-10 04:29:43 +04:00
nightwing
cdaf4c1539 show warning if build/src/ace.js is missing 2014-09-10 04:12:42 +04:00
nightwing
1bce1b2a60 cleanup tools directory 2014-09-09 21:44:27 +04:00
nightwing
dbeeea2dd9 add helper tool for starting new mode 2014-09-09 21:18:52 +04:00
nightwing
bd95f782d8 close completion popup when backspacing to empty string 2014-09-07 17:22:04 +04:00
nightwing
e6660cd47c improve matlab highlighting fixes #2042, #2043 2014-09-07 17:21:36 +04:00
nightwing
5f6782d949 fix #2103 completion filtering doesn't work when started with empty prefix 2014-09-07 15:00:21 +04:00
nightwing
e8f7419131 fix #2054 Completer ignores better match if autoinsert is enabled 2014-09-07 14:46:20 +04:00
nightwing
bb76c62c7b fix several ie8 issues 2014-09-06 02:23:37 +04:00
nightwing
c0741f3511 fix #2119 Soft Hyphen (U+00AD) breaks cursor position calculation 2014-09-05 23:55:16 +04:00
nightwing
36f62e3792 fix #1840 The last CJK character of a wrapped line drops down 2014-09-05 23:53:16 +04:00
Lennart Kats
badade8f4e Merge pull request #2125 from ajaxorg/highlighter-fixes
Highlighter fixes
2014-09-02 16:44:48 +02:00
Harutyun Amirjanyan
8a91b43b67 Merge pull request #2117 from camertron/sql_union
Adding highlight support for the UNION SQL keyword
2014-09-02 15:27:35 +04:00
nightwing
3d6b93b946 update tests 2014-09-02 15:12:15 +04:00
nightwing
30f7f8a3f2 add es6 template string highlighting to javascript mode 2014-09-02 13:42:59 +04:00
nightwing
9f2fba320d fix herestring highlighting in sh mode 2014-09-02 13:04:33 +04:00
nightwing
09ddbeb341 add Io mode 2014-09-02 12:55:58 +04:00
nightwing
7a3a84c858 fix error in coffeeScript mode 2014-09-02 01:16:10 +04:00
Cameron Dutro
0d8865bcfe Adding highlight support for the UNION sql keyword 2014-08-27 20:01:31 -06:00
nightwing
69edbf9460 github pages now requires https submodule urls 2014-08-27 17:30:12 +04:00
Harutyun Amirjanyan
9bc0dbd788 Merge pull request #2115 from danyaPostfactum/dragdropfix
Make DragdropHandler more bulletproof
2014-08-27 15:10:45 +02:00
DanyaPostfactum
f9591eb16f Make DragdropHandler more bulletproof 2014-08-24 00:37:06 +10:00
William Candillon
bf8b6806a0 Update XQLint dependency
fixes #2108
2014-08-21 21:42:14 +02:00
Harutyun Amirjanyan
3c4afde47b Merge pull request #2080 from jpallen/master
Keep apparent scroll position fixed when changes are made offscreen
2014-08-20 15:49:03 +04:00
Harutyun Amirjanyan
60dd9156fe Merge pull request #2104 from Razer6/vhdl_mode
Add VHDL to modelist
2014-08-19 17:29:31 +04:00
Robert Schilling
fd2e51f120 Add VHDL mode 2014-08-18 22:17:39 +02:00
nightwing
bb4f7a0f1b update build 2014-08-17 15:21:17 +04:00
Lennart Kats
df58b5b710 Merge pull request #2096 from ajaxorg/old-worker
Allow using uiWorker on ie9 where Worker is undefined
2014-08-14 11:08:40 +02:00
nightwing
084dd4c132 fix regression in loading workers in packed mode 2014-08-14 12:49:00 +04:00
nightwing
6682c18ab3 allow using uiWorker on ie9 where Worker is undefined 2014-08-14 12:41:57 +04:00
Zef Hemel
d6c51fe898 Fix Docker highlighter again 2014-08-14 09:42:32 +02:00
Zef Hemel
5ba99b5fd4 Updated Dockerfile highlighter
Now uses constants rather than variables (which in many highlighters don't appear any differently).
2014-08-14 09:36:57 +02:00
Harutyun Amirjanyan
97d39e2912 Merge pull request #2095 from ajaxorg/revert-2076-no-auto-scroll
Revert "Disable automatic scroll into view"
2014-08-13 23:11:14 +04:00
Harutyun Amirjanyan
217635fe67 Merge pull request #2094 from ajaxorg/ruby-behaviors
Enabled C-style behaviors for Ruby
2014-08-13 22:57:22 +04:00
Harutyun Amirjanyan
1dc42fd46e Revert "Disable automatic scroll into view" 2014-08-13 22:53:35 +04:00
Zef Hemel
1f14f3fc32 Enabled C-style behaviors for Ruby which are pretty much accurate. 2014-08-13 20:44:51 +02:00
Harutyun Amirjanyan
706b7815e3 Merge pull request #2089 from dfelder/master
Some more highlight rules for latex mode
2014-08-13 00:47:59 +04:00
Daniel Felder
ed320af6f4 fix code folding in equation mode 2014-08-11 12:21:20 +00:00
Daniel Felder
b01fe5de13 cleanup 2014-08-11 11:59:42 +00:00
Daniel Felder
917c4da39d cleanup 2014-08-11 11:57:29 +00:00
Daniel Felder
b8c111b832 add folding for paragraph 2014-08-11 11:54:15 +00:00
Daniel Felder
c3411631a1 highlight input command 2014-08-11 11:51:38 +00:00
Daniel Felder
e227811a21 highlight input command 2014-08-11 11:46:27 +00:00
Harutyun Amirjanyan
fe9b95f9e2 Merge pull request #2090 from adamjcook/gcode
Adding G-code (ISO 6983) language mode.
2014-08-11 15:41:43 +04:00
Daniel Felder
f79a7a7b0b exit equation mode on empty lines 2014-08-11 11:40:16 +00:00
Daniel Felder
2f56fb208c allow comments in equation, default token in equation 2014-08-11 11:03:43 +00:00
Daniel Felder
114166a0ce fix code folding 2014-08-11 11:02:43 +00:00
Daniel Felder
69dcab3479 Merge https://github.com/ajaxorg/ace 2014-08-11 09:20:25 +00:00
Daniel Felder
9fb80fb72c simplifications and different highlight for labels etc. 2014-08-11 09:13:50 +00:00
Daniel Felder
b4dc4b7694 adjust tests 2014-08-11 09:12:46 +00:00
Adam Joseph Cook
37aa485137 Adding G-code (ISO 6983) language mode. 2014-08-10 22:24:52 -05:00
Lennart Kats
549df3c756 Merge pull request #2087 from ajaxorg/destroy
destroy session when destroying the editor
2014-08-10 11:26:07 +02:00
Lennart Kats
2fda9268f3 Merge pull request #2088 from ajaxorg/misc
Code cleanup + minor fixes
2014-08-10 11:24:41 +02:00
Lennart Kats
3752d20b13 Merge pull request #2086 from ajaxorg/textinput
IME issues
2014-08-10 10:56:28 +02:00
Lennart Kats
5f8c5e0fb6 Merge pull request #2077 from ajaxorg/mode/css
update csslint
2014-08-10 10:55:31 +02:00
Lennart Kats
5348712ce2 Merge pull request #2076 from ajaxorg/no-auto-scroll
Disable automatic scroll into view
2014-08-10 10:55:18 +02:00
Lennart Kats
4b5409c5cb Merge pull request #2070 from ajaxorg/static-highlight
accept mode options object in static highlight extension
2014-08-10 10:50:32 +02:00
Lennart Kats
b714925ed8 Merge pull request #2063 from ajaxorg/fix/build
do not rename kr_theme to kr during the build
2014-08-10 10:49:50 +02:00
Daniel Felder
4115fd24b3 adjust tests 2014-08-10 01:40:09 +00:00
Daniel Felder
b5560a9cad adjust tests 2014-08-10 01:18:28 +00:00
Daniel Felder
d029129b28 lparen, rparen in block 2014-08-10 01:17:39 +00:00
Daniel Felder
b8f135a37d adjustments to latex mode 2014-08-10 00:29:39 +00:00
Daniel Felder
08bf3696e7 some more syntax highlighting for latex mode 2014-08-10 00:02:33 +00:00
nightwing
9b489c752b minor fixes 2014-08-09 22:32:07 +04:00
nightwing
10860343ab fix error when inserting text inside code 2014-08-09 22:32:07 +04:00
nightwing
1bd38560b4 code style 2014-08-09 22:32:07 +04:00
nightwing
383b798901 disable automatic scroll into view 2014-08-09 22:22:49 +04:00
nightwing
dc37f938c9 destroy session when destroying the editor 2014-08-09 18:48:43 +04:00
nightwing
920cd20327 improve ime style 2014-08-09 18:44:24 +04:00
nightwing
d493325973 make sure editor container never scrolls because of out of view textarea 2014-08-09 18:44:24 +04:00
Harutyun Amirjanyan
ffc547d2c3 Merge pull request #2079 from buildersbrewery/master
Updated LSL language
2014-08-08 22:28:26 +04:00
Harutyun Amirjanyan
e2ab837178 Merge pull request #2084 from jpallen/patch-1
Don't ignore contextmenu event in Firefox on Windows/Linux
2014-08-08 22:27:44 +04:00
James Allen
1109188a93 Don't ignore contextmenu event in Firefox on Windows/Linux 2014-08-08 18:28:41 +01:00
James Allen
146d832e19 Keep apparent scroll position fixed when changes are made offscreen 2014-08-06 13:59:11 +01:00
Zef Hemel
2859373983 Merge pull request #2075 from ajaxorg/highlighter-fixes
Highlighter fixes
2014-08-05 11:56:34 +02:00
nightwing
0842d27710 fix failing test
allow folding <p> tags
2014-08-04 18:27:45 +04:00
Builder's Brewery
89b5597948 Updated regex for entity.name.state.lsl 2014-08-04 15:52:57 +02:00
Builder's Brewery
36198a50f4 Updated LSL snippets 2014-08-04 15:38:52 +02:00
Builder's Brewery
91cc993bb2 Updated LSL keywords 2014-08-04 15:24:56 +02:00
nightwing
b69f7450aa fix autoclosing of p tag 2014-08-02 01:02:52 +04:00
nightwing
d120d050fb update test 2014-08-02 01:02:03 +04:00
nightwing
518166324b add constexpr keyword to c++ 2014-08-02 01:02:03 +04:00
nightwing
0eff326d62 tweak modes 2014-08-02 01:01:46 +04:00
nightwing
b990ad3f90 update csslint 2014-08-02 00:57:21 +04:00
nightwing
dfee740802 update command_manager test 2014-08-01 22:33:32 +04:00
nightwing
5744a3c6e3 fix bracket matching in vala mode 2014-08-01 22:12:45 +04:00
nightwing
ec6ffec1e4 Merge branch 'missing-redraw' 2014-08-01 22:07:25 +04:00
nightwing
72dcd28905 trigger redraw less often 2014-08-01 22:06:43 +04:00
nightwing
f4990b3a56 make sure text redraw isn't missed when bgTokenizer state changes 2014-08-01 21:52:25 +04:00
nightwing
d01cbaf698 Merge pull request #2041 from jpallen:master
Redraw lines and active line highlight when offscreen updates are made
2014-08-01 21:50:51 +04:00
Harutyun Amirjanyan
f80dea7915 Merge pull request #2066 from gatof81/master
ie11 fix getBoundingClientRect() error
2014-08-01 21:47:27 +04:00
nightwing
a00ce9cd72 update keyboard shortcuts extension 2014-08-01 20:47:49 +04:00
nightwing
b2612c6039 cleanup emmet extension 2014-08-01 20:19:17 +04:00
nightwing
c673190bf7 allow binding multiple commands to same key 2014-07-29 17:40:19 +04:00
Diego Ferreyra
b0babd3f25 ie11 fix getBoundingClientRect() error missing ";" 2014-07-28 14:37:15 -03:00
Diego Ferreyra
7ab9ce686f ie11 fix getBoundingClientRect() error 2014-07-28 14:34:39 -03:00
nightwing
80f42e13ff accept mode options object in static highlight extension 2014-07-28 19:10:41 +04:00
Diego Ferreyra
d40bec839d ie11 fix getBoundingClientRect() error 2014-07-24 17:14:40 -03:00
nightwing
23f678229a update config_test.js 2014-07-22 16:57:14 +04:00
nightwing
0eaae8712e do not rename kr_theme to kr during the build 2014-07-22 16:32:40 +04:00
Lennart Kats
f3d4147f6b Merge pull request #2023 from ajaxorg/edit_textarea
Do not hang the browser when ace.edit is called for textarea
2014-07-21 14:07:47 +02:00
Lennart Kats
c079a49ce7 Merge pull request #2053 from ajaxorg/fix/highlighting
Fix highlighting issues
2014-07-21 14:07:20 +02:00
Lennart Kats
b71a09d8d0 Merge pull request #2052 from ajaxorg/double_tap
fix Double tapping to select words doesn't work reliably
2014-07-21 14:06:19 +02:00
Harutyun Amirjanyan
c073766cc3 Merge pull request #2055 from Conaclos/working
Eiffel programming language mode
2014-07-21 04:37:47 +04:00
Conaclos
b651a424f1 Adding the new Eiffel example. 2014-07-20 19:12:34 +02:00
Conaclos
9284732a28 Remove eiffel example.
Current example is too large.
2014-07-20 19:12:03 +02:00
Conaclos
7e55724c52 Add comment mark in Eiffel mode. 2014-07-20 19:10:50 +02:00
Conaclos
fcd1dbb98d Adding Eiffel language mode.
- Adding Eiffel highlight rules and Eiffel mode
- Use Sudoku grid example of Eiffel Rosetta Code project as Eiffel example
2014-07-20 17:22:21 +02:00
nightwing
d53c91e41a update mode tests 2014-07-16 23:29:37 +04:00
nightwing
1ad5e66be0 fix #2051 highlighting php string in script tag 2014-07-16 23:27:20 +04:00
nightwing
a52b30317b add heredoc support for sh mode 2014-07-16 22:50:12 +04:00
nightwing
c1c08945b2 do not scroll cursor into view after quad click 2014-07-16 22:46:35 +04:00
nightwing
d3d2e0823b fix Double tapping to select words doesn't work reliably 2014-07-16 19:03:23 +04:00
Harutyun Amirjanyan
3b85ddfa05 Merge pull request #2048 from dfelder/patch-1
Update latex.js
2014-07-15 14:25:18 +04:00
Daniel Felder
0afb5f6da6 Update latex.js
Most of LaTeX is text. Word wrapping etc. should behave accordingly.
2014-07-15 01:38:50 +02:00
Harutyun Amirjanyan
e9faed1868 Merge pull request #2040 from devoncarew/devoncarew_show_hide_dart
add the show and hide keywords to the dart mode
2014-07-10 22:24:55 +04:00
James Allen
fd182ea76f Redraw lines and active line highlight when offscreen updates are made
When setUseWrapMode is true, if some text is inserted into a line which is
above the cursor and offscreen, then the renderer did not previously redraw the
lines or active line highlight. However, if this insert causes the line to wrap
onto another line then everything is shifted down by one visual line, leaving
the onscreen lines in an out of date state. With this commit, the onscreen
lines and active line highlight are now redrawn when this happens.
2014-07-10 12:56:11 +01:00
Devon Carew
a885aea2f0 add the show and hide keywords to the dart mode 2014-07-09 16:22:24 -07:00
Harutyun Amirjanyan
4b286a5c0d Merge pull request #2036 from jjatria/praat
Praat syntax highlighting rules
2014-07-09 21:02:18 +04:00
nightwing
a3bb907f46 v1.1.5 2014-07-09 18:32:00 +04:00
baboso
5ebcf9298b Merge branch 'master' of git://github.com/ajaxorg/ace into praat 2014-07-08 15:22:40 -04:00
baboso
4904f74dbd Minor changes to Praat syntax files 2014-07-08 15:18:57 -04:00
Harutyun Amirjanyan
d3ddd74fe7 Merge pull request #2029 from devoncarew/devoncarew_gitignore
Devoncarew gitignore
2014-07-07 19:30:04 +04:00
Devon Carew
cc03e77327 review comments 2014-07-07 08:17:25 -07:00
Fabian Jakobs
779912d517 Merge pull request #2027 from ajaxorg/autocomplete
Tweak autocomplete
2014-07-07 15:08:28 +02:00
Devon Carew
e6f01878d7 add snippets; fix the kitchensink demo 2014-07-04 11:35:07 -07:00
Devon Carew
bf72097811 add a gitignore mode 2014-07-04 11:25:53 -07:00
Ruben Daniels
c3bb709318 Merge pull request #2022 from ajaxorg/performance
do not use setInnerHTML since it isn't faster on new browsers
2014-07-03 13:53:19 +02:00
nightwing
8ed2799620 do not close the popup if there are matching completions 2014-07-03 00:12:27 +04:00
nightwing
f8be5072ac allow using name instead of caption 2014-07-02 23:56:24 +04:00
nightwing
f9b3655c94 fix autocomplete popup click regression 2014-07-02 23:38:11 +04:00
nightwing
ad54d2c46c disabled validateDelta since it breaks autocompletion popup 2014-07-02 22:04:32 +04:00
nightwing
1f7582b5a6 Merge remote-tracking branch 'remotes/origin/master' into v-1.2
Conflicts:
	lib/ace/anchor.js
	lib/ace/keyboard/vim/maps/operators.js
2014-07-02 21:58:13 +04:00
nightwing
109923873a do not hang the browser when edit is called for textarea 2014-07-02 10:58:21 +04:00
Harutyun Amirjanyan
7fbfbc4c16 Merge pull request #2025 from devoncarew/master
add the export keyword to dart
2014-07-02 07:43:30 +04:00
Devon Carew
2ce7ed0f44 add the export keyword to dart 2014-07-01 16:15:45 -07:00
nightwing
ccfb820418 add test for whitespace extension 2014-07-01 01:32:24 +04:00
nightwing
b5eda22bfc update changelog 2014-07-01 01:21:09 +04:00
nightwing
299d174dc7 do not use setInnerHTML since it isn't faster on new browsers 2014-06-29 09:58:48 +04:00
Harutyun Amirjanyan
416f5582e8 Merge pull request #2021 from devoncarew/master
remove the invalid rule from the go syntax file
2014-06-29 09:48:51 +04:00
Devon Carew
f8b7dce3e0 remove the invalid rule from the go syntax file 2014-06-28 22:21:52 -07:00
Harutyun Amirjanyan
63f43da96a Merge pull request #2012 from hartman/dragDelay
Match platform specifics for dragDelay of text
2014-06-27 20:07:43 +04:00
Derk-Jan Hartman
2dcc4a3f04 Match platform specifics for dragDelay of text
On Mac we keep it at 150ms. On other platforms it either
does not exist or at most it's very small.

This fixes issue #1879
2014-06-27 14:20:09 +02:00
nightwing
0450a1a539 remove unneeded setOption call 2014-06-25 19:01:06 +04:00
Lennart Kats
fdbd11d3df Merge pull request #2014 from ajaxorg/build
Use architect-build for building ace
2014-06-23 12:21:04 +02:00
Harutyun Amirjanyan
14f5095c92 Merge pull request #2005 from ajaxorg/overridable-mergeables
Make mergeable commands (for undo history) overridable.
2014-06-23 00:31:18 +04:00
Zef Hemel
1dd41ea75d Make mergeable commands (for undo history) overridable. 2014-06-23 00:12:20 +04:00
nightwing
ce070285a4 Merge remote-tracking branch 'remotes/origin/keybinding' 2014-06-22 23:49:13 +04:00
nightwing
3ebc2828e6 add textarea keybinding (probably fixes #36) 2014-06-22 23:44:59 +04:00
nightwing
6aaede1a2e keep mac line movement keybindings (still overridden by jumptomatching) 2014-06-22 23:33:45 +04:00
Harutyun Amirjanyan
8c86ff6fab Merge pull request #2013 from rmsmith/master
mode/applescript : set the `$id` to the correct value
2014-06-21 22:51:55 +04:00
rmsmith
739e86cde7 mode/applescript : set the $id to the correct value
This brings the new applescript mode into alignment with the other modes
per #1778
2014-06-21 19:15:52 +03:00
nightwing
6714359998 tweak 2014-06-21 01:48:07 +04:00
nightwing
e5b2eed5c5 add architect build to package.json 2014-06-20 20:55:21 +04:00
nightwing
e52884761d keep demo/kitchein-sink folders location in the build 2014-06-20 20:55:21 +04:00
nightwing
b42108a2c9 remove unnecessary use of async 2014-06-20 20:55:12 +04:00
nightwing
d63863ac0c use architect-build for building ace 2014-06-20 02:27:50 +04:00
nightwing
fcb3331d69 remove special build version for bookmarklet 2014-06-20 02:26:10 +04:00
Adam Jimenez
08bfa14dd2 jumptomatching/ selecttomatching mac shortcut
fixes #2007
2014-06-19 23:06:52 +01:00
Harutyun Amirjanyan
ffe22ce2be Merge pull request #2009 from themgt/master
adding package.json start script
2014-06-18 11:05:47 +04:00
Harutyun Amirjanyan
bdd54043b5 Merge pull request #2004 from tomalec/html-import-issue
Use current document to process <script> tags (fixes ajaxorg/ace#2003)
2014-06-18 11:05:26 +04:00
Paul
9a4bb06bb7 adding package.json start script 2014-06-16 14:08:34 -04:00
Tomek Wytrebowicz
3ce44130d4 comment the need of ownerDocument ajaxorg/ace#2003 2014-06-16 13:48:18 +02:00
Harutyun Amirjanyan
8db9dc255a Merge pull request #1994 from hitode909/fix-is-gecko
useragent.isGecko is false on Firefox 29
2014-06-16 15:05:39 +04:00
Ruben Daniels
5496351529 Merge pull request #1985 from ajaxorg/focus
fix issue with scrolling into view on focus
2014-06-16 12:34:23 +02:00
Ruben Daniels
f25b14a328 Merge pull request #1982 from ajaxorg/misc
Sync with cloud9 version
2014-06-16 12:34:04 +02:00
Tomek Wytrebowicz
b8c21d4c6f Use current document to process <script> tags (fixes ajaxorg/ace#2003) 2014-06-13 01:58:05 +02:00
Harutyun Amirjanyan
08b88485c8 Merge pull request #1996 from adamjimenez/jump-to-matching-tag
Jump To Matching Tag
2014-06-10 21:23:20 +04:00
Adam Jimenez
e92b709eb2 fix jumping to brackets in strings 2014-06-09 21:30:19 +01:00
nightwing
c5031db61c fix tests 2014-06-09 23:44:27 +04:00
Adam Jimenez
d7c7cb1b4d add html tag support to jumpToMatching 2014-06-09 17:09:31 +01:00
Adam Jimenez
76adcc51a0 Revert "Jump To Matching Tag"
This reverts commit 9a4a387de6.
2014-06-09 14:12:10 +01:00
nightwing
efcbe1c010 add todo reminder 2014-06-07 15:26:27 +04:00
nightwing
511faeeaae Merge remote-tracking branch 'remotes/pull/1995' 2014-06-07 15:20:47 +04:00
nightwing
19ec94a815 Merge branch 'pull/1995' 2014-06-07 15:18:23 +04:00
nightwing
636cc6a96f do not change mouse over selection if dragging isn't enabled 2014-06-07 15:17:27 +04:00
Adam Jimenez
c0343a2cba use setCursorStyle instead of modifying classes 2014-06-06 13:50:29 +01:00
Adam Jimenez
111ec1899f fix tag flicker
fix tag highlight flicker when selecting
2014-06-06 13:32:16 +01:00
Adam Jimenez
da5cc2e28d matching tag fixes
remove global editor ref, add listener
2014-06-06 10:53:55 +01:00
Adam Jimenez
9a4a387de6 Jump To Matching Tag
Alt-P: Jump to Matching Tag
Alt-Shift-P: Select to Matching Tag
fixes #1158
2014-06-06 10:32:18 +01:00
Harutyun Amirjanyan
ce3076b4e5 Merge pull request #1991 from adamjimenez/patch-28
fix "{$foo->bar}"."{$foo->bar($a)}"."{$foo->bar(&$a, $b)}";
2014-06-06 12:34:41 +04:00
baboso
84a8201dfd Removed useless rule 2014-06-05 18:44:20 -04:00
Adam Jimenez
07fb7738db Highlight matching HTML tag
fixes #1308
2014-06-05 19:56:46 +01:00
hitode909
84abfa5ff8 window.controllers was renamed to window.Controllers in Firefox 29
useragent.isGecko was false on Firefox 29
2014-06-05 14:10:25 +09:00
baboso
17c75da27b Added sendpraat and unquoted string directives, simplified demo example, added some other missing functions/directives 2014-06-05 00:45:20 -04:00
baboso
a519520ae7 Removed useless rules, added support for do() syntax 2014-06-04 18:03:55 -04:00
Adam Jimenez
617cd3202a fix "{$this->foo->bar('foobar')}" 2014-06-04 10:39:50 +01:00
José Joaquín Atria
d57e010ca3 Added single number font size changing commands (praat) 2014-06-03 15:10:31 -04:00
José Joaquín Atria
08afa03cb9 Fixed operators and introduced broken lines 2014-06-03 14:32:55 -04:00
Adam Jimenez
32e3ad5966 fix "{$foo['bar']}" 2014-06-03 00:41:47 +01:00
Adam Jimenez
bf9eec6b23 fix "{$foo->bar}"."{$foo->bar($a)}"."{$foo->bar(&$a, $b)}"; 2014-06-02 23:26:59 +01:00
Ruben Daniels
c8483a7ae5 Merge pull request #1988 from ajaxorg/syntax/vala
add vala mode
2014-06-02 09:46:21 +02:00
baboso
df92a99e93 Praat syntax highlighter, first release 2014-06-01 18:27:03 -04:00
nightwing
a7cac9466d add vala mode 2014-06-01 22:54:30 +04:00
baboso
e4355adae7 Initial commit for praat highlighting: based on Perl 2014-05-31 19:51:41 -04:00
nightwing
1c2bc29424 fix selecting with ctrl-alt click 2014-05-28 01:25:18 +04:00
Harutyun Amirjanyan
df6001ca67 Merge pull request #1984 from ylian/master
AppleScript syntax highlighter
2014-05-26 14:23:21 +02:00
Yaogang Lian
066180b248 Fixed comment highlighting in AppleScript highlighter. 2014-05-23 08:05:56 -04:00
nightwing
66866121e9 fix issue with scrolling into view on focus 2014-05-23 14:13:23 +04:00
Zef Hemel
717be26d5d Further improvements to Clojure mode indent. 2014-05-23 09:06:48 +02:00
Yaogang Lian
77ec0af40a AppleScript syntax highlighter 2014-05-22 22:35:04 -04:00
nightwing
d0acc15e67 fix #1973 custom array of autocompleters never used 2014-05-23 00:16:31 +04:00
Harutyun Amirjanyan
bec92e678d Merge pull request #1976 from AMiniLegend/master
Added three new functions for selections:
2014-05-22 21:56:14 +02:00
AMiniLegend
b7eacfb153 Merge pull request #1 from AMiniLegend/selection-features
Selection features updated
2014-05-21 16:42:26 -04:00
AMiniLegend
03eee835df Updated ExpandToLine, JoinLines, and InvertSelection based on feedback. 2014-05-21 16:39:47 -04:00
nightwing
7e2dda1e18 allow tokenizer states with only defaultToken 2014-05-21 20:38:07 +04:00
nightwing
72a509e542 improve ruby outdent 2014-05-21 20:32:34 +04:00
nightwing
4872441bc6 fix vim cc 2014-05-21 20:32:08 +04:00
nightwing
ba93cc6dfa fix tab detection 2014-05-21 20:30:47 +04:00
nightwing
88aed65212 fix home key on folded line 2014-05-21 20:26:13 +04:00
nightwing
9ab12a6ed3 fix ctrl-shift-mousedown 2014-05-21 20:07:07 +04:00
nightwing
4e2d7a41f5 update jshint 2014-05-21 18:16:08 +04:00
Harutyun Amirjanyan
2cb84b3bc3 Merge pull request #1922 from brn/fix-ie7-error
IE7 cause error when accessing the HTMLElement.style.font property.
2014-05-21 14:25:26 +02:00
brn
2d39aca4a7 fix code style. 2014-05-21 09:27:10 +09:00
Lennart Kats
446e497da8 Merge pull request #1965 from ajaxorg/misc
various small fixes
2014-05-20 17:31:50 +02:00
nightwing
473b6958bc Revert "assign key to splitline command on windows (#1956)"
This reverts commit 4329b6a729.
2014-05-20 19:29:20 +04:00
AMiniLegend
470efff782 Changed the name of the "joinSelection" function to "joinlines".
Also changed it's behavior so that when there is no selection, it will join with the next line.
2014-05-18 20:36:06 -04:00
AMiniLegend
8f8410f01b Added three new functions for selections:
expandtoline    - selects the entire line for each line in a selection (newline included)
joinSelection   - joins selected lines into a single space-delimited line
invertSelection - inverts all selected lines
2014-05-18 13:51:46 -04:00
nightwing
5dc93cd627 add r.js demo 2014-05-18 17:12:55 +04:00
Harutyun Amirjanyan
6e82b0a3c3 Merge pull request #1975 from adamjimenez/patch-26
typo
2014-05-17 21:54:05 +02:00
Adam Jimenez
307b947e96 typo 2014-05-17 20:30:56 +01:00
nightwing
739baebbd0 setDefaultHandler was breaking vim mode 2014-05-17 22:09:05 +04:00
Harutyun Amirjanyan
87a4e2666b Merge pull request #1954 from earth2marsh/patch-1
Isolate float regex matching to 1 char for + and -
2014-05-17 12:09:04 +02:00
Marsh Gardiner
05f0b3c7f2 Isolate float regex matching to 1 char for + and -
This prevents highlighting on the "2" in "auth: oauth2". (signing CLA and sending in now)

Now passes tests and also covers .37 case.

… and updated to cover the ++ or -- case.
2014-05-16 15:39:24 -07:00
nightwing
9910c9db32 cleanup 2014-05-17 01:46:45 +04:00
Harutyun Amirjanyan
cf35fbdeec Merge pull request #1971 from devoncarew/devoncarew_rethrow
add the rethrow keyword to the syntax highlighter
2014-05-16 22:06:49 +02:00
Devon Carew
56e2819cdd add the rethrow keyword to the syntax highlighter 2014-05-16 13:02:45 -07:00
Harutyun Amirjanyan
f1e819cd80 Merge pull request #1968 from timothyrenner/master
Fixed matlab syntax highlighting bug.
2014-05-16 21:32:36 +02:00
Timothy Renner
12c6cf1f41 Fixed matlab syntax highlighting bug. 2014-05-15 16:22:53 -07:00
nightwing
4329b6a729 assign key to splitline command on windows (#1956) 2014-05-15 19:59:01 +04:00
nightwing
b6a5e222cd fix Ace on ChromeOS uses wrong keys for Home/End (#1950) 2014-05-15 19:58:03 +04:00
nightwing
ea07bfb4e7 fix highlighting of unicode variables in julia 2014-05-15 14:10:29 +04:00
Adam Jimenez
39fd0e6c42 fix mouse not always changing on first line 2014-05-14 15:08:40 +01:00
Adam Jimenez
8dffbbe200 selection hover improvements
fix issue with wrapped lines and compute only when necessary.
2014-05-14 14:56:57 +01:00
nightwing
2327d155b4 fix autocomplete regression from 80187560 2014-05-14 16:38:50 +04:00
Adam Jimenez
23680b4f7e change mouse cursor when over selection
moved to mouse handler. don't change when dragging or selecting.
2014-05-14 10:30:31 +01:00
Adam Jimenez
449226dac9 Revert "change mouse cursor when over a selection"
This reverts commit b5a1aaebba.
2014-05-14 10:27:37 +01:00
Harutyun Amirjanyan
03d3a725ef Merge pull request #1943 from umop/linking-option
Linking class for firing eclipse-style identifier ctrl + click link events.
2014-05-13 18:54:45 +02:00
Harutyun Amirjanyan
199bc4701d Merge pull request #1960 from ajaxorg/improved-clojure
Slightly improved auto indent for Clojure
2014-05-13 18:44:55 +02:00
Zef Hemel
effcb04a9a Slightly improved auto indent for Clojure 2014-05-13 16:01:23 +02:00
Adam Jimenez
b5a1aaebba change mouse cursor when over a selection
Change mouse cursor to a pointer when hovered over a selection
2014-05-12 17:35:41 +01:00
Harutyun Amirjanyan
8416cfb42a Merge pull request #1955 from wcandillon/patch-2
Fix misspelled enableLiveAutocompletion option
2014-05-12 16:46:27 +02:00
Lennart Kats
669deb54b2 Merge pull request #1952 from ajaxorg/misc
Sync with cloud9 + better demos
2014-05-11 19:13:07 +02:00
William Candillon
d5566938ba Fix misspelled enableLiveAutocompletion option 2014-05-11 14:29:02 +02:00
Eric Arnold
19f1d99a98 Review fixes: Changed mousedown to click and changed event naming to use camelCase. Removed unnecessary exports 2014-05-09 16:30:35 -07:00
Eric Arnold
0582153019 Turned linking.js into extension. Merged linking_handler into linking.js. 2014-05-09 16:24:02 -07:00
Harutyun Amirjanyan
4e9e553436 Merge pull request #1951 from yoloseem/master
Fix broken GitHub ribbon image src.
2014-05-09 15:37:38 +02:00
Hyunjun Kim
e8ee926097 Fix broken GitHub ribbon image src. 2014-05-09 15:13:17 +09:00
nightwing
ace5fd14a2 update index.html 2014-05-05 19:51:38 +04:00
nightwing
efea2a755b cleanup demo html pages 2014-05-05 19:51:37 +04:00
nightwing
ee4bed3db1 fix editor scrolling down automatically when resizing and scrolled past end 2014-05-05 19:51:28 +04:00
Harutyun Amirjanyan
6779345049 Merge pull request #1924 from unional/liveAutocomplete
Improve auto complete
2014-05-05 17:40:47 +02:00
Homa Wong
8018756051 Update regex and condition check according to suggestion 2014-05-04 09:45:12 -07:00
nightwing
feb500c86e fix inserting snippets when multiple selections are present 2014-05-04 17:29:56 +04:00
Lennart Kats
12ef5f9f6b Merge pull request #1940 from ajaxorg/misc
Fix several small issues
2014-05-01 19:17:36 +02:00
Harutyun Amirjanyan
deb4013a13 Merge pull request #1941 from devoncarew/master
add dartdoc indentation handling to the dart mode
2014-04-30 12:38:41 +02:00
Eric Arnold
ca170b5d3d Made and implemented Linking class for tracking eclipse-style identifier ctrl + clicks. Off by default. 2014-04-29 17:15:25 -07:00
Devon Carew
393dc852dc add dartdoc indentation handling to the dart mode 2014-04-29 13:58:24 -07:00
nightwing
0155c67b1f fix more vim issues (fixes #1930) 2014-04-30 00:27:24 +04:00
Harutyun Amirjanyan
225985634e Merge pull request #1938 from hartman/ie7_comma
Fix a trailing comma breaking IE7/8
2014-04-29 20:44:58 +02:00
Harutyun Amirjanyan
1ef6700be7 Merge pull request #1937 from Houfeng/master
put textor on the ace site
2014-04-29 11:49:45 +02:00
Derk-Jan Hartman
b146bbaea0 Fix a trailing comma breaking IE7 2014-04-29 11:36:23 +02:00
Houfeng
68ede367a6 add textor
add textor
2014-04-29 17:29:18 +08:00
Harutyun Amirjanyan
4949e18f00 Merge pull request #1925 from ggoodman/patch-1
Prevent repeat firing of render callback
2014-04-27 14:43:32 +02:00
ggoodman
6db76f92cc Prevent repeat firing of render callback
If either the theme or mode are already cached, callback will be fired more than once.

This is because `config.loadModule` appears to fire its callback synchronously. This means that in the event that the theme is already cached, `waiting` will first be incremented then decremented in the same pass, resulting in `done` being called a first time.

Control will then flow to the `return` statement where waiting is still `0` and so the `callback` will fire a 2nd time.

* Changes *

Instead of changing the semantics of `config.loadModule`, I increment waiting at creation so that it will never fire until at least line #130 (`return` statement).
2014-04-24 15:44:51 -04:00
Homa Wong
54a1060a81 Rename enableLiveAutocomplete to enableLiveAutocompletion to match enableBasicAutocompletion 2014-04-24 00:58:59 -07:00
Homa Wong
163a6a9243 Update text_completer and util to support unicode characters autocomplete.
Update language_tools to support pass in completers at enableLiveAutocomplete and enableBasicAutocomplete so user can further customize the completion behavior.
2014-04-24 00:58:51 -07:00
Homa Wong
9391e0b9bb Fix live auto completion.
Didn't set completers when enabling it.
2014-04-24 00:58:07 -07:00
brn
31c2978ca7 fix IE7 style.font property access.
add ie check.
2014-04-22 11:55:47 +09:00
brn
2566dd74a5 fix style.font property. 2014-04-22 10:56:52 +09:00
Harutyun Amirjanyan
0e3abd3f41 Merge pull request #1920 from cptroot/patch-1
Fix not recognizing `\\` as an escape sequence.
2014-04-21 12:21:37 +02:00
Harutyun Amirjanyan
b2af4389fa Merge pull request #1918 from rmsmith/master
dart_highlight_rules : add `assert` to `keywordControl`
2014-04-21 12:19:46 +02:00
cptroot
5b697f68d1 Fix not recognizing \\ as an escape sequence. 2014-04-20 17:39:48 -07:00
rmsmith
25e70c4430 update tokens_dart.json regarding assert statement 2014-04-20 19:46:28 +03:00
rmsmith
06db67de16 dart_highlight_rules : add assert to keywordControl
"assert" is a reserved word and a statement in the Dart language (as
opposed to a built-in function call) as described in the spec:

https://www.dartlang.org/docs/spec/latest/dart-language-specification.html#h.cb5i0axenow6
2014-04-20 19:22:03 +03:00
nightwing
3631e7f720 Merge branch pull/1915 Fixed hotkeys for changing font size 2014-04-18 14:23:11 +04:00
nightwing
c5689d94ca also enable numpad keys for increaseFontSize 2014-04-18 14:22:23 +04:00
jimmyboh
156ebc0a72 Fixed hotkeys for changing font size (Fixes #1914)
Hotkey for `increaseFontSize` does not work, `+` key should actually be
`=`.
2014-04-17 13:09:13 -04:00
Harutyun Amirjanyan
3b76a2ebef Merge pull request #1911 from nraynaud/patch-1
fix documentation for getCursor
2014-04-16 12:06:35 +02:00
Nicolas Raynaud
ee052c06d3 fix documentation for getCursor 2014-04-15 22:13:59 +02:00
nightwing
d05213cd92 fix #1834 vim mode issues 2014-04-13 20:52:23 +04:00
nightwing
9e182a1de7 tweak js and sh modes 2014-04-13 20:48:38 +04:00
nightwing
14721de01f add findall command 2014-04-13 20:47:06 +04:00
nightwing
0a9dc16f22 revert Makefile.dryice.js broken by 56631344 2014-04-13 20:44:15 +04:00
Harutyun Amirjanyan
993df16bdb Merge pull request #1907 from ajaxorg/dockerfile
Dockerfile
2014-04-13 18:21:00 +02:00
Fabian Jakobs
75bac806b0 always use https 2014-04-13 16:20:02 +00:00
Fabian Jakobs
1bd5b56793 minor fix 2014-04-13 16:16:30 +00:00
Fabian Jakobs
7767efe0f6 fix dockerfile mode 2014-04-13 16:08:45 +00:00
Fabian Jakobs
4d24573946 use wildcard protocol for external resources.
Otherwise we can't serve it over https
2014-04-13 16:07:34 +00:00
nightwing
4d868a046a use correct indent size when expanding snippet at the start of the line 2014-04-11 22:24:59 +04:00
nightwing
f5f2d823b9 Merge remote-tracking branch 'remotes/origin/vim' 2014-04-11 20:47:52 +04:00
nightwing
052559778d Merge branch pull/1851 2014-04-11 20:47:40 +04:00
nightwing
1f33265ba7 fix typo in indenter regexp 2014-04-11 20:46:39 +04:00
Alexander Lourier
187b90dd84 Handle language-switching keystroke gracefully 2014-04-11 18:55:09 +04:00
nightwing
56631344ba Merge remote-tracking branch 'remotes/pull/1874'
Conflicts:
	Makefile.dryice.js
2014-04-11 18:46:54 +04:00
nightwing
cff2aeaeb7 cleanup 2014-04-11 18:43:01 +04:00
nightwing
96145bcd8a fix vim keys don't work in read-only files 2014-04-10 18:17:48 +04:00
Lennart Kats
2a2efb133b Merge pull request #1904 from ajaxorg/small-bugs
fix several small bugs
2014-04-10 13:51:19 +02:00
nightwing
5aba18ea06 fix ie focus issues 2014-04-10 15:11:11 +04:00
nightwing
3296dd7471 allow keys not handled by vim to be handled by default ace keybinding 2014-04-10 14:46:19 +04:00
nightwing
fdf832784f fix #1893 fix highlighting for PHP CJK variable name. 2014-04-10 14:33:37 +04:00
nightwing
d1decf7e13 update tests 2014-04-10 14:03:31 +04:00
nightwing
65003e259a do not highlight <scripts> tag same as <script> 2014-04-10 13:57:21 +04:00
nightwing
91e6abf099 fix #1890 Second cursor after double clicking in IE8 2014-04-10 13:38:06 +04:00
Harutyun Amirjanyan
831f6c9336 Merge pull request #1902 from pjhuck/master
fix for anchor & insertRight behavior
2014-04-10 14:35:45 +05:00
Paul Huck
ce6c0aa84b fix for anchor & insertRight behavior
Do not move the anchor down when it is at column 0 and lines are
inserted at that
2014-04-09 09:46:53 -07:00
nightwing
55886771a9 Merge branch 'tweak-autocomplete' 2014-04-09 18:37:45 +04:00
Fabian Jakobs
23055a2fcf add dockerfile mode 2014-04-09 09:08:14 -04:00
nightwing
4599dc6834 cleanup 2014-04-09 14:25:26 +04:00
nightwing
c3dd9ff510 remove bogus string.regexp highlight rules from java and c# 2014-04-08 22:37:16 +04:00
Harutyun Amirjanyan
32cbb0ffa1 Merge pull request #1900 from danyaPostfactum/miscfixes
Miscellaneous fixes
2014-04-08 23:11:03 +05:00
DanyaPostfactum
f39f16e12f Fix cut/copy in Firefox (setData() may return nothing). 2014-04-08 14:23:47 +10:00
DanyaPostfactum
df68336921 Fix bug of tooltipFollowsMouse option with folded text. 2014-04-08 14:23:38 +10:00
DanyaPostfactum
0d6eb5b718 Fix jump to last item in completer popup. 2014-04-08 14:23:16 +10:00
William Candillon
b67caa1163 Disable Tab command binding for autocomplete (incompatible with live autocomplete) 2014-04-05 23:31:20 +02:00
William Candillon
a05b84f4df Bug fix 2014-04-05 22:38:23 +02:00
William Candillon
a7297de55f Update autocomplete to handle custom identifier regexprsw 2014-04-05 20:16:02 +02:00
Harutyun Amirjanyan
7fc47d77a3 Merge pull request #1894 from 28msec/master
XQuery & JSONiq mode refactoring
2014-04-05 18:10:38 +05:00
William Candillon
e87dfcce7a Minor JSONiq mode refactoring 2014-04-04 21:01:54 +04:00
William Candillon
6c38e136c1 Update xqlint version 2014-04-04 21:01:51 +04:00
William Candillon
cbd66efbf3 Bug fix 2014-04-04 21:01:50 +04:00
William Candillon
5b93b1d51a Update xqlint version 2014-04-04 21:01:50 +04:00
William Candillon
2119154050 Update to xqlint master branch. 2014-04-04 21:01:48 +04:00
William Candillon
1c2e388c24 Update xqlint build
Conflicts:
	tool/update_deps.js
2014-04-04 21:01:47 +04:00
William Candillon
d6d3f0b384 Update Query worker. 2014-04-04 21:01:21 +04:00
William Candillon
431facf08b Update code snippets
Conflicts:
	lib/ace/snippets/jsoniq.snippets
	lib/ace/snippets/xquery.snippets
2014-04-04 21:00:50 +04:00
William Candillon
3c13b4bf33 Bug fixes 2014-04-04 20:59:29 +04:00
William Candillon
ea532e41bf Update xqlint with code completion 2014-04-04 20:59:28 +04:00
William Candillon
4e23984ddb Bug fixes 2014-04-04 20:59:28 +04:00
William Candillon
f37899463f Update JSONiq code snippets 2014-04-04 20:59:28 +04:00
William Candillon
34f34bb591 Bug fixes 2014-04-04 20:59:28 +04:00
William Candillon
8645e67f42 Update XQLint version 2014-04-04 20:59:27 +04:00
William Candillon
f6faeb3547 Add JSONiq & XQuery code snippets 2014-04-04 20:59:22 +04:00
nightwing
a188ac7fa6 fix regression for autocomplete with empty prefix 2014-04-02 00:03:53 +04:00
Lennart Kats
3f6e2aded9 Merge pull request #1846 from ajaxorg/old_browser_compatibility
Fix old browser compatibility issues
2014-04-01 12:49:47 +02:00
Lennart Kats
bb10f4661d Merge pull request #1885 from ajaxorg/update_deps
update saxparser and jshint
2014-04-01 12:11:43 +02:00
nightwing
9c53d96c12 fix #1847 tab doesn't work for invalid css when emmet is enabled 2014-03-31 20:34:34 +04:00
nightwing
5ef28b7e11 fix #1888 csslint worker gives error for empty file 2014-03-31 20:33:35 +04:00
nightwing
dcd96294f7 update csslint 2014-03-31 20:23:45 +04:00
nightwing
bb55802197 update require.js 2014-03-31 20:02:13 +04:00
nightwing
ec97ad7904 Merge remote-tracking branch 'remotes/origin/master' into v-1.2
Conflicts:
	build
	lib/ace/document.js
2014-03-31 00:49:41 +04:00
Harutyun Amirjanyan
90a21c012c Merge pull request #1883 from wcandillon/patch-1
Fix Range resolution
2014-03-30 19:58:13 +05:00
nightwing
8d45a2d209 update saxparser and jshint 2014-03-30 18:53:52 +04:00
William Candillon
02cf485055 Fix Range resolution 2014-03-30 00:55:22 +01:00
Harutyun Amirjanyan
207adf8eba Merge pull request #1734 from danyaPostfactum/refactor/htmlmode
HTML mode modification, completer auto activation feature
2014-03-26 17:46:13 +04:00
Aaron O'Mullan
9062f4fe40 Remove unused mode/xml_util.js 2014-03-23 20:10:44 -07:00
nightwing
362a69228b fix typo 2014-03-23 18:56:39 +04:00
nightwing
fbc5460320 Merge branch 'fix-markdown-highlighting' 2014-03-23 17:36:38 +04:00
Garen Torikian
a4921fe7ce Fix GFM blocks within lists 2014-03-23 17:35:00 +04:00
nightwing
a573fa3dec Merge branch 'beautify' 2014-03-23 17:31:29 +04:00
nightwing
ef3262143a reorganize beautifier addon 2014-03-23 17:30:39 +04:00
Adam Jimenez
180fa0c4cb Beautify
Beautify based on Ace tokenizer
2014-03-23 15:22:56 +04:00
nightwing
d76e3e29c6 Merge remote-tracking branch 'remotes/pull/1866' 2014-03-23 15:20:15 +04:00
nightwing
f00f2bfc40 Merge remote-tracking branch 'remotes/origin/fix-special-keys' 2014-03-23 15:19:42 +04:00
nightwing
79f619364a clenup 2014-03-23 15:19:24 +04:00
Zef Hemel
372b5409fa Reordered keys 2014-03-22 17:51:02 +01:00
Zef Hemel
00305167a2 Make they Ctrl/Alt/Command-= and - key combos work (on Chrome). 2014-03-22 17:46:26 +01:00
nightwing
26f96c0ea2 Merge remote-tracking branch 'remotes/origin/autocomplete-async-fix'
Conflicts:
	lib/ace/autocomplete.js
2014-03-21 15:36:08 +04:00
nightwing
8e5bdc512c Merge remote-tracking branch 'remotes/pull/1789'
Conflicts:
	lib/ace/autocomplete.js
2014-03-21 15:35:04 +04:00
Harutyun Amirjanyan
91bc4b82d7 Merge pull request #1824 from buildersbrewery/master
updated LSL syntax and made LSL snippets work
2014-03-21 15:00:59 +04:00
Lennart Kats
65822b59fe Merge pull request #1865 from ajaxorg/autocomplete-noselect
Add autoSelect option to auto completion
2014-03-20 15:59:46 +01:00
Zef Hemel
750e53fab2 Now with space after the if 2014-03-20 15:31:02 +01:00
Zef Hemel
31a32f2659 Fixes asynchronous autocompleter prefix updating
Before it could happen (if an async autocompleter returned late) that
the prefix used in the autocomplete was out of date. This fixes that.
2014-03-20 15:27:51 +01:00
Builders Brewery
d03c0957b4 fix character escapes 2014-03-19 17:03:03 +01:00
Builders Brewery
f4613206be revert to old string regex 2014-03-19 16:39:00 +01:00
Harutyun Amirjanyan
408b9c527b Merge pull request #1868 from adamjimenez/patch-24
missing bitwise xor function
2014-03-19 15:53:54 +04:00
Adam Jimenez
de51e72a3c missing bitwise xor function
Fixes error:
```
[object Object] has no method 'Node_Expr_BitwiseXor' 
```

Which results from using xor e.g:
```
error_reporting(E_ALL ^ E_NOTICE);

also reported to phpjs project:
https://github.com/niklasvh/php.js/pull/48
2014-03-18 16:01:33 +00:00
Derk-Jan Hartman
46da3132a2 Make sure the CORS blobworker loads absolute URLs
The only situation where this is really needed, is if the workerURL is
protocol relative, since we only end up in this situation if workerurl
is on a different server to begin with.
2014-03-17 23:10:24 +01:00
Zef Hemel
21ee784ca1 Add autoSelect option to auto completion
By setting this to `false` no completion will be selected by default and
pressing `Return` will simply insert a new line, rather than the first
match.
2014-03-17 11:38:16 +01:00
Zef Hemel
0bc7f518ad Merge pull request #1858 from robru/invisible_granularity
Increase granularity of invisible character classes.
2014-03-16 15:35:19 +01:00
DanyaPostfactum
a0bf93679d Fix <CR><LF> handing in highlight_rules_test.js 2014-03-16 00:33:26 +10:00
DanyaPostfactum
1f72461ada Modify xml highlight rules (add "xml" suffix to tokens) 2014-03-16 00:33:09 +10:00
Robert Bruce Park
5705c067fe This should just about fix that. 2014-03-14 22:40:00 -07:00
Robert Bruce Park
6594a3fe55 Fix more CI failures. 2014-03-14 22:32:31 -07:00
Robert Bruce Park
a4b27cbc3a Resolve some CI failures. 2014-03-14 22:26:05 -07:00
Robert Bruce Park
dc87483936 Increase granularity of invisible character classes. 2014-03-14 22:14:45 -07:00
Harutyun Amirjanyan
b04c07b448 Merge pull request #1848 from LivelyKernel/markdown-comment-fix
markdown mode comment fix
2014-03-13 19:48:08 +04:00
Harutyun Amirjanyan
8b950c1121 Merge pull request #1849 from LivelyKernel/emacs-fixes-2014-03-12
Emacs fixes 2014 03 12
2014-03-13 19:46:08 +04:00
nightwing
8cdb16659d fix #1843 Double click to select word does not work for Qt QWebView 2014-03-13 19:42:05 +04:00
Weihang Fan
59c392042a Fixed auto-indent for switch statements. 2014-03-13 19:10:19 +08:00
Weihang Fan
88829fbee7 Add auto-indent in CoffeeScript for if, for, while, and loop statements. 2014-03-13 12:23:21 +08:00
Robert Krahn
12343e0e6f isearch: fixing isearch onpase 2014-03-12 06:38:39 -07:00
Robert Krahn
c8b63ee977 isearch: recenterTopBottom 2014-03-12 06:38:37 -07:00
Robert Krahn
58404df349 isearch: now supports yanking, and killing text from edit buffer 2014-03-12 06:38:32 -07:00
Robert Krahn
3b7569542f fixing emacs key handler when key code == -1 (this can happen with the
change introduced in #5e2c5f4)
2014-03-12 06:38:30 -07:00
Robert Krahn
08d2ebb5b2 occur: fix emacs line start 2014-03-12 06:38:22 -07:00
Robert Krahn
6f8035f710 markdown mode comment fix 2014-03-12 05:55:54 -07:00
nightwing
498af4aab8 better fix for Array.slice on ie8 2014-03-12 12:48:00 +04:00
nightwing
5689573170 fix tests 2014-03-12 03:41:04 +04:00
nightwing
c72617b033 fix sticky selection if editor loaded into iframe 2014-03-12 03:34:52 +04:00
nightwing
6e14e92912 fix #1751 sticky selection on in IE11 2014-03-12 03:24:14 +04:00
nightwing
09d6741a02 fix clipboard on old webkit versions 2014-03-12 02:42:47 +04:00
nightwing
051128c16f restore ie8 compatibility 2014-03-12 01:12:34 +04:00
nightwing
6c235fee7d release 1.1.3 2014-03-08 17:33:18 +04:00
Lennart Kats
86e7a49666 Merge pull request #1828 from ajaxorg/c9
Update Ace and fix several small issues
2014-03-06 15:46:22 +01:00
nightwing
3166b3fb90 fix #1836 html worker logs a lot of unable to load 2014-03-03 15:24:39 +04:00
nightwing
96184bda23 fix zed icon 2014-02-26 23:45:33 +04:00
Harutyun Amirjanyan
0431f2dafb Merge pull request #1830 from yury/patch-1
Indent after `module` keyword
2014-02-26 23:39:23 +04:00
nightwing
c1011ca875 fix worker build 2014-02-26 17:29:32 +04:00
Yury Korolev
d8c05b5138 Indent after module keyword 2014-02-24 22:12:21 -08:00
nightwing
a9117a4aee define('ace/ace') needs to be at the end of ace.js
fixes https://github.com/ajaxorg/ace-builds/issues/15
2014-02-23 17:21:02 +04:00
nightwing
07c7c86944 fix #1827 setScrollMargin Breaks Multiple Selection When Margin is Greater Than 0 2014-02-23 12:02:45 +04:00
Harutyun Amirjanyan
bfba4f1efd Merge pull request #1826 from devoncarew/master
remove yaml comment syntax highlighting - it's too aggressive
2014-02-22 23:00:56 +04:00
devoncarew@google.com
56a00f3fa0 remove yaml comment syntax highlighting - it's too aggressive 2014-02-22 09:54:37 -08:00
nightwing
306e918920 fix #1825 editor created with showGutter=false cannot later show gutters 2014-02-21 22:38:42 +04:00
nightwing
45311cda45 fix #1808 show different different indicators for LF and CRLF 2014-02-21 22:30:47 +04:00
Harutyun Amirjanyan
08454b7ecb Merge pull request #1815 from jbrazeau/patch-1
Patch proposal for IE11 compatibility issue
2014-02-21 22:28:12 +04:00
nightwing
3694a02532 do not copy "ace/ace" when setting as global 2014-02-21 22:08:35 +04:00
nightwing
9c80485d91 allow setting editor session to null 2014-02-21 22:08:35 +04:00
nightwing
5783bae058 add event.getModifierString to convert hash into readable string 2014-02-21 22:08:35 +04:00
nightwing
42a368ed02 add selection.moveTo 2014-02-21 22:08:35 +04:00
nightwing
4a80bd7b3d fix cstyle behavior in multicursor mode 2014-02-21 22:08:35 +04:00
nightwing
6e9c9417fc cleanup 2014-02-21 22:08:35 +04:00
nightwing
f352165725 move text measuring into separate module 2014-02-21 22:08:35 +04:00
nightwing
f4d1dc7c13 create wrap data lazily 2014-02-21 22:08:34 +04:00
nightwing
316bb55f17 fix inserting long text 2014-02-21 22:08:34 +04:00
Builder's Brewery
32191f128b working on invalid escape chars 2014-02-20 08:56:39 +01:00
Builder's Brewery
2be1a5a3d3 trying to fix regex for invalid escape chars 2014-02-20 08:47:18 +01:00
Harutyun Amirjanyan
89c6609e97 Merge pull request #1823 from trinketapp/master
add missing backslash
2014-02-19 22:41:39 +04:00
Builder's Brewery
102de76b68 changed regex order 2014-02-18 17:33:52 +01:00
Builder's Brewery
b9d16078f7 fix lsl string - part two 2014-02-18 17:27:05 +01:00
Builder's Brewery
4e4d8a553b fix lsl string - part one 2014-02-18 17:22:47 +01:00
Builder's Brewery
a2cc97b34b fix lsl test 2014-02-18 16:24:35 +01:00
Builders Brewery
2b77b9ec8b updated LSL syntax 2014-02-18 16:04:54 +01:00
Ben Wheeler
f531569824 add missing backslash
escape the backslash in the fenced code block regexp
2014-02-18 09:36:54 -05:00
Harutyun Amirjanyan
e5edb59d00 Merge pull request #1820 from Cirru/master
fix dollar; add comma syntax
2014-02-18 13:25:20 +04:00
Harutyun Amirjanyan
a87b9e4dbc Merge pull request #1822 from trinketapp/master
Allow arbitrary language names in gfm fenced blocks
2014-02-18 13:24:40 +04:00
Benjamin Wheeler
e672469923 Updated markdown fenced blocks to allow more liberal language names 2014-02-17 22:36:44 -05:00
Benjamin Wheeler
7439993b1a Allowed . in markdown language blocks
Updated markdown highlighter to allow stuff like ```python.run
2014-02-17 16:33:05 -05:00
jiyinyiyong
080596e6a1 fix dollar; add comma syntax 2014-02-16 23:49:54 +08:00
nightwing
27b6d6dcd3 apply arguments max length also includes actual call stack 2014-02-15 00:20:10 +04:00
nightwing
6b60bcbbd6 continue refactoring 2014-02-14 23:52:59 +04:00
nightwing
46f3d77068 simplify apply_delta.js 2014-02-14 22:33:30 +04:00
nightwing
c8d1df203e restore single line delta optimization in anchor.js 2014-02-14 22:32:51 +04:00
nightwing
4299db01bd remove delta.range 2014-02-14 22:32:31 +04:00
nightwing
b5af2c898c Merge remote-tracking branch 'remotes/origin/master'
Conflicts:
	lib/ace/document.js
	lib/ace/editor.js
	lib/ace/undomanager.js
2014-02-14 18:23:03 +04:00
Harutyun Amirjanyan
e4cfb47ae1 Merge pull request #1782 from pnevels/master
add Gherkin highlighting support
2014-02-14 15:15:13 +04:00
nightwing
927bf936da #1429 remove bidi-override 2014-02-14 12:13:42 +04:00
nightwing
3bed18be1d restore other demo files 2014-02-12 23:32:02 +04:00
Thaddee Tyl
a6ece4cbfa rename AsciiDoc demo. 2014-02-12 23:24:42 +04:00
nightwing
5e3c3b660b revert AsciiDoc demo deletion 2014-02-12 23:13:48 +04:00
Harutyun Amirjanyan
7981e0ca6c Merge pull request #1813 from 1ec5/patch-1
Fixed passing non-Ranges into Document methods
2014-02-12 20:21:32 +04:00
jbrazeau
8ba0cd91be Fix : for UIE11, regexp must also consider Trident string 2014-02-12 15:31:43 +01:00
Jean-Francois Brazeau
7a8a799c26 Update useragent.js
Patch proposal for https://github.com/ajaxorg/ace/issues/1814 (IE11 compatibility issue)
2014-02-12 15:05:53 +01:00
Minh Nguyễn
3eefd3365a Fixed passing non-Ranges into Document methods
Fixed regression from b23265ad: ! takes precedence over instanceof.
2014-02-12 03:48:42 -08:00
Lennart Kats
ffc9cec9ef Merge pull request #1809 from ajaxorg/c9
Add smarty mode and fix several small bugs
2014-02-12 11:21:41 +01:00
nightwing
68096ff38d run extension files automatically 2014-02-11 20:40:31 +04:00
nightwing
9db70f0351 add block comment for sql 2014-02-11 20:22:08 +04:00
nightwing
471e9c6d40 fix typo 2014-02-09 17:34:25 +04:00
Aaron O'Mullan
297c05831e Fix minor typo in enableLiveAutocomplete 2014-02-08 02:18:52 +01:00
Aaron O'Mullan
889e9248f8 Cancel out unwanted editor's css for autocomplete dialog 2014-02-08 01:47:01 +01:00
Aaron O'Mullan
e06a14ab92 Revert "Remove autocomplete shadow from ambiance theme"
This reverts commit 0e256ce80d.
2014-02-08 01:38:24 +01:00
Aaron O'Mullan
f7be399bd2 Add "enableLiveAutocomplete" option
This makes live autocomplete optional and is not tied to
“enableBasicAutocomplete” anymore

This also renames “onChangeAutocomplete” to “doLiveAutocomplete”
2014-02-08 01:01:30 +01:00
Aaron O'Mullan
cbbbf1c539 Fix bug and clarify async autocomplete result gathering
@SamyPesse’s “left: total - (i + 1)” was flawed because it only would
work if all completers were async
2014-02-08 00:50:50 +01:00
Aaron O'Mullan
c52278a64e Cleanup autocomplete.js
Consistently use .bind(this) instead of that = this
2014-02-08 00:32:16 +01:00
Harutyun Amirjanyan
aab8b7f7a8 Merge pull request #1805 from creationix/master
Two tiny fixes I made while working on Tedit
2014-02-07 21:14:52 +01:00
Tim Caswell
a8ba1e06d9 Fix syntax error in kuroir.css
This bad line was breaking my css parser.

Workaround in my code: 079741c477/src/applytheme.js (L66-L67)
2014-02-07 13:08:35 -06:00
Tim Caswell
0f9bcfbc7d Fix out-of-range error when parsing certain files.
An example file that breaks on this is b2f8bf1e74/kitchen-sink/demo.js (L1000)
2014-02-07 13:05:43 -06:00
nightwing
7cff8e7cff Merge pull request 1542 'Add worker to the html mode' 2014-02-07 01:54:55 +04:00
nightwing
8ccb0e6fda disable worker for non html modes, make doctype message info 2014-02-07 01:52:26 +04:00
nightwing
eac48f5190 fix broken python snippet 2014-02-06 00:19:41 +04:00
nightwing
4795261b94 fix infinite loop when inserting snippet with self referencing tabstop
fixes #1802
2014-02-06 00:13:52 +04:00
nightwing
42f274a42c update smarty mode 2014-02-05 23:59:17 +04:00
Aaron O'Mullan
0e256ce80d Remove autocomplete shadow from ambiance theme
This fixes a regression caused by the newly introduced feature allowing
autocomplete theming
2014-02-05 20:26:40 +01:00
Aaron O'Mullan
e76a389e88 Clarify typing condition in live autocomplete 2014-02-05 20:10:20 +01:00
nightwing
99f49fdc49 add smarty mode 2014-02-05 22:06:15 +04:00
nightwing
31e1a2d1f3 improve php variable regexp 2014-02-05 21:24:03 +04:00
nightwing
0eb2b74a66 fix #1795 PHP variables that begin with an underscore are not highlighted 2014-02-04 02:41:21 +04:00
Zef Hemel
2cf93d936e Update autocomplete.js
Unsubscribe blurListener callback instead of onChange listener in auto complete.
2014-02-03 17:19:56 +01:00
Samy Pessé
c36fac3a94 Improve autocomplete results display and filtering
Autocomplete: Display unique results when it's a snippet

Fix autocomplete popup display

Remove listener for afterExec when enableBasicAutocompletion change

Fix autocomplete detach when no results are ready from the first completer

Remove condition from detach
2014-02-03 12:32:14 +01:00
Samy Pessé
09b9348852 Improve autocomplete support for async completers 2014-02-03 12:31:21 +01:00
nightwing
1e46543b05 fix error marker column 2014-02-01 04:18:46 +04:00
nightwing
9cbcfb35d3 use _signal where possible 2014-02-01 04:11:56 +04:00
nightwing
750d38af6f Merge commit 'b54d268a72' 2014-02-01 04:06:57 +04:00
nightwing
b54d268a72 fix typo 2014-02-01 04:06:31 +04:00
Samy Pessé
110eb26f96 Use event afterExec instead of change for live autocomplete 2014-01-31 15:18:45 +01:00
Ruben Daniels
7dc4bddae9 Merge pull request #1793 from ajaxorg/misc
misc bugfix
2014-01-31 03:13:15 -08:00
nightwing
2246da0021 fix infinite loop when using ace with polymer 2014-01-30 22:55:40 +04:00
nightwing
3dc20b0824 update highlighter tests 2014-01-30 22:25:52 +04:00
nightwing
af16d9ca54 fix #1757 Merged undos don't decrement dirtyCounter correctly 2014-01-30 22:01:02 +04:00
nightwing
07ef6a115c fix #1776 c_cpp mode syntax highlighting 2014-01-30 21:49:24 +04:00
nightwing
abb1e4703b add showLineNumbers fixes #1755, #892 2014-01-30 21:44:36 +04:00
nightwing
f6983739e9 fix bug with scrollMargin and maxLines 2014-01-30 21:44:36 +04:00
nightwing
36c6fcc9d4 fix scrolling error widget into view 2014-01-30 21:44:36 +04:00
nightwing
f3af20aa15 fix #1775 Horizontal scrollbar is not resizing when typing 2014-01-30 21:44:17 +04:00
nightwing
eafe6a7997 fix gutter is too short when hor scrollbar is visible 2014-01-30 21:43:53 +04:00
nightwing
048d9589c7 remove slow cursor[style*] css rule 2014-01-30 21:24:04 +04:00
nightwing
5e2c5f4e0a fix two way mapping of keys 2014-01-30 21:24:04 +04:00
nightwing
21bd4a15fa fix diagonal resizing 2014-01-30 21:24:04 +04:00
nightwing
4ed6afc829 convert autoScrollEditorIntoView into preoper option 2014-01-30 21:24:04 +04:00
nightwing
cd12b25ea6 cleanup 2014-01-30 21:23:48 +04:00
nightwing
9253fffb9f allow modifying pasted text from paste event 2014-01-30 20:54:41 +04:00
nightwing
54ad13847a fix ejs highlighting 2014-01-30 20:51:30 +04:00
nightwing
7a92c174eb fix findall 2014-01-30 20:50:56 +04:00
nightwing
0c03302a6d allow textinput to work with hosts not supporting textcomposition 2014-01-30 20:50:37 +04:00
nightwing
75e41746e6 alllow functions as argument to addKeyboardHandler 2014-01-30 20:49:38 +04:00
nightwing
baa0c28e69 remove color from ace_editor class 2014-01-30 20:48:37 +04:00
nightwing
ca41480c72 add scrollIntoView to all commands 2014-01-30 20:46:47 +04:00
Harutyun Amirjanyan
625173182d Merge pull request #1791 from willnorris/license
update license of more files from RStudio to BSD
2014-01-29 11:04:55 -08:00
Will Norris
b4418d2ffd update license of more files from RStudio to BSD
It appears these were simply missed in the original license change
(ajaxorg/ace#1622).  Discussion on that pull request confirms that these
should have been included.
2014-01-29 10:54:16 -08:00
Patrick Nevels
5223d19e3f added license to files 2014-01-28 21:45:28 -06:00
Patrick Nevels
7d3fdc00b0 replaced tokenizer with highlightrules 2014-01-28 21:27:26 -06:00
Harutyun Amirjanyan
00b3beae30 Merge pull request #1780 from Cirru/master
Add Cirru highlighting
2014-01-28 11:22:05 -08:00
Samy Pessé
df99195544 Set default theme for autocomplete popup 2014-01-28 15:49:53 +01:00
Samy Pessé
f9fcf49c66 Apply editor theme to autocomplete popup 2014-01-28 15:47:12 +01:00
Aaron O'Mullan
98dc63cce4 Close auto magic complete when prefix is empty
While removing text
2014-01-28 11:37:43 +01:00
jiyinyiyong
ee5ac2a0f2 add license block 2014-01-28 10:14:02 +08:00
Aaron O'Mullan
c4012ebd46 Don't autoInsert with auto magic completer
This caused completions to be inserted without ever being shown, if
they were the only completion for the prefix entered.
2014-01-28 02:14:23 +01:00
Aaron O'Mullan
af1aab40f5 Enable auto magic complete only when typing
We only want to auto magically complete when the user is typing text,
not when text is pasted or being removed.
2014-01-28 01:43:12 +01:00
Aaron O'Mullan
afd9c99da2 Don't attach/detach autocomplete on change if already attached/detached 2014-01-28 01:24:08 +01:00
Aaron O'Mullan
07c99e0541 Fix: skip auto magic completion when pasting
This can some times cause confusing behavior.

A paste is any text insertion of more than one character at a time …
2014-01-28 00:52:55 +01:00
Abram Adams
33cf210180 Fixed regex to match beginning of tag name 2014-01-27 10:21:45 -08:00
nightwing
af09dc7f05 Merge remote-tracking branch 'remotes/origin/master' 2014-01-27 21:40:01 +04:00
nightwing
a206535596 cleanup user list 2014-01-27 21:38:54 +04:00
nightwing
300dc660e9 fix merge conflict 2014-01-27 21:22:49 +04:00
Aaron O'Mullan
2bf673c41d Add auto magic complete (complete while typing) 2014-01-27 18:21:42 +01:00
nightwing
f2da76daaf Merge remote-tracking branch 'remotes/pull/1758' 2014-01-27 21:15:16 +04:00
Harutyun Amirjanyan
58caaad6a5 Merge pull request #1784 from rgallion/Fix_Issue_1783
Fixes #1783
2014-01-26 10:48:21 -08:00
Roger Gallion
e751389d38 Fixes #1783 2014-01-26 09:01:30 -06:00
Patrick Nevels
68f46ff7ef add tags to the demo 2014-01-25 20:06:40 -06:00
Patrick Nevels
d44c8080bf make demo more expressive 2014-01-25 20:03:49 -06:00
Patrick Nevels
2428de10ed add Gherkin highlighting 2014-01-25 19:32:40 -06:00
Patrick Nevels
c5f58503fe added Gherkin highlighting support 2014-01-25 19:19:57 -06:00
DanyaPostfactum
3d71b01022 Add worker to the html mode
This adds syntax checking (not validating). Based on HTML5 @aredridel parser
2014-01-26 02:40:26 +10:00
Abram Adams
142fc79c97 Fixed token name and added to self-closing tags list 2014-01-23 09:43:39 -08:00
jiyinyiyong
cd506ca7ad add Cirru syntax highlighting 2014-01-23 16:40:38 +08:00
Abram Adams
73fb35e63c Added cfml behaviour with smart auto closing tags
This adds the behaviours for ColdFusion Markup Language (CFML) back in
with the addition of exceptions for auto-closing tags.
2014-01-22 15:38:52 -08:00
Harutyun Amirjanyan
811d63039d Merge pull request #1778 from rmsmith/master
Add missing `$id` to those Modes that are missing it.
2014-01-22 13:57:07 -08:00
rmsmith
6e1aefff56 Add missing $id to those Modes that are missing it.
I've found that the set of modes in this PR did not set their `$id`.
The side-effect of that is that when one of these modes is the current
mode of an EditSession, and one calls `session.getOption('mode')` the
returned value was incorrect.  It goes up the prototype chain so you'd
get something like 'ace/mode/text' or 'ace/mode/html' in most cases.

This fixes that so that if, for example, the mode is set to
'ace/mode/django', the value returned by the option will be
'ace/mode/django'
2014-01-21 09:41:15 +02:00
Harutyun Amirjanyan
5abba7d32c Merge pull request #1772 from hartman/lua_self
Lua uses self, not this
2014-01-17 10:43:27 -08:00
Harutyun Amirjanyan
dc95d03bd6 Merge pull request #1738 from danyaPostfactum/refactor/datauri
Optimize css images (reduce filesize)
2014-01-17 10:37:33 -08:00
Derk-Jan Hartman
93c14b1b31 Update testcase for lua self 2014-01-17 11:56:15 +01:00
Derk-Jan Hartman
ab1b62fbb7 Lua uses self, not this
There is no 'this' in lua. There is however 'self' a predefined parameter when using colon syntax for calling a function.

http://www.lua.org/pil/16.html
2014-01-17 11:16:50 +01:00
nightwing
ff88d5aa8d Merge pull request #1761 from hartman:cors_worker
Use shim blob with importScripts to use CORS for Worker
2014-01-16 20:36:56 +04:00
nightwing
9e71e4a003 cleanup 2014-01-16 19:35:48 +04:00
nightwing
c8fca3053c Merge remote-tracking branch 'remotes/origin/master'
Conflicts:
	lib/ace/line_widgets.js
2014-01-16 00:14:34 +04:00
nightwing
8d57d8765f Merge pull request #1745 aldendaniels:master into v-1.2
Refactor document delta handling
2014-01-16 00:11:00 +04:00
DanyaPostfactum
90f3f32fb1 Optimize css images (reduce filesize) 2014-01-16 00:29:51 +10:00
Eric Arnold
66f615ba94 Merge branch 'master' of https://github.com/ajaxorg/ace into stationary_tooltip_option 2014-01-14 17:11:27 -08:00
Eric Arnold
be0d187a60 Review changes 2014-01-14 17:10:44 -08:00
Harutyun Amirjanyan
ac99690429 Merge pull request #1760 from adamjimenez/patch-21
shift+mousewheel to horiz scroll
2014-01-14 07:26:00 -08:00
Harutyun Amirjanyan
00f044d0cf Merge pull request #1764 from rgallion/Issue_1762_Add_Vim_unit_tests
Add Vim keybinding unit test [Issue 1762]
2014-01-14 06:45:20 -08:00
Harutyun Amirjanyan
177e0af9eb Merge pull request #1707 from danyaPostfactum/refactor/tooltip
Refactor tooltip to separate class.
2014-01-14 06:38:28 -08:00
Roger Gallion
0ab6574521 Add Vim keybinding unit test [Issue 1762] 2014-01-13 08:27:14 -06:00
Derk-Jan Hartman
f779c2e8c5 Use shim blob with importScripts to use CORS for Worker 2014-01-13 11:09:26 +01:00
Adam Jimenez
fb233da532 shift+mousewheel to horiz scroll
Converts shift+mousewheel to horizontal scroll.
This is in accordance with Chrome which supports this shortcut on webpages and textareas.
2014-01-13 09:46:53 +00:00
aldendaniels
7f1bc7af2f Break out Anchor.onChange helper functions
This should be faster since we don't have to re-initialize the helper
functions each time Anchor.onChange is fired.
2014-01-11 15:48:38 -06:00
aldendaniels
6b280bf6bb Code review fixes (mostly formatting)
- Fix unconventional '{' formatting
- Reformat `UndoManager` changes
- Revert change from `insertInLine` to `insert` in text.js
2014-01-11 15:23:20 -06:00
aldendaniels
35a27fd1ba Treat deltas with empty ranges as NOOPs 2014-01-11 14:45:08 -06:00
aldendaniels
ddd695ee3f Store single-line deltas as .text instead of .lines in undo history
Stores single-line delta content as .text instead of .lines in undo
history. This is done without modifying the original delta object in
case the caller still retains a handle to the original.
2014-01-11 14:43:47 -06:00
aldendaniels
f59708a5ba Add a doNotValidate param to applyDelta
Set it to true in insertInLine/removeInLine.

Also sped up indent/dedent by using insertInLine and removeInLine.
2014-01-11 12:00:10 -06:00
aldendaniels
ef0e8da522 Fix / complete validateDelta
This uncovered the fact that until now delta.range had not always been a
Range object. This inconsistency has been resolved by my changes in
mirror.js.
2014-01-11 11:20:34 -06:00
aldendaniels
08edcdfc98 Stop doing a line-by-line splicing in applyDelta
Also brings back the functionality where large deltas are split into
smaller deltas so that .splice.apply() calls will work.
2014-01-10 22:49:17 -06:00
Eric Arnold
e9434fc1df Added option for annotation tooltip to be floating (follows mouse, current functionality) or fixed (stationary per annotation). 2014-01-09 13:29:51 -08:00
nightwing
d226ea067b update site 2014-01-10 00:11:00 +04:00
aldendaniels
3a048cdf61 Bring back insertInLine
Avoids an extra $split call.
2014-01-08 22:51:39 -06:00
aldendaniels
f2a2e4e1a8 Rename the 'delete' delta action to 'remove'
Matches previous naming convention.
2014-01-08 22:18:05 -06:00
aldendaniels
6fe381f633 Rename insertText back to insert 2014-01-08 22:00:11 -06:00
aldendaniels
91df7cd663 Revert "Stop using splice.appy() in ace"
This reverts commit 8624ab8dcb.
2014-01-08 21:39:30 -06:00
nightwing
ce329df39b update the site 2014-01-08 03:14:35 +04:00
nightwing
142761d86f fix regression in { pairing 2014-01-07 23:03:32 +04:00
nightwing
30a4d12eb7 fix ascii filter in builder 2014-01-07 23:01:10 +04:00
Zef Hemel
b79cb61861 Update LogiQL highlighting: add alias_all storage type 2014-01-07 17:54:33 +01:00
Harutyun Amirjanyan
5b3e1ca29d Merge pull request #1750 from rmsmith/master
dart_highlight_rules : add 'with' to `keywordDeclaration`
2014-01-04 05:50:00 -08:00
aldendaniels
8624ab8dcb Stop using splice.appy() in ace
Since .apply() can't handle more than 65535 parameters, splice.apply()
is brittle. It's also hard to read. This replaces splice.apply() calls
throughout ace code with lang.spliceIntoArray().
2014-01-04 01:59:30 -06:00
aldendaniels
b503e65e03 Break on applyDelta into its own module
This makes it possible to break out helper functions without exposing
them to the rest of the document class. Also, long term, we may want to
have a stand-alone test suite for applyDelta, so it makes sense in its
own file.

All other changes involve syntax corrections (some syntax issues were
mine, others pre-existed) to make the documentation compilation work.
2014-01-03 14:59:22 -06:00
rmsmith
c40bf3b172 dart_highlight_rules : add 'with' to keywordDeclaration
'with' clauses are used for mixin application in Dart, e.g:

`class ToggleButton extends Button with Toggleable { ... }`
2014-01-03 21:04:23 +02:00
Ruben Daniels
5733f006a8 Merge pull request #1740 from ajaxorg/c9
sync with cloud9
2014-01-02 11:01:42 -08:00
Harutyun Amirjanyan
7bcf64401f Merge pull request #1747 from hartman/themelistfix
Repair label of themes in themelist.
2014-01-02 04:23:39 -08:00
Derk-Jan Hartman
8f109ea371 Repair label of themes in themelist.
This was broken after c563f15e93
2014-01-02 13:04:24 +01:00
aldendaniels
612478e39f Speed up single-line deltas
2e6f12725b slowed down the application of
deltas that only affect a single line. The slow-down, though trivial for
a single line, is significant for operations than separately modify
thousands of rows (such as indenting a large document).

This commit speeds up single-line deltas by avoiding unnecessary calls
to splitLine() and joinLineWithNext().
2014-01-01 14:45:54 -06:00
aldendaniels
810e196cc6 Use console.warn for deprecated methods
console.warn makes better sense than console.log and matches similar
warnings in ace (see gutter.js for example).
2014-01-01 12:06:19 -06:00
aldendaniels
026af74016 Fix render bugs
Both were introduced in 2e6f12725b.
2014-01-01 12:04:12 -06:00
aldendaniels
27768230c8 Maintain public API and update coding convention
This seeks to keep the public API in-tact while improving method names
within ace by keeping the old methods as wrappers around the new
better-named methods.

For example, document.insert() now simply calls document.insertText()
and warns the caller via a console.log() that they are using a
deprecated method.

I've also updated the coding style of my changes (where I noticed
discrepancies) to match the rest of Ace.
2014-01-01 11:05:27 -06:00
aldendaniels
2e6f12725b #1744: Refactor document delta handling
Refactor delta handling code to:

- Combine the "insertText" and "insertLines" delta types into a single
"insert" delta type

- Combine the "removeText" and "removeLines" delta types into a single
"remove" delta type

- Make all document mutations in a single applyDelta function.

- Add basic delta validation (more needed . . . see TODOs)

- Rework anchor logic to handle new delta types (also simplified)

- Rename "insert()" to "insertText()" and "remove()" to "removeText()"

- Rename "insertLines()" to "insertFullLines()" and "removeLines()" to
"removeFullLines()"

See related issue for more information. All tests are passing and the
changes appear functional under preliminary testing, but careful review
and testing will be necessary.
2014-01-01 00:41:45 -06:00
nightwing
ccc7d6dda8 add more sites 2013-12-31 16:17:01 +04:00
Harutyun Amirjanyan
a9d194894e Merge pull request #1742 from hartman/commas
Remove trailing comma's, which break scripts in IE7
2013-12-31 04:16:32 -08:00
Derk-Jan Hartman
1240a04fff Remove trailing comma's, which break scripts in IE7 2013-12-31 10:12:34 +01:00
DanyaPostfactum
0b1630d6fa Refactor tooltip to separate class. 2013-12-30 20:13:00 +10:00
nightwing
425404ff29 fix #1737 reset padding only if previous theme had custom padding 2013-12-30 02:05:57 +04:00
nightwing
3cc3043951 update js highlighter test 2013-12-30 01:56:58 +04:00
nightwing
9a5bd3cd65 include error_marker addon in the build 2013-12-30 01:42:12 +04:00
Harutyun Amirjanyan
6e46195102 Merge pull request #1728 from desoi/master
Updated keywords and functions for PostgreSQL 9.3. Added sub-mode support for JavaScript and Json.
2013-12-29 13:37:10 -08:00
John DeSoi
48cd7f55dc Updated keywords and functions for PostgreSQL 9.3. Added sub-mode support for JavaScript and Json. 2013-12-29 14:16:38 -06:00
nightwing
edee507fd9 update site 2013-12-29 21:13:44 +04:00
nightwing
714e1a592c fix resize issues 2013-12-29 20:07:08 +04:00
nightwing
90b2a6cd77 fix multiselect mouse interaction issues 2013-12-29 20:05:23 +04:00
nightwing
37b3dc1efd tweak modes 2013-12-29 20:03:08 +04:00
nightwing
b6a4a34fd2 togglecomment should not scroll if part of the selection is visible 2013-12-29 20:02:14 +04:00
nightwing
5b151a3db4 fix scrolling speed on firefox ux 2013-12-29 19:59:16 +04:00
nightwing
3f7f325777 return removed folds from removeFolds 2013-12-29 19:57:49 +04:00
nightwing
6e254f25a1 fix wrap option getter 2013-12-29 19:57:00 +04:00
nightwing
4c4ab09870 add goToNextError command 2013-12-29 19:56:29 +04:00
Lennart Kats
c612dac355 Merge pull request #1723 from ajaxorg/misc
fix several small bugs
2013-12-25 07:11:00 -08:00
Lennart Kats
890fd39c92 Merge pull request #1725 from ajaxorg/double_tap
Double tap regression
2013-12-25 02:09:58 -08:00
Lennart Kats
eda5eaba39 Merge pull request #1715 from ajaxorg/velocity_snippets
Support loading snippets for mixed modes
2013-12-25 02:04:31 -08:00
Lennart Kats
191a79245f Merge pull request #1703 from ajaxorg/highlighting/mixed
Do not loose currentState if tokenizer uses combination of next and push
2013-12-25 02:03:04 -08:00
Harutyun Amirjanyan
92dba7d44c Merge pull request #1730 from danyaPostfactum/autoinsert
Add autoinsert feature to the completer.
2013-12-23 03:27:09 -08:00
DanyaPostfactum
ff42a13c4f Add autoinsert feature to the completer. 2013-12-23 02:52:25 +10:00
nightwing
b6a3a15232 add a test 2013-12-20 18:12:33 +04:00
nightwing
c01725184e remove setTimeout from startSelect
fixes #956: double tap regression
2013-12-20 17:18:34 +04:00
nightwing
15dd2082f6 cleanup 2013-12-20 15:14:35 +04:00
nightwing
3a864c6056 add support for inline mode in php worker 2013-12-17 00:04:21 +04:00
nightwing
10e2c3049c add options for theme and mode 2013-12-15 21:20:11 +04:00
nightwing
6285bf5d5a update cssLint and coffee 2013-12-15 21:18:13 +04:00
nightwing
b7ee15f5d9 fix bug with fixedWidth gutter + firstLineNumber 2013-12-15 02:50:48 +04:00
nightwing
133db3cfe0 fix #1711 Double click on foldWidgets region can paint whole gutter in red. 2013-12-14 23:52:01 +04:00
nightwing
45c4bdcb2e disable invalid class on ampersands
fixes #1655
2013-12-14 19:44:44 +04:00
nightwing
61591eee5d add tests 2013-12-14 19:41:44 +04:00
nightwing
869e1f86aa cleanup d mode 2013-12-14 19:37:24 +04:00
Harutyun Amirjanyan
a6c21c6761 Merge pull request #1694 from robik/d-lang-support
Improved D Language mode
2013-12-14 07:29:25 -08:00
Harutyun Amirjanyan
3b96539874 Merge pull request #1696 from danyaPostfactum/refactor/scrollbar
Refactor ScrollBarV and ScrollBarH classes
2013-12-14 06:25:48 -08:00
DanyaPostfactum
5affb58e40 Add forgotten css overflow:scroll to scrollbars 2013-12-13 16:45:20 +10:00
Harutyun Amirjanyan
710bf4dbe0 Merge pull request #1719 from nbreslow/master
Added support for Autodesk Maya MEL
2013-12-12 14:53:27 -08:00
Nicholas Breslow
cde625fde3 Added c-style behavior and fold mode / updated mode syntax.
As per Harutyun Amirjanyan's request I made the following two changes:
1) Added c-style behavior and fold mode.
2) Updated mode syntax for mel to current one used by Ace.
2013-12-12 16:47:41 -05:00
Nicholas Breslow
56604c1fa5 Updated project. 2013-12-10 14:03:53 -05:00
Nicholas Breslow
a6c6028f7e Changed mel.mel example file. 2013-12-10 14:03:23 -05:00
DanyaPostfactum
8ecc94a181 Rename ScrollBarV -> VScrollBar, ScrollBarH -> HScrollBar 2013-12-10 17:41:02 +10:00
nightwing
00df72ee0d allow inlining multiple text modules 2013-12-09 23:24:43 +04:00
Ryan Griffith
2b10c2071f Check for possible snippet expansion before attempting to proceed to the next tabstop. 2013-12-09 10:04:38 -05:00
Lennart Kats
24c207191c Merge pull request #1702 from ajaxorg/themes
Themes
2013-12-09 04:03:10 -08:00
Lennart Kats
be2b684b6f Merge pull request #1716 from ajaxorg/force_ltr
force editor text to be ltr
2013-12-09 04:00:23 -08:00
nightwing
5f0012f653 force editor text to be ltr
fixes #1429
2013-12-06 23:58:11 +04:00
nightwing
4307aba209 fix #1693 searchbox is broken when creating ace in pre tag 2013-12-06 23:08:51 +04:00
Lennart Kats
f5334ceaa2 Merge pull request #1701 from ajaxorg/static_highlighter
use css counter for line number in static_highlighter
2013-12-06 08:21:59 -08:00
Lennart Kats
91d581b12b Merge pull request #1705 from ajaxorg/autocomplete/hor_scroll
fix #1680 Autocomplete box doesn't work with horizontal scrolling
2013-12-06 07:57:38 -08:00
Lennart Kats
e7f412c992 Merge pull request #1688 from ajaxorg/highlighting/apache_conf
add apache_conf mode
2013-12-06 07:55:39 -08:00
Lennart Kats
40ea516801 Merge pull request #1700 from ajaxorg/newclient
sync with cloud9
2013-12-06 06:44:32 -08:00
nightwing
c2b097b825 add includeScopes for velocity mode 2013-12-05 23:57:18 +04:00
nightwing
a0ab8baa56 add id to all modes 2013-12-05 23:46:16 +04:00
Harutyun Amirjanyan
84bc9b25de Merge pull request #1712 from hannonhill/velocity-snippets
Add snippets for common Velocity directives
2013-12-05 08:19:04 -08:00
nightwing
6b1215bca8 move user-select:none to scroller fixes #1675 on linux 2013-12-05 20:13:37 +04:00
Ryan Griffith
69b144686a Added snippets for common Velocity directives. 2013-12-04 15:52:40 -05:00
nightwing
5ed4e3eded reset scroll position 2013-12-03 23:11:54 +04:00
nightwing
af7c370318 fix #1680 Autocomplete box doesn't work with horizontal scrolling 2013-12-02 23:36:27 +04:00
DanyaPostfactum
b58b38d74a Move setVisible() method to ScrollBar class 2013-12-02 21:09:14 +10:00
nightwing
6461d62f90 fix prolog mode and update tests 2013-11-30 18:44:55 +04:00
nightwing
d87ba89c49 do not loose currentState if tokenizer uses combination of next and push 2013-11-30 18:40:02 +04:00
nightwing
93d2b75b4f add demo for ejs 2013-11-30 00:57:56 +04:00
nightwing
c563f15e93 use ext/themelist.js in kitchen-sink demo 2013-11-29 23:53:28 +04:00
nightwing
4d88770435 fix bug in converter and add two new themes 2013-11-29 23:53:27 +04:00
nightwing
29e1838394 update build submodule 2013-11-28 01:10:23 +04:00
Harutyun Amirjanyan
8cfd45feab Merge pull request #1698 from LivelyKernel/ace-ajax-master
cstyle behaviour fix for entering braces
2013-11-27 12:43:35 -08:00
Robert Krahn
69b40db4f2 fix cstyle behaviour when inserting braces and doing a newline. Previous behaviour would not add a closing brace when no other opening brace was present 2013-11-25 18:11:15 -08:00
DanyaPostfactum
03edee8c30 Refactor ScrollBarV and ScrollBarH classes 2013-11-24 23:00:06 +10:00
nightwing
70bc7d7dc0 update tests 2013-11-24 16:47:32 +04:00
nightwing
e70f0773df Merge pr/1692 into master 2013-11-24 16:34:04 +04:00
nightwing
d870d81ea0 revert change to markup.list 2013-11-24 16:31:07 +04:00
nightwing
9b8e236483 do not modify dom from computeLayerConfig 2013-11-24 16:19:59 +04:00
nightwing
9a2ee70af8 allow starting and cancelling mouse capture from outside 2013-11-24 16:18:13 +04:00
nightwing
4cb1e7b849 misc fixes 2013-11-24 16:16:36 +04:00
nightwing
a910b8ee18 do not freeze browser when calling fold all second time 2013-11-24 16:15:52 +04:00
nightwing
9002950bf7 rename group to aceCommandGroup to not conflict with cloud9 2013-11-24 16:13:36 +04:00
nightwing
b88bf398b5 smoother resizing #1687 2013-11-24 16:11:51 +04:00
nightwing
1704cbdcc2 check for valid start state in tokenizer 2013-11-24 16:10:40 +04:00
nightwing
d03e5d1120 add selectOrFindNext commands and disable sublime ctrl-d like behavior of ctrl-arrow 2013-11-24 16:09:52 +04:00
Robik
76230003b6 Removed unused code; Added missing keywords; Added defaultToken 2013-11-24 11:25:11 +01:00
Benoit Schweblin
78ee0833ba Set defaultToken to markup.list for lists and string.blockquote for blockquotes 2013-11-23 22:53:11 +00:00
nightwing
0e9d413102 cleanup vbscrip mode 2013-11-22 22:03:02 +04:00
Robik
34ceb4e15e Improved D Language mode 2013-11-21 14:18:51 +01:00
nightwing
b42ce65a54 use css counter for static highlight gutter 2013-11-20 20:02:31 +04:00
nightwing
727c94c90a cleanup 2013-11-20 18:33:40 +04:00
Benoit Schweblin
a50c0a27b9 [Markdown highlighting] Fixed list inside blockquotes 2013-11-20 00:15:28 +00:00
Benoit Schweblin
c2fb30b313 [Markdown highlighting] Parse basic rules in blockquotes 2013-11-19 19:48:13 +00:00
Harutyun Amirjanyan
a7798c4497 Merge pull request #1686 from danyaPostfactum/object-create
Use Object.create for inheritance
2013-11-19 00:02:42 -08:00
nightwing
8b4c88d636 add apache_conf mode 2013-11-18 10:45:56 +04:00
DanyaPostfactum
9719c770d3 Use Object.create for inheritance 2013-11-17 17:58:21 +10:00
nightwing
4c3c132f2b add position rounding change missed from 753dbbe 2013-11-15 01:07:47 +04:00
Lennart Kats
f8e96328e4 Merge pull request #1683 from ajaxorg/static_highlight
fix static highlight bugs
2013-11-14 01:52:07 -08:00
nightwing
9e5dda2334 fix static highlight bugs
#1681 #1682
2013-11-13 22:35:29 +04:00
Lennart Kats
ed87f5326f Merge pull request #1678 from ajaxorg/line_widgets_pt1
Add support for line widgets
2013-11-13 10:10:24 -08:00
nightwing
fada97f807 semicolonify demo files; 2013-11-13 21:10:36 +04:00
nightwing
90e7cdd7f1 Merge branch 'markdown_tweaks' 2013-11-13 03:36:43 +04:00
nightwing
60cfe6f161 update wrapData when wrapMethod changes 2013-11-13 03:34:52 +04:00
nightwing
188252891a update test 2013-11-13 03:22:32 +04:00
nightwing
753dbbece5 do not round mouse position since lines can have fractional screen coordinates now 2013-11-13 03:04:56 +04:00
Sawyer Hollenshead
f18a57126d Specify type of string (strong, emphasis, blockquote) 2013-11-11 17:09:52 -05:00
Lennart Kats
07d82837b4 Merge pull request #1677 from ajaxorg/old_ff_copy
add user select:text to ace_text-input
2013-11-10 15:47:30 -08:00
Lennart Kats
1ab54b0b8f Merge pull request #1673 from ajaxorg/cloud9_update
Cloud9 update
2013-11-10 15:47:01 -08:00
nightwing
48a44aab5a cleanup kitchen-sink demo 2013-11-11 03:29:22 +04:00
nightwing
00fcd37829 allow widgets to have any height 2013-11-11 02:41:35 +04:00
nightwing
71ceca4601 fix cursor movement 2013-11-08 00:58:42 +04:00
nightwing
b17f8d533a fix typo 2013-11-08 00:58:42 +04:00
nightwing
31191072f3 add first version of line_widgets 2013-11-08 00:58:42 +04:00
nightwing
1ac4ea51e2 hack edit session 2013-11-08 00:56:04 +04:00
nightwing
a56c3b44b5 always add height to line wrapper nodes
(needed for line widgets)
2013-11-08 00:56:04 +04:00
nightwing
fab88c496c fix regression with cmd-up 2013-11-07 11:29:27 +04:00
nightwing
dfa2eaf5ac do not include empty lines in section fold 2013-11-06 11:49:39 +04:00
nightwing
07809b1fb9 add user select text to ace_text-input 2013-11-06 11:16:23 +04:00
nightwing
ea430330ba fix folding test 2013-11-06 11:05:32 +04:00
nightwing
00ebb80f87 c9search mode is weird :( 2013-11-06 00:31:40 +04:00
Lennart Kats
2476f43aa8 Merge pull request #1674 from ajaxorg/misc
fix two small bugs
2013-11-05 09:24:15 -08:00
nightwing
68c6c4e86c fix typo 2013-11-05 21:23:25 +04:00
nightwing
0fe340b3fb update c9searchresults test 2013-11-05 21:21:51 +04:00
nightwing
bfdd7239d1 fix #1671 Cannot use backspace in Android Chrome 2013-11-05 21:07:29 +04:00
nightwing
3ab631640b fix #1669 Everything until cursor position is selected in IE8 2013-11-05 21:01:01 +04:00
nightwing
8443991f13 miscelaneous fixes from c9 2013-11-05 20:54:38 +04:00
nightwing
f1973e4233 add virtualRenderer.$updateSizeAsync 2013-11-05 20:51:56 +04:00
nightwing
5607fc9de2 automatically pick range for align command 2013-11-05 20:47:30 +04:00
nightwing
5a26604657 add command.scrollIntoView 2013-11-05 20:44:27 +04:00
nightwing
d689636771 better folding commands 2013-11-05 20:43:30 +04:00
nightwing
150f0360d4 fix #1624 Rules added with embedRules can only use stringed regexes 2013-11-05 20:37:48 +04:00
Harutyun Amirjanyan
93a88fcb5e Merge pull request #1663 from saatchiCEO/patch-1
Fixed typo `forown`
2013-10-28 22:24:56 -07:00
saatchiCEO
4a0fc33c65 Fixed typo forown
for|forown -> for|own
2013-10-29 00:22:58 +03:00
Zef Hemel
e8bb1e38e7 Added callback to static highlighter 2013-10-28 11:33:51 +01:00
nightwing
0bebd94926 perge pull #1662 2013-10-27 14:43:49 +04:00
nightwing
07e4eb0a3a use scroller instead of content
because other widgets inheriting from ace do not have renderer.content
2013-10-27 14:33:55 +04:00
DanyaPostfactum
ad2d31eef4 Fix Webkit context menu on second click 2013-10-27 20:51:15 +11:00
Harutyun Amirjanyan
5120528cf1 Merge pull request #1660 from adamjimenez/patch-21
multiline strings throw out error line numbers
2013-10-27 00:44:01 -07:00
Harutyun Amirjanyan
7d8cd7f657 Merge pull request #1661 from danyaPostfactum/dnd-fixes
Some drag'n'drop fixes
2013-10-27 00:43:13 -07:00
DanyaPostfactum
12a2464756 Change mouse capture target container -> content
To prevent hover activity of scrollbars in Firefox
2013-10-26 15:13:15 +11:00
Adam Jimenez
4d0fa2412a remove unnecessary new line repace 2013-10-22 23:37:24 +01:00
Adam Jimenez
053b780478 multiline strings throw out error line numbers
e.g:

```
<?php
$foo = "test
multiline

string"
a
?>
```
shows  error on line 3 instead of 6.
2013-10-22 18:51:48 +01:00
Lennart Kats
4bbe5346f2 Merge pull request #1658 from ajaxorg/bugfix/textinput
Bugfix/textinput
2013-10-21 01:33:15 -07:00
nightwing
6677b22fd4 fix #1650 Editor looses focus on scrollbar click in the Google Chrome 2013-10-20 21:03:17 +04:00
nightwing
5bead368ea fix spellcheck extension on chrome 2013-10-20 20:57:58 +04:00
nightwing
ca47093bc8 restore textInput.setReadOnly call
needed for disabling contextmenu items
2013-10-20 19:01:07 +04:00
nightwing
1d4d76b1ea use text-indent: -1em; to hide cursor on ie
as suggested in https://github.com/ajaxorg/ace/issues/1640
2013-10-20 19:01:07 +04:00
nightwing
b52a989bf8 [IME] pressing enter on ie reverts last input 2013-10-20 19:01:07 +04:00
Harutyun Amirjanyan
b0e40929b6 Merge pull request #1654 from asm2750/add-vhdl-syntax
Add vhdl syntax
2013-10-19 11:37:44 -07:00
Harutyun Amirjanyan
c60e95b5e6 Merge pull request #1653 from adamjimenez/patch-19
highlight option tags as form elements
2013-10-18 10:40:16 -07:00
asm2750
2ff1e1db6b Update vhdl_highlight_rules.js
Added license block
2013-10-17 10:19:34 -07:00
asm2750
e2441734ca Update vhdl.js
Added license block
2013-10-17 10:19:02 -07:00
OpenShift guest
d9fe4880dc Added VHDL syntax highlighting, and example code. issue #1642 2013-10-17 00:47:19 -04:00
OpenShift guest
9fd726a81c Revert "Added VHDL syntax highlighting, and example code. issue #1642"
This reverts commit 56a37a4053.
2013-10-17 00:37:16 -04:00
OpenShift guest
56a37a4053 Added VHDL syntax highlighting, and example code. issue #1642 2013-10-17 00:35:27 -04:00
Adam Jimenez
ea019da404 highlight option tags as form elements 2013-10-15 18:23:24 +01:00
Lennart Kats
7625c67ac9 Merge pull request #1648 from ajaxorg/highlighter
Improve static highlighter
2013-10-11 07:35:24 -07:00
nightwing
bb0298783c add "highlighter" build target 2013-10-11 16:14:17 +04:00
nightwing
51dc39bb95 add static highlighter highlight method 2013-10-11 16:06:24 +04:00
Harutyun Amirjanyan
a2244c6d01 Merge pull request #1645 from creationix/master
Add comment support for Jack mode
2013-10-07 15:37:52 -07:00
Tim Caswell
c6e125a816 Add comment support for Jack mode 2013-10-07 12:04:27 -05:00
Harutyun Amirjanyan
907a765546 Merge pull request #1616 from fangel/patch-1
The require() and define() methods for workers does not conform to the AMDJS spec
2013-10-07 07:54:38 -07:00
Morten Fangel
afcc9afecf Improved the WebWorker RequireJS shim, so it's closer to the AMDJS spec
Improvements:

 - It's now possible to list dependencies that gets loaded before calling the factory-function
 - Relative paths without folders (./foo) now works properly
 - The define()-behaviour is now tested by four unit-tests
2013-10-07 15:55:41 +02:00
Harutyun Amirjanyan
c830baa212 Merge pull request #1644 from plancien/master
replaced simple string errors with full Errors
2013-10-06 10:51:23 -07:00
Pierre Lancien
4d62c0810b replaced simple string errors with full Errors, in order to make debugging easier. 2013-10-06 19:46:32 +02:00
Lennart Kats
e316578832 Merge pull request #1641 from ajaxorg/newclient
sync with newclient
2013-10-06 03:51:34 -07:00
nightwing
5927184195 add ace_ prefix to selected row classname 2013-10-06 14:26:16 +04:00
nightwing
eb2cfdfdfd fix #1629 Not able to scroll smoothly with a Mac trackpad, when the pointer is inside the editor. 2013-10-06 14:05:35 +04:00
nightwing
bfd68fb1cf fix #1637 typo in vbscript mode 2013-10-05 16:45:58 +04:00
nightwing
aa76fffaf2 fix __defineGetter__ errors on ie 2013-10-05 14:00:15 +04:00
nightwing
0002bf4e4c tweak logo 2013-10-05 13:50:53 +04:00
Nicholas Breslow
55a947ec68 Fixed MEL Syntax Highlighter
Fixed grouping errors. Added mel.mel file to test.
2013-10-02 14:17:35 -04:00
Harutyun Amirjanyan
93673bbe8b Merge pull request #1635 from devoncarew/master
update Dart syntax highlighting
2013-10-02 11:07:00 -07:00
Harutyun Amirjanyan
f99d36b4b2 Merge pull request #1636 from creationix/master
Add Jack mode
2013-10-02 11:04:32 -07:00
DanyaPostfactum
9eef8dfb9e Fix issue with blinking cursor on drag over
This happens when dragging from another app. Editor can get focused on app icon hovering (on a Windows taskbar).
2013-10-02 02:52:49 +10:00
DanyaPostfactum
617d43bb13 Impove opera blank drag image workaround (stolen from codemirror) 2013-10-02 02:47:31 +10:00
Tim Caswell
3dd62918c5 Add Jack mode 2013-10-01 11:20:26 -05:00
devoncarew@gmail.com
5746c2001c update Dart syntax highlighting 2013-09-30 20:58:12 -07:00
Nicholas Breslow
c2f1838dca Added Autodesk Maya MEL 2013-09-30 16:43:05 -04:00
Harutyun Amirjanyan
87c14b6aa7 Merge pull request #1627 from gfxmonk/sjs
SJS (StratifedJS) support, inheriting from JS
2013-09-28 22:48:18 -07:00
nightwing
4e97b47838 update logo 2013-09-28 23:54:40 +04:00
nightwing
cc5ed60464 update to version from newclient 2013-09-28 23:44:43 +04:00
Tim Cuthbertson
55c3623877 SJS (StratifedJS) support, inheriting from JS 2013-09-26 15:55:29 +10:00
nightwing
c9077acbd5 add back commands.byName 2013-09-25 23:53:17 +04:00
nightwing
04cc031da6 add deprecation message for commmandKeyBinding 2013-09-25 23:26:18 +04:00
Harutyun Amirjanyan
cc2f80f8c1 Merge pull request #1626 from thomaswilburn/master
Rename "commmandKeyBinding" to have 33% less "m"
2013-09-25 12:09:57 -07:00
Thomas Wilburn
5023410c42 Typo of "commmand" is driving me nuts. 2013-09-25 10:36:54 -07:00
Ruben Daniels
f6bcd82c36 Merge pull request #1622 from ajaxorg/change-to-bsd
Change RStudio contributions to BSD
2013-09-25 06:35:32 -07:00
Lennart Kats
5f3ba2cfe2 Merge pull request #1595 from ajaxorg/highlighting/mixed
Improvements for highlighting mixed languages
2013-09-24 02:56:08 -07:00
Lennart Kats
373f24849b Merge remote-tracking branch 'origin/master' into highlighting/mixed
Conflicts:
	index.html
2013-09-24 11:51:58 +02:00
Lennart Kats
49f0f2dfbc Merge pull request #1623 from ajaxorg/ctrl-d
ctrl-alt-right shouldn't select second word at once
2013-09-24 02:48:23 -07:00
nightwing
14a4aa2715 set correct direction on first range 2013-09-24 00:21:55 +04:00
nightwing
d0208903de update test 2013-09-24 00:17:40 +04:00
nightwing
c1057e473f ctrl-alt-right shouldn't select second word at once 2013-09-23 23:50:11 +04:00
Garen Torikian
18ae721541 Change RStudio contributions to BSD 2013-09-23 11:48:35 -07:00
Lennart Kats
c3712554ea Merge pull request #1617 from ajaxorg/folding/csharp
Better folding for csharp and ini
2013-09-23 01:40:41 -07:00
nightwing
d22626771b improve csharp folding 2013-09-21 20:44:19 +04:00
nightwing
e47caa459b update site 2013-09-21 17:03:40 +04:00
nightwing
9a70c98fc4 ini fold mode 2013-09-21 15:38:06 +04:00
nightwing
58e1410adf fix #1614 Gutter tooltip not showing inside relative container 2013-09-21 14:55:53 +04:00
nightwing
f1b74a8916 small tweaks for nativednd 2013-09-20 17:15:55 +04:00
Lennart Kats
ee95161972 Merge pull request #1599 from danyaPostfactum/nativednd
Use native HTML5 Drag'n'Drop for text.
2013-09-20 06:11:43 -07:00
Lennart Kats
2ae8a967f4 Merge pull request #1612 from ajaxorg/small_bugs
Small bugs
2013-09-20 05:55:13 -07:00
nightwing
7d2795bc77 update mode.tmpl.js 2013-09-19 11:00:10 +04:00
nightwing
80b8f557f0 update mode docs 2013-09-19 00:24:00 +04:00
nightwing
df4b0c8d4c update site 2013-09-18 18:46:28 +04:00
DanyaPostfactum
8a841df6e2 Capture mouse on quadclick 2013-09-18 17:51:52 +10:00
DanyaPostfactum
8ebf34a385 Add autoscroll delay 2013-09-17 19:07:16 +10:00
DanyaPostfactum
e1ff382041 Fix IE autoscroll drop triggering issue
Add overlay (css ::before generated content) while dragging to prevent IE to trigger `drop` event while autoscrolling
2013-09-17 19:05:35 +10:00
DanyaPostfactum
ad4e57e600 Fix webkit fake mousemove event (breaking dnd) issue 2013-09-17 19:02:29 +10:00
nightwing
2ace399a8a better compositionUpdate on chrome 2013-09-17 11:35:07 +04:00
nightwing
0b4c56c5a7 fix string parsing in php worker 2013-09-17 11:35:07 +04:00
nightwing
eb7ed9862a Merge remote-tracking branch 'remotes/origin/master'
Conflicts:
	index.html
2013-09-16 11:53:05 +04:00
Lennart Kats
650cf8e5af Merge pull request #1607 from ajaxorg/small_bugs
Small bugs
2013-09-16 00:24:28 -07:00
DanyaPostfactum
b1ba675cfd Fix dbl/triple click issues of native dnd 2013-09-15 20:48:33 +10:00
DanyaPostfactum
cb7a0d5d47 Improve native selection prevention on dnd 2013-09-15 20:41:22 +10:00
DanyaPostfactum
165cec553a Add onMouseDrag method to the DragdropHandler 2013-09-15 01:25:40 +10:00
DanyaPostfactum
624eb7c117 Make editor container to be drop zone 2013-09-15 01:13:52 +10:00
nightwing
51b7cb67a6 update site and submodules 2013-09-14 18:47:34 +04:00
nightwing
414667916e always call setMode callback after the event 2013-09-14 14:55:41 +04:00
nightwing
4d8a31fd54 fix popup position flipping 2013-09-14 14:53:51 +04:00
nightwing
eecbe48695 replace ace global with getter in the demo
see 060e86d6
2013-09-14 00:52:09 +04:00
nightwing
3c6cd4d16f fix #1606 broken markdown snippets 2013-09-13 23:46:03 +04:00
nightwing
fbdcbd00a1 always call callback from setMode 2013-09-13 21:20:06 +04:00
nightwing
2c9dbced9b allow setting MaxTokenCount in tokenizer 2013-09-13 20:40:34 +04:00
nightwing
214c3a9b5d workaround for broken Object.create(null) on old opera
fixes https://github.com/ajaxorg/ace-builds/issues/13
2013-09-13 20:40:34 +04:00
Zef Hemel
4e748341fc [Golang] Forgot | 2013-09-13 16:14:44 +02:00
Zef Hemel
2a016e3890 Added another few missing builtin types and functions to the Go language. 2013-09-13 16:14:05 +02:00
DanyaPostfactum
b6dab9eb45 Fix Opera drag image issue. 2013-09-12 23:44:00 +10:00
Harutyun Amirjanyan
5806661f47 Merge pull request #1602 from matthewkastor/patch-1
fix broken demo.
2013-09-12 00:58:54 -07:00
Matthew Kastor
8a08d3fc0a fix broken demo. 2013-09-12 01:44:25 -04:00
nightwing
2efe7f203e fix #1598 Pipe '|' symbol breaks YAML Syntax highlighting 2013-09-11 23:36:29 +04:00
nightwing
e52a4250fe fix html demo 2013-09-11 23:36:29 +04:00
nightwing
b4628d450f use lazy getTokenizer in getNextLineIndent 2013-09-11 23:36:29 +04:00
nightwing
811d190c95 create tokenizer only when needed 2013-09-11 23:36:29 +04:00
nightwing
bc4b1324b7 commandline in demo remains hidden sometimes 2013-09-11 23:36:28 +04:00
nightwing
b4f8e47fe3 fix slim cursor setting 2013-09-11 23:36:28 +04:00
nightwing
4670e2201d fix running Makefile.dryice.js from another directory 2013-09-11 23:36:28 +04:00
nightwing
5ba0212ca2 simple soytemplate highlighter 2013-09-11 23:36:28 +04:00
nightwing
3be21b77e5 simple handlebars mode 2013-09-11 23:36:28 +04:00
nightwing
7b80bb793e cleanup 2013-09-11 23:36:28 +04:00
nightwing
37fc612756 generate doclist automatically based on modelist 2013-09-11 23:36:28 +04:00
Harutyun Amirjanyan
4c1497fc29 Merge pull request #1596 from breck7/master
Rebased on latest Ace. Added Coffee Fold Mode
2013-09-11 12:17:28 -07:00
DanyaPostfactum
ddf5d1ab45 Improve autoscroll behavior for text dragging 2013-09-12 02:48:46 +10:00
DanyaPostfactum
b7daccf9a9 Fix IE native drag'n'drop issues 2013-09-12 01:44:55 +10:00
Lennart Kats
4d18ae10b2 Merge pull request #1600 from ajaxorg/protobuf
Added a Google Protobuf mode
2013-09-11 05:59:22 -07:00
Zef Hemel
7c8d81333f Added a Google Protobuf mode 2013-09-11 14:37:50 +02:00
DanyaPostfactum
2993ae831f Set this context of event handlers for old IE. 2013-09-11 21:52:30 +10:00
Zef Hemel
3cd5ea654e Added inherit keyword to Nix mode 2013-09-10 14:13:21 +02:00
Lennart Kats
98d149f0b8 Merge pull request #1597 from ajaxorg/golang-bool
Golang: Added 'bool' type and 'select' keyword
2013-09-10 04:58:40 -07:00
DanyaPostfactum
8936861338 Use native HTML5 Drag'n'Drop for text. 2013-09-10 21:41:20 +10:00
Zef Hemel
347be370fe and select keyword 2013-09-10 10:55:14 +02:00
Zef Hemel
ff93d54adc Added 'bool' type. 2013-09-10 10:44:44 +02:00
Breck
b297a1ae02 Removed comment 2013-09-09 12:31:02 -07:00
Breck
0b5d78736f Rebased on latest Ace. Added Coffee Fold Mode 2013-09-09 11:46:03 -07:00
Mostafa Eweda
0f83322450 Merge pull request #1592 from ajaxorg/anchor_align_left
Add insert right mode for anchors and range_lists
2013-09-06 10:52:27 -07:00
nightwing
06d61cf239 add insert right mode for anchors and range_lists 2013-09-06 21:47:39 +04:00
Harutyun Amirjanyan
1728b50198 Merge pull request #1591 from rmsmith/wraplimitrange_bugfix
`EditSession.setWrapLimitRange` should set a new object to `this.$wrapLi...
2013-09-06 06:45:08 -07:00
rmsmith
b3443a0fab EditSession.setWrapLimitRange should set a new object to this.$wrapLimitRange
This fixes a bug where if you have 2 instances of EditSession and you
`setWrapLimitRange` on one of them it would affect the $wrapLimitRange
on all other instances of EditSession.
2013-09-06 16:16:15 +03:00
nightwing
43d2a6607f use same font size for completion popup and editor 2013-09-06 13:43:41 +04:00
Harutyun Amirjanyan
5b6a1df596 Merge pull request #1590 from ajaxorg/go
Improved Go highlighting, added builtin types and functions
2013-09-06 02:14:59 -07:00
Zef Hemel
1b5d023389 Fix test 2013-09-06 11:12:33 +02:00
nightwing
bf1c41808b fix infinite loop when selectOnHover is true 2013-09-06 13:11:31 +04:00
Zef Hemel
0dd731a882 Improved Go highlighting, added builtin types and functions and "range" keyword. 2013-09-06 11:05:01 +02:00
Zef Hemel
f860b88e51 Merge pull request #1583 from ajaxorg/autocomplete
improve autocomplete popup
2013-09-06 02:03:58 -07:00
nightwing
2df136beba use text shadow instead of bold 2013-09-06 12:50:55 +04:00
Zef Hemel
060e86d6ca ace.session does not exist (not in the no-conflict mode exist), so let's use this.editor.session instead. 2013-09-06 10:33:08 +02:00
Lennart Kats
e746383ec0 Merge pull request #1571 from ajaxorg/newclient
sync with newclient
2013-09-06 00:21:34 -07:00
nightwing
1fa691693e fix expansion of snippets with nested tabstops 2013-09-05 18:45:51 +04:00
nightwing
62c514135d fix snippet file parsing 2013-09-05 00:28:42 +04:00
nightwing
df261c6763 higher index for gutter tooltip 2013-09-04 18:38:17 +04:00
nightwing
94e4c2d6dd include -1 when cycling through popup items 2013-09-04 18:37:50 +04:00
nightwing
d6de4ee6aa fix popup selection marker 2013-09-04 18:37:08 +04:00
nightwing
dd057f3095 allow fractional scrollLeft 2013-09-04 17:04:37 +04:00
nightwing
1bf73980ae shadow looks ugly on firefox 2013-09-04 13:34:42 +04:00
nightwing
3e4e7303fc Merge pull request #1585 2013-09-04 13:22:13 +04:00
nightwing
00a640e473 fix highlighting of closing brace 2013-09-04 13:19:23 +04:00
nightwing
3fe075f2af fix getAllRanges in singleSelect mode 2013-09-04 13:11:09 +04:00
nightwing
94bea36cf1 Merge remote-tracking branch 'remotes/pull/1587' 2013-09-04 13:05:03 +04:00
nightwing
61d33f4269 tweak style 2013-09-04 13:04:39 +04:00
DanyaPostfactum
bde1acec75 Insert completion at each cursor 2013-09-04 13:34:30 +10:00
Zef Hemel
3812b20546 Nix mode 2013-09-03 20:46:27 +02:00
Zef Hemel
a44b053eab Initial Nix mode 2013-09-03 17:21:47 +02:00
nightwing
7edecc9f2a improve autocomplete popup 2013-09-02 00:21:51 +04:00
nightwing
8cb5b1f0e9 fix #1580 Mouse SelectByLines does not select ending char 2013-08-30 15:25:38 +04:00
Harutyun Amirjanyan
5f6dd8c89f Merge pull request #1577 from fatihacet/patch-1
Continue loop if we don't have a caption while populating autocomplete l...
2013-08-30 03:13:42 -07:00
Harutyun Amirjanyan
3deefcb2c7 Merge pull request #1575 from danyaPostfactum/domgutter
Use DOM methods to update gutter
2013-08-30 03:12:36 -07:00
Fatih Acet
29a011cc0a Continue loop if we don't have a caption while populating autocomplete list. 2013-08-29 14:48:11 +03:00
DanyaPostfactum
53440ea548 Use DOM methods to update gutter 2013-08-28 20:59:03 +10:00
nightwing
4492925305 fix erb comment highlighting 2013-08-28 12:15:12 +04:00
Harutyun Amirjanyan
9bf4827c78 Merge pull request #1550 from pterxiao/cvox
Accessibility Theme for Ace
2013-08-28 01:03:57 -07:00
nightwing
094fd85334 fix a typo 2013-08-27 13:43:07 +04:00
nightwing
e2b2f08c24 fix tests 2013-08-26 22:41:29 +04:00
nightwing
449bbfe406 improve batch highlighting 2013-08-26 21:59:17 +04:00
nightwing
c62e0d3062 add trimEmpty options to trimTrailingSpace, cleanup 2013-08-26 21:58:31 +04:00
nightwing
79fbec43b0 misc fixes 2013-08-26 21:57:22 +04:00
nightwing
3a23eacda2 fix foldAll 2013-08-26 21:55:34 +04:00
nightwing
3eef5f0a63 allow clicking through invisible mac scrollbars 2013-08-26 21:55:14 +04:00
nightwing
79c0f83e2c add input event, make doing multiple changes in one turn much faster 2013-08-26 21:52:38 +04:00
nightwing
2d6f56d8fd provide oldSize in resize event 2013-08-26 21:44:30 +04:00
nightwing
b2eac666e5 allow removing listener while event is dispatched 2013-08-26 21:41:18 +04:00
nightwing
6a76d63491 Merge pull 1554 2013-08-26 21:14:00 +04:00
nightwing
7fc575a47c fix formatting 2013-08-26 21:13:10 +04:00
Lennart Kats
dbff7216f0 Merge pull request #1570 from ajaxorg/papercuts
Small improvements to the api
2013-08-26 09:51:12 -07:00
nightwing
063aaed3a2 add @deprecated comment for getCopyText 2013-08-26 20:21:07 +04:00
nightwing
244e1462e8 add fixedWidthGutter option 2013-08-26 18:46:42 +04:00
nightwing
b23265ad72 allow any Range-like objects in session replace/remove 2013-08-26 18:37:50 +04:00
nightwing
3b5d742feb add editor getSelectedText method 2013-08-26 18:31:51 +04:00
nightwing
a44cbdc5c2 add renderer.setMouseCursor 2013-08-26 18:26:05 +04:00
nightwing
2cef7f4747 add scrollTo method 2013-08-26 18:09:31 +04:00
nightwing
27b91b44e0 update coffee script fixes #1568 2013-08-26 18:08:11 +04:00
Harutyun Amirjanyan
330b8a4a8e Merge pull request #1566 from ajaxorg/webkit-fractional-fix
Webkit fractional fix
2013-08-23 14:11:08 -07:00
Garen Torikian
d9c5921e48 Use lang.stringRepeat instead of a for loop 2013-08-23 14:02:26 -07:00
Garen Torikian
4b42933b8a Add comment explaining maths 2013-08-23 12:59:50 -07:00
Garen Torikian
a4ef760c7a Support fractional fixed-width fonts 2013-08-23 12:59:04 -07:00
Harutyun Amirjanyan
8bf4a0e604 Merge pull request #1564 from adamjimenez/patch-16
Include css rule name with lint results
2013-08-23 09:15:14 -07:00
Adam Jimenez
5c721c1103 Add cut or delete command shift+delete 2013-08-23 15:56:58 +01:00
nightwing
067efccb16 update list of real world users 2013-08-23 16:37:34 +04:00
nightwing
48e672b710 fix php heredoc highlighting inside array
fixes #1561
2013-08-23 11:46:49 +04:00
nightwing
c3491f4855 fix merge conflict 2013-08-22 15:29:17 +04:00
nightwing
f8f8b00c61 Merge remote-tracking branch 'remotes/pull/1560'
Conflicts:
	lib/ace/ext/language_tools.js
2013-08-22 13:32:14 +04:00
nightwing
e88dc7adc9 Merge branch origin/htmlcompleter 2013-08-22 13:28:41 +04:00
DanyaPostfactum
9475d7738b Add fuzzy matching for completions 2013-08-22 11:43:11 +10:00
DanyaPostfactum
2d0b980c65 Fix two broken javascript snippets 2013-08-22 11:38:57 +10:00
Harutyun Amirjanyan
fb66d49772 Merge pull request #1559 from ajaxorg/add-makefile-target
Add a simple incremental Makefile target
2013-08-21 06:06:02 -07:00
Lennart Kats
b4150a201c Don't require pre_build for basic job 2013-08-21 15:04:05 +02:00
Lennart Kats
29b6f8c875 Add a very simple incremental Makefile target 2013-08-21 14:54:02 +02:00
Harutyun Amirjanyan
bbabc6edc1 Merge pull request #1557 from mc10/master
Fix links in Readme.md
2013-08-18 15:05:47 -07:00
Kevin Ji
2885e6f90c Fix links in Readme.md 2013-08-18 14:43:45 -07:00
Peter Xiao
12d2c298bb Update old title. 2013-08-15 17:40:36 -07:00
Peter Xiao
ca1f431df4 Flush out extra unselected speech. 2013-08-15 17:20:36 -07:00
Peter Xiao
1a54f05075 Play earcon on empty or whitespace rows. Add support for selection. 2013-08-15 17:18:07 -07:00
Lennart Kats
fe1f945343 Merge pull request #1540 from ajaxorg/ie7
Ie7 support
2013-08-15 01:24:43 -07:00
Peter Xiao
23f62e015b Merge branch 'master' of https://github.com/ajaxorg/ace into cvox 2013-08-14 15:27:01 -07:00
Peter Xiao
5708ef899e Support for multiple editors, reorder rules, and use replace all. 2013-08-14 13:57:38 -07:00
Peter Xiao
1d7c9220ee No need to focus ace, add more expansions. 2013-08-14 13:29:34 -07:00
Peter Xiao
5ea65fe246 Add in expansion rules to speak more like how code is read. 2013-08-13 16:51:12 -07:00
Peter Xiao
16d13b6b59 Like tokens are now merged for more fluid TTS. 2013-08-13 15:39:01 -07:00
Peter Xiao
0f93b3098f Start merging tokens. 2013-08-13 15:34:22 -07:00
nightwing
269e8d976d remove useless stopPropagation on mouseup 2013-08-14 00:05:26 +04:00
Peter Xiao
41c82627f9 Update comment, remove code in chromevox ext demo. 2013-08-12 16:59:12 -07:00
Peter Xiao
c3a681abd1 Less aggressive filter for speaking tokens, add some docs. 2013-08-12 16:15:09 -07:00
Peter Xiao
38b42d20d3 Chromevox theme now an extension, added demo file, added findSearchBox event. 2013-08-12 15:58:09 -07:00
Peter Xiao
304b27954b Moved chromevox to ext 2013-08-12 13:04:12 -07:00
nightwing
7f6e94f021 Merge remote-tracking branch 'remotes/origin/html_completer' 2013-08-12 22:28:55 +04:00
Lennart Kats
0655f8a809 Merge pull request #1552 from ajaxorg/jshint
Jshint update
2013-08-12 07:58:32 -07:00
nightwing
0f2ca66d76 allow space separated list of globals 2013-08-12 18:32:36 +04:00
nightwing
14d540ddc7 update jshint again 2013-08-12 18:13:20 +04:00
nightwing
e5714c9dba Merge remote-tracking branch 'remotes/origin/gh-pages' into master 2013-08-11 13:17:22 +04:00
nightwing
54a2880634 small cleanup 2013-08-11 11:53:40 +04:00
Peter Xiao
6bbc1d6d41 Add chromevox theme. 2013-08-08 15:51:20 -07:00
nightwing
9bf8eac28c add persistent vscroll option to the demo 2013-08-09 00:12:52 +04:00
Lennart Kats
42d243df4b Merge pull request #1520 from ajaxorg/wrap
Wrapping issues
2013-08-07 07:10:21 -07:00
nightwing
d2318e99a2 add increase/decrease fontSize commands to the demo 2013-08-05 23:33:10 +04:00
nightwing
d884b44d48 better save in the demo 2013-08-04 13:58:50 +04:00
Adam Jimenez
9f8ed0db31 Include css rule name with lint results
This is similar to returning "raw" from JSHint, as it helps to identify the rule being applied.
2013-08-03 14:40:11 +01:00
nightwing
f782e59f76 update build 2013-08-01 23:29:53 +04:00
Lennart Kats
d1738b0eb2 Merge pull request #1539 from ajaxorg/misc
fix several small bugs
2013-07-31 15:04:55 -07:00
nightwing
c80ae070f7 small cleanup 2013-07-31 17:54:44 +04:00
nightwing
844502fae6 Merge branch 'origin/master' into misc
Conflicts:
	lib/ace/virtual_renderer.js
2013-07-30 22:17:38 +04:00
nightwing
d3cd46adff fix $# and %# highlighting in perl mode 2013-07-30 22:13:48 +04:00
nightwing
c911f4a761 fix tests 2013-07-30 01:09:52 +04:00
nightwing
ab438f2edc better demo 2013-07-30 00:47:09 +04:00
nightwing
f2944d4ced remove trailing commas 2013-07-30 00:28:05 +04:00
nightwing
95f0e7308f some more ie7 fixes 2013-07-30 00:23:09 +04:00
nightwing
4b4a5d045c add a test 2013-07-30 00:23:08 +04:00
nightwing
8d354e810c syntax highlighting in ie9 in ie8 mode 2013-07-30 00:23:08 +04:00
nightwing
d4dcdb7736 use snipetManager for expanding emmet snippets 2013-07-27 00:45:08 +04:00
nightwing
524930a2c7 force measure sizes if container is visible but width is 0 2013-07-26 23:17:12 +04:00
nightwing
4d9118e6fe add emmet demo 2013-07-26 15:10:59 +04:00
nightwing
ca1c27aa65 fix #1533 syntax highlighting of markdown links 2013-07-26 14:55:08 +04:00
nightwing
cacd51e2fe tweak jshint console mock 2013-07-24 22:57:46 +04:00
nightwing
62e7073b33 add wrapMethod:auto and fix tests 2013-07-24 17:49:42 +04:00
Luca Cipriani
c2692f42af Update CNAME 2013-07-24 14:53:17 +02:00
nightwing
9f068dc45d improve wrapping for markdown 2013-07-24 16:16:52 +04:00
nightwing
22de40bf6a resize editor only when tab is fully shown 2013-07-23 19:12:24 +04:00
nightwing
73d8eb5898 do not lose scheduled changes when render is canceled 2013-07-23 19:11:17 +04:00
nightwing
47b30f5db4 update submodules 2013-07-23 16:37:07 +04:00
Luca Cipriani
32035f68db Added CNAME file for redirect of giihubpages 2013-07-23 16:21:10 +04:00
nightwing
373693a1c4 fix weird ie8 bug 2013-07-23 15:54:15 +04:00
Lennart Kats
a4a30b6665 Merge pull request #1523 from ajaxorg/jshint
update jshint to 2.1.4
2013-07-23 00:19:43 -07:00
Lennart Kats
5bc96b69fc Merge pull request #1527 from ajaxorg/nc
renderer fixes backported from newClient
2013-07-22 12:30:02 -07:00
Lennart Kats
b204b53e78 Merge pull request #1526 from ajaxorg/site
Dogfood
2013-07-22 07:14:56 -07:00
Harutyun Amirjanyan
7294a35b3f Merge pull request #1528 from jdalegonzalez/master
Added parser support for traits, namespace declarations, namespace refer...
2013-07-22 03:39:23 -07:00
jdalegonzalez
c03df1f602 Added parser support for traits, namespace declarations, namespace references in class names (\) and the use keyword 2013-07-20 12:29:06 -04:00
nightwing
7f4d2dde8e add more users 2013-07-19 19:48:24 +04:00
nightwing
f447430c10 automatically hide activeLine highlight if editor height is one line 2013-07-19 17:59:37 +04:00
nightwing
4e86a104c2 fix autoresizing editor on ie 2013-07-19 17:52:33 +04:00
nightwing
650fe73386 clicking on scrollbar shouldn't focus the editor 2013-07-19 17:52:33 +04:00
nightwing
26329c2d76 scrollbars should start as hidden 2013-07-19 17:52:33 +04:00
nightwing
abf5f7492f recompute longestLine when vScroll changes 2013-07-19 17:52:33 +04:00
nightwing
7f8a47939c renderer changes from newclient 2013-07-19 17:52:33 +04:00
nightwing
e0ce741f5b convert multi_select to an option 2013-07-19 17:52:33 +04:00
nightwing
50ec54a7d8 use minified files 2013-07-19 03:39:01 +04:00
nightwing
71d382d43b Merge remote-tracking branch 'remotes/dp/htmlcompleter'
Conflicts:
	lib/ace/ext/language_tools.js
2013-07-19 03:16:28 +04:00
nightwing
a406b853f3 Merge branch 'highlighting/xml' 2013-07-19 03:04:34 +04:00
nightwing
ee74fe5a52 make doctype less bright 2013-07-19 03:02:59 +04:00
nightwing
8a22cf4873 enable autocompletion and snippets 2013-07-18 21:03:36 +04:00
nightwing
a69fce21f4 use ace static highlighter in the main site 2013-07-18 21:03:35 +04:00
nightwing
9f2a17fcf5 fix snippet editor in the demo 2013-07-18 13:11:08 +04:00
nightwing
77526749bc add emmet updater 2013-07-18 13:11:08 +04:00
nightwing
18c2a50726 fix typo in the demo 2013-07-18 13:11:07 +04:00
nightwing
1a94ace704 fix tests 2013-07-18 13:11:07 +04:00
nightwing
2a8619e7f5 enable moz in javascript worker 2013-07-18 13:10:43 +04:00
nightwing
6788031994 allow moz and es6 settings to work together 2013-07-18 13:09:08 +04:00
nightwing
41b0914299 remove huge console emulation code 2013-07-18 13:07:55 +04:00
nightwing
d76bc364e7 update jshint to v2.1.4 2013-07-18 13:05:00 +04:00
nightwing
987411423b update jshint updater 2013-07-18 13:03:59 +04:00
nightwing
e5ce9e7aee Merge pull request #1517: Update links 2013-07-14 13:41:13 +04:00
Adrian L Lange
24f6640f89 Update links
Files changed: index.html
2013-07-14 13:38:55 +04:00
nightwing
2270bd8c4b fix failing tests 2013-07-14 08:58:29 +04:00
nightwing
c7abff1856 use meta.tag.punctuation 2013-07-14 08:49:45 +04:00
nightwing
386f1ecade Merge branch 'highlighting/xmlrefactor' into master
Conflicts:
	lib/ace/ext/modelist.js
	lib/ace/mode/_test/tokens_luapage.json
2013-07-14 06:24:23 +04:00
Lennart Kats
aded11265f Merge pull request #1489 from ajaxorg/undo_merge
Undo merging
2013-07-12 00:04:40 -07:00
Ruben Daniels
6783f921c9 Merge pull request #1512 from ajaxorg/indent
fix #549 enter on start of indented line should keep indentation
2013-07-11 08:17:05 -07:00
nightwing
920031b877 fix #549 enter on start of indented line should keep indentation 2013-07-11 18:41:40 +04:00
nightwing
09d0044e1e fix undo selection range after delete 2013-07-11 17:35:29 +04:00
nightwing
ba0e17fd0d fix #1510 ace_invalid appears on correct diff 2013-07-11 16:50:02 +04:00
DanyaPostfactum
3c046d2ada Update highlighting tests 2013-07-11 00:31:39 +10:00
DanyaPostfactum
88d9a61dc2 Fix xml_highlight_rules qstring_inner state name 2013-07-10 14:35:24 +10:00
Lennart Kats
3009163083 Merge pull request #1509 from ajaxorg/hotfix/build
fix #1508: jshint is broken in build
2013-07-09 08:23:07 -07:00
nightwing
a41a06ff33 escape . in regexp 2013-07-09 19:20:53 +04:00
nightwing
49967c139a fix typo in noworker detection 2013-07-09 18:22:35 +04:00
nightwing
38dc22b421 fix tests 2013-07-08 15:02:29 +04:00
nightwing
c5378b54e1 fix #1508: jshint is broken in build 2013-07-08 13:58:57 +04:00
nightwing
e3d14ab620 turn scrollPastEnd off by default 2013-07-07 14:40:53 +04:00
Ruben Daniels
a25a685d11 Merge pull request #1507 from ajaxorg/scroll_past_end
[WIP] scrollPastEnd
2013-07-07 02:31:37 -07:00
nightwing
1ad2602f8b add scrollPastEnd to demo 2013-07-07 13:02:57 +04:00
nightwing
8a6320bfd1 resize scrollbar for scrollPastEnd only when needed 2013-07-07 12:50:24 +04:00
nightwing
b97496009b scrollPastEnd 2013-07-07 12:48:53 +04:00
Lennart Kats
5585535d98 Merge pull request #1504 from ajaxorg/fix/build
Fix snippet loading in build
2013-07-07 01:03:44 -07:00
Lennart Kats
b1439f2bf8 Merge pull request #1487 from ajaxorg/highlighting/update
update sh and go highlighting
2013-07-07 01:00:56 -07:00
Ruben Daniels
65713e974b Merge pull request #1502 from ajaxorg/scrolling_issues
fix several small issues on mac
2013-07-06 03:48:01 -07:00
Ruben Daniels
62653ea5ba Merge pull request #1473 from ajaxorg/bgTokenizer
bgTokenizer worker should not redraw unnecessarily
2013-07-06 03:47:30 -07:00
Ruben Daniels
95e0f2fffd Merge pull request #1467 from ajaxorg/jshint
update jshint and coffee
2013-07-06 03:47:08 -07:00
nightwing
bbe87e41fa update tests 2013-07-04 14:42:40 +04:00
nightwing
d2be8aefc0 fix snippet loading in build 2013-07-04 14:31:42 +04:00
nightwing
3139b3964d fix #1500 too enthusiastic String replace in config.moduleUrl 2013-07-04 14:30:35 +04:00
nightwing
dd0880afb6 fix typo 2013-07-03 17:42:46 +04:00
nightwing
a8ac1b1e9a fix horizontal scrolling 2013-07-02 15:25:36 +04:00
DanyaPostfactum
98d6fac8fa Move html completion logic to html_completions.js 2013-07-02 19:42:43 +10:00
nightwing
1400d82d34 pull back changes from cloud9 2013-07-02 12:13:30 +04:00
Lennart Kats
cc0b6386aa Merge pull request #1496 from ajaxorg/fix/build
Fix build
2013-07-01 02:24:03 -07:00
nightwing
403e45a5dd fix vim folding commands 2013-07-01 00:09:15 +04:00
Tenor Biel
5f1a69a38e Add vim commands for folding 2013-07-01 00:01:30 +04:00
nightwing
4b8ab8eab9 fix ^ in vim mode on swedish keyboard on mac 2013-06-30 23:45:47 +04:00
nightwing
f6f3425cce use wheel event on new versions of Firefox
fixes #1466
2013-06-30 22:07:23 +04:00
DanyaPostfactum
297dbe63db Append empty value to inserted html attribute on completion 2013-07-01 04:05:22 +10:00
Harutyun Amirjanyan
6a87d9782b Merge pull request #1494 from danyaPostfactum/snippetcompleter
Show snippets in suggestion list
2013-06-30 10:07:24 -07:00
DanyaPostfactum
e1c86f453f add html completion 2013-07-01 01:43:05 +10:00
DanyaPostfactum
a5f4ecf597 add .getCompletions method to text mode 2013-07-01 01:42:40 +10:00
DanyaPostfactum
7ce86e24f1 use data.snippet in completions for snippet insertion 2013-07-01 01:23:14 +10:00
Harutyun Amirjanyan
2a40b37590 Merge pull request #1493 from buildersbrewery/master
Updates to LSL mode
2013-06-30 07:45:36 -07:00
Harutyun Amirjanyan
b860c2293c Merge pull request #1495 from ajaxorg/static_highlighter
fix #1492 $' breaks static-highligher
2013-06-30 07:44:33 -07:00
DanyaPostfactum
d276f10bcd add snippet completer 2013-06-30 04:07:24 +10:00
DanyaPostfactum
ca97c230f0 Proper comment rules in js syntax. 2013-06-29 17:41:16 +10:00
Lennart Kats
76fd4b1358 Merge pull request #1464 from ajaxorg/highlighting/markdown
Tweak heading and list highlighting in markdown mode
2013-06-28 15:15:25 -07:00
Lennart Kats
3e6d25c38f Merge pull request #1463 from ajaxorg/altgr
Do not capture alt-gr key
2013-06-28 15:14:34 -07:00
Builders Brewery
8c3527ec5b updated LSL mode
- added changes from
wiki.secondlife.com/wiki/Release_Notes/Second_Life_RC_LeTigre/13#13.06.21.277682
to highlight rules and snippets
- reviewed invalid grammar and text mode test
2013-06-28 17:42:57 +02:00
nightwing
2143c4daed make minified files ascii compatible 2013-06-28 19:38:02 +04:00
nightwing
c6143cf587 include theme/textmate in build 2013-06-28 19:38:02 +04:00
nightwing
adf7eebb5f fix tests 2013-06-28 19:22:21 +04:00
nightwing
071b936323 fix conflict between static highlighter and ace styles 2013-06-28 18:17:10 +04:00
nightwing
8068b01f21 fix #1492 $' breaks static-highligher 2013-06-28 18:15:54 +04:00
Ruben Daniels
81f7dd7fbb Merge pull request #1488 from ajaxorg/renderer
Renderer improvements
2013-06-27 07:55:22 -07:00
nightwing
f1e809294c fix #1490 Parsing Lua comments in the middle of line 2013-06-26 20:23:58 +04:00
nightwing
78585a9c5d add demo/autoresize.html 2013-06-25 23:50:00 +04:00
nightwing
0479acfea7 add option to autoresize editor vertically 2013-06-25 20:59:06 +04:00
DanyaPostfactum
969f94d98c Paint xml tag angle brackets in white (monokai theme) 2013-06-24 21:08:22 +10:00
DanyaPostfactum
722374581a Update svg Highlight rules 2013-06-24 21:06:54 +10:00
DanyaPostfactum
e2359b2f9f Let JS line comment rules be not greedy 2013-06-24 21:06:32 +10:00
DanyaPostfactum
25853c11a1 Use push/pop in css highlight rules 2013-06-24 21:04:28 +10:00
DanyaPostfactum
a6ba61e11a Inherit all HTML+server_side_directives rules from HTML rules. 2013-06-24 21:03:49 +10:00
DanyaPostfactum
7c6f40e41e Html HL rules now is extended xml rules 2013-06-24 20:56:33 +10:00
DanyaPostfactum
d358fe61b9 Allow no prefix in TextHighlightRules.addRules() 2013-06-24 20:53:37 +10:00
DanyaPostfactum
ed223cb7fd Rewrite xml rules. 2013-06-24 18:55:07 +10:00
DanyaPostfactum
5f2ee8b32b Prevent double prefixing of "included" rules 2013-06-24 18:53:09 +10:00
DanyaPostfactum
5a1948a695 Fix FreeMarker in ext/modelist 2013-06-24 18:42:40 +10:00
DanyaPostfactum
91884280e2 More stuff for twig sample 2013-06-24 18:41:57 +10:00
nightwing
b3e4d33e02 update scrollbar when inserting new line in the middle of the document
fixes regression from 9f1d8af937
2013-06-24 00:18:51 +04:00
nightwing
43f1788ad4 use fake horizontal scrollbar 2013-06-23 23:58:32 +04:00
nightwing
a6654eee9e update tests 2013-06-23 22:35:23 +04:00
nightwing
b9190d1e8d fix go string highlighting 2013-06-23 22:27:02 +04:00
nightwing
4b398798c0 highlight escapes in sh mode 2013-06-22 22:39:18 +04:00
Ruben Daniels
ea591e2149 Merge pull request #1479 from ajaxorg/pulreq
Fix timing issue with setting modes
2013-06-20 07:08:11 -07:00
nightwing
3667a15e8d add callback to setTheme as well 2013-06-20 18:04:36 +04:00
nightwing
855853139a small cleanup 2013-06-20 18:00:50 +04:00
nightwing
b01d4d5a6b treat whitespace words of length 1 the same as others
without this multicursor doesn't work in cases like

foo: bar
a:   baz
2013-06-20 17:57:10 +04:00
nightwing
4b51b9288f timing issue with setting modes 2013-06-20 17:57:09 +04:00
nightwing
2d9225326c cleanup 2013-06-19 21:38:11 +04:00
nightwing
2852638c45 fix initial highlighting in hidden editor 2013-06-19 21:25:39 +04:00
nightwing
0ba027c8bf fix failing test 2013-06-17 16:54:43 +04:00
nightwing
9197cc983c enable undo coalescence by default 2013-06-17 16:38:27 +04:00
nightwing
db4953c976 use operations for undo coalescence 2013-06-17 16:38:00 +04:00
nightwing
52e0b2d163 pressing ctrl+home second time should restore selection 2013-06-17 16:35:22 +04:00
nightwing
ec8b42c5e0 add start/endOperation 2013-06-17 16:30:09 +04:00
nightwing
b18b86b6c9 make undo coalescence configurable
off by default
2013-06-17 02:06:28 +04:00
Harutyun Amirjanyan
132d44462e Merge pull request #1475 from buildersbrewery/master
Update LSL mode
2013-06-16 14:47:51 -07:00
nightwing
ef2e2cdd11 move undo delta merging to the editor 2013-06-17 01:30:42 +04:00
DanyaPostfactum
277675525b Almost working draft of basic undo coalescence 2013-06-17 01:08:03 +04:00
nightwing
7798de7bd3 add selection.toJSON method 2013-06-17 00:58:11 +04:00
nightwing
f82c4df96a [Autocomplete] fix insertion of words containing - sign 2013-06-17 00:53:12 +04:00
nightwing
3026d78395 do not allow Replace after setReadOnly
fixes #1468
2013-06-17 00:53:12 +04:00
Builders Brewery
71d127f5fa updated LSL mode
lsl_highlight_rules.js:
- added stuff from RC Le Tigre 13.06.06.277104
- made stuff more readable while staying within 80 columns width

snippets.lsl
- sorted
- added stuff from RC Le Tigre 13.06.06.277104
2013-06-16 21:13:17 +02:00
nightwing
f45980feb7 fix FreeMarker mode name in modelist 2013-06-16 16:38:09 +04:00
nightwing
cdd122a540 fix hljs undefined error in main site 2013-06-16 11:46:54 +04:00
nightwing
6887c84b71 fix #1474 IE8: double click anywhere issues script error. 2013-06-16 11:45:58 +04:00
nightwing
774098f243 event target isn't defined on ie8 2013-06-13 23:42:41 +04:00
nightwing
069bbda6a6 bgTokenizer worker should not redraw unnecessarily 2013-06-13 21:57:29 +04:00
nightwing
d2f7247e58 add missing snippets.tmpl.js 2013-06-11 22:06:00 +04:00
nightwing
7df0b59c13 fix tests 2013-06-11 14:57:31 +04:00
nightwing
505847681d update jshint and coffee 2013-06-11 14:24:57 +04:00
Lennart Kats
fa13f377e1 Merge pull request #1189 from ajaxorg/feature/codecomplete
Implement basic code completion
2013-06-10 17:09:18 -07:00
nightwing
db1118c258 fix typo 2013-06-09 18:57:49 +04:00
nightwing
156d9a7eeb load snippet files automatically 2013-06-09 18:11:45 +04:00
nightwing
af2a2e272b revert change to config.js 2013-06-09 01:09:48 +04:00
nightwing
917e4b925c fix typo in clojure mode 2013-06-09 01:06:25 +04:00
Harutyun Amirjanyan
89c42264c0 Merge pull request #1427 from gbedardsice/master
Text mode keeps indentation
2013-06-08 13:57:53 -07:00
nightwing
b36c4c67b2 include split in build 2013-06-09 00:55:57 +04:00
nightwing
ac9bb727cc revert to simpler range tracking model for now 2013-06-09 00:50:25 +04:00
nightwing
35a9dc5ba1 hide the popup when editor is scrolled 2013-06-09 00:29:21 +04:00
nightwing
b46250ffa1 update markdown test 2013-06-08 18:49:44 +04:00
nightwing
186e6b1b86 use markup.heading for # and heading for the defaultToken
fixes #1457
2013-06-08 18:34:42 +04:00
nightwing
6479dd998f move underline to core styles 2013-06-08 18:26:45 +04:00
nightwing
d4bdfe3300 do not capture alt-gr key 2013-06-08 17:17:48 +04:00
Gabriel Bédard Sicé
6e9653451c Fix #1427 Added plain text mode that does not keep indentation 2013-06-06 15:28:56 -04:00
nightwing
36c166b9ed force using tabs in makefile and snippets modes 2013-06-05 23:35:15 +04:00
nightwing
c223f59e1a add scope to snippets.js files 2013-06-05 23:35:15 +04:00
nightwing
c2b7d1f082 better style for match highlight in popup 2013-06-05 23:35:15 +04:00
nightwing
f6f475747b style improvements 2013-06-05 23:35:15 +04:00
nightwing
a399d1440a cleanup 2013-06-05 23:35:14 +04:00
nightwing
df115ba659 add snippets placeholder files for all languages 2013-06-05 23:35:14 +04:00
nightwing
68ebf08e8c cleanup 2013-06-05 23:35:14 +04:00
nightwing
dc198344d5 revert changes to worker 2013-06-05 23:35:14 +04:00
nightwing
5c1db2dbcc tweak the popup some more 2013-06-05 23:35:14 +04:00
nightwing
7293bb142f fix popup 2013-06-05 23:35:14 +04:00
Garen Torikian
06c10fb934 One more test fix 2013-06-05 23:35:14 +04:00
Garen Torikian
6f17611ebf Fix failing test 2013-06-05 23:35:14 +04:00
Garen Torikian
b811f1dc3f Fix rerender on text insertion 2013-06-05 23:35:14 +04:00
Garen Torikian
cd19233b31 Improve UX, drop dead code 2013-06-05 23:35:13 +04:00
Garen Torikian
69e41521e6 Add autocompletion for language keywords
Conflicts:

	lib/ace/edit_session.js
2013-06-05 23:35:13 +04:00
Garen Torikian
818dba5dba Some added UX behaviors 2013-06-05 23:35:13 +04:00
Garen Torikian
ef19fdbcb5 First pass at Haurtyun UI + C9 doc parsing 2013-06-05 23:35:13 +04:00
Garen Torikian
e43bee07e2 Get rid of my junk 2013-06-05 23:35:13 +04:00
Garen Torikian
dcdcd81584 Fix it up 2013-06-05 23:35:13 +04:00
Garen Torikian
b1322002ab Merge updates 2013-06-05 23:35:13 +04:00
Garen Torikian
5fa87f83e7 Bring in Harutyun's code 2013-06-05 23:35:13 +04:00
nightwing
a640e4ce05 add autocompleter 2013-06-05 23:35:12 +04:00
Garen Torikian
dbca4444bf Implement keybindings and such 2013-06-05 23:35:12 +04:00
Garen Torikian
808bb95538 Let us begin 2013-06-05 23:35:12 +04:00
876 changed files with 166609 additions and 60918 deletions

2
.gitignore vendored
View file

@ -2,9 +2,11 @@
.DS_Store
*.swp
*.tmp
*~
# Project files that should not be in the repo
.*
\#*
!/.gitignore
.*.gz
*.tmTheme.js

4
.gitmodules vendored
View file

@ -1,6 +1,6 @@
[submodule "doc/wiki"]
path = doc/wiki
url = git://github.com/ajaxorg/ace.wiki.git
url = https://github.com/ajaxorg/ace.wiki.git
[submodule "build"]
path = build
url = git://github.com/ajaxorg/ace-builds.git
url = https://github.com/ajaxorg/ace-builds.git

1
CNAME Normal file
View file

@ -0,0 +1 @@
ace.c9.io

View file

@ -7,16 +7,9 @@ Feel free to fork and improve/enhance Ace any way you want. If you feel that the
There are two versions of the agreement:
1. [The Individual CLA](https://github.com/ajaxorg/ace/raw/master/doc/Contributor_License_Agreement-v2.pdf): use this version if you're working on an ajax.org in your spare time, or can clearly claim ownership of copyright in what you'll be submitting.
2. [The Corporate CLA](https://github.com/ajaxorg/ace/raw/master/doc/Corporate_Contributor_License_Agreement-v2.pdf): have your corporate lawyer review and submit this if your company is going to be contributing to ajax.org projects
1. [The Individual CLA](https://docs.google.com/a/c9.io/forms/d/1MfmfrxqD_PNlNsuK0lC2KSelRLxGLGfh_wEcG0ijVvo/viewform): use this version if you're working on the Cloud9 SDK or open source projects in your spare time, or can clearly claim ownership of copyright in what you'll be submitting.
2. [The Corporate CLA](https://docs.google.com/a/c9.io/forms/d/1vFejn4111GdnCNuQ6BfnJDaxdsUEMD4KCo1ayovAfu0/viewform): have your corporate lawyer review and submit this if your company is going to be contributing to the Cloud9 SDK and/or open source projects.
If you want to contribute to an ajax.org project please print the CLA and fill it out and sign it. Then either send it by snail mail or fax to us or send it back scanned (or as a photo) by email.
If you want to contribute to the Cloud9 SDK and/or open source projects please go to the online form, fill it out and submit it.
Email: ace+cla@c9.io
Fax: +31 (0) 206388953
Address: Ajax.org B.V.
Keizersgracht 241
1016 EA, Amsterdam
the Netherlands
Happy coding, Cloud9

View file

@ -1,4 +1,103 @@
2013.06.04 Version 1.1.01
Version 1.2.0-pre
* New Features
- Indented soft wrap (danyaPostfactum)
* API Changes
- unified delta types `{start, end, action, lines}` (Alden Daniels https://github.com/ajaxorg/ace/pull/1745)
- "change" event listeners on session and editor get delta objects directly
2015.04.03 Version 1.1.9
- Small Enhancements and Bugfixes
2014.11.08 Version 1.1.8
* API Changes
- `editor.commands.commandKeyBinding` now contains direct map from keys to commands instead of grouping them by hashid
* New Features
- Improved autoindent for html and php modes (Adam Jimenez)
- Find All from searchbox (Colton Voege)
* new language modes
- Elixir, Elm
2014.09.21 Version 1.1.7
* Bugfixes
- fix several bugs in autocompletion
- workaround for inaccurate getBoundingClientRect on chrome 37
2014.08.17 Version 1.1.6
* Bugfixes
- fix regression in double tap to highlight
- Improved Latex Mode (Daniel Felder)
* API Changes
- editor.destroy destroys editor.session too (call editor.setSession(null) to prevent that)
* new language modes
- Praat (José Joaquín Atria)
- Eiffel (Victorien Elvinger)
- G-code (Adam Joseph Cook)
2014.07.09 Version 1.1.5
* Bugfixes
- fix regression in autocomplete popup
* new language modes
- gitignore (Devon Carew)
2014.07.01 Version 1.1.4
* New Features
- Highlight matching tags (Adam Jimenez)
- Improved jump to matching command (Adam Jimenez)
* new language modes
- AppleScript (Yaogang Lian)
- Vala
2014.03.08 Version 1.1.3
* New Features
- Allow syntax checkers to be loaded from CDN (Derk-Jan Hartman)
- Add ColdFusion behavior (Abram Adams)
- add showLineNumbers option
- Add html syntax checker (danyaPostfactum)
* new language modes
- Gherkin (Patrick Nevels)
- Smarty
2013.12.02 Version 1.1.2
* New Features
- Accessibility Theme for Ace (Peter Xiao)
- use snipetManager for expanding emmet snippets
- update jshint to 2.1.4
- improve php syntax checker (jdalegonzalez)
- add option for autoresizing
- add option for autohiding vertical scrollbar
- improvements to highlighting of xml like languages (danyaPostfactum)
- add support for autocompletion and snippets (gjtorikyan danyaPostfactum and others)
- add option to merge similar changes in undo history
- add scrollPastEnd option
- use html5 dragndrop for text dragging (danyaPostfactum)
* API Changes
- fixed typo in HashHandler commmandManager
* new language modes
- Nix (Zef Hemel)
- Protobuf (Zef Hemel)
- Soy
- Handlebars
2013.06.04 Version 1.1.1
- Improved emacs keybindings (Robert Krahn)
- Added markClean, isClean methods to UndoManager (Joonsoo Jeon)

View file

@ -13,7 +13,17 @@ pre_build:
build: pre_build
./Makefile.dryice.js normal
./Makefile.dryice.js demo
./Makefile.dryice.js bm
# Minimal build: call Makefile.dryice.js only if our sources changed
basic: build/src/ace.js
build/src/ace.js : ${wildcard lib/*} \
${wildcard lib/*/*} \
${wildcard lib/*/*/*} \
${wildcard lib/*/*/*/*} \
${wildcard lib/*/*/*/*/*} \
${wildcard lib/*/*/*/*/*/*}
./Makefile.dryice.js
doc:
cd doc;\

View file

@ -31,22 +31,23 @@
var fs = require("fs");
var path = require("path");
if (!fs.existsSync)
fs.existsSync = path.existsSync;
else
path.existsSync = fs.existsSync;
var copy = require('dryice').copy;
var copy = require('architect-build/copy');
var build = require('architect-build/build');
var ACE_HOME = __dirname;
var BUILD_DIR = ACE_HOME + "/build";
var CACHE = {};
function main(args) {
if (args.indexOf("updateModes") !== -1) {
return updateModes();
}
var type = "minimal";
args = args.map(function(x) {
if (x[0] == "-" && x[1] != "-")
return "-" + x;
return x;
});
}).filter(Boolean);
if (args[2] && (args[2][0] != "-" || args[2].indexOf("h") != -1))
type = args[2];
@ -66,22 +67,24 @@ function main(args) {
ace();
} else if (type == "demo") {
demo();
} else if (type == "bm") {
bookmarklet();
} else if (type == "full") {
demo(ace());
bookmarklet();
ace();
demo();
} else if (type == "highlighter") {
// TODO
}
}
}
function showHelp(type) {
console.log("--- Ace Dryice Build Tool ---");
console.log("");
console.log("Options:");
console.log(" minimal Places necessary Ace files out in build dir; uses configuration flags below [default]");
console.log(" normal Runs four Ace builds--minimal, minimal-noconflict, minimal-min, and minimal-noconflict-min");
console.log(" demo Runs demo build of Ace");
console.log(" bm Runs bookmarklet build of Ace");
console.log(" full all of above");
console.log(" minimal Places necessary Ace files out in build dir; uses configuration flags below [default]");
console.log(" normal Runs four Ace builds--minimal, minimal-noconflict, minimal-min, and minimal-noconflict-min");
console.log(" demo Runs demo build of Ace");
console.log(" full all of above");
console.log(" highlighter ");
console.log("args:");
console.log(" --target ./path path to build folder");
console.log("flags:");
@ -90,94 +93,34 @@ function main(args) {
console.log(" --nc namespace require");
console.log(" --s shrinkwrap (combines all output files into one)");
console.log("");
if (BUILD_DIR)
console.log(" output generated in " + type + __dirname + "/" + BUILD_DIR)
}
function bookmarklet() {
var targetDir = BUILD_DIR + "/textarea";
copy({
source: "build_support/editor_textarea.html",
dest: targetDir + '/editor.html'
});
copy({
source: "build_support/style.css",
dest: targetDir + '/style.css'
});
buildAce({
targetDir: targetDir + "/src",
ns: "__ace_shadowed__",
exportModule: "ace/ext/textarea",
compress: false,
noconflict: true,
suffix: "",
name: "ace-bookmarklet",
workers: [],
keybindings: []
});
if (type)
console.log(" output for " + type + " generated in " + BUILD_DIR);
}
function ace() {
console.log('# ace ---------');
// uncompressed
var project = buildAce({
compress: false,
noconflict: false
});
buildAce({
compress: false,
noconflict: true
});
// compressed
buildAce({
compress: true,
noconflict: false
});
buildAce({
compress: true,
noconflict: true
});
console.log('# ace License | Readme | Changelog ---------');
copy({
source: ACE_HOME + "/build_support/editor.html",
dest: BUILD_DIR + "/editor.html"
});
copy({
source: ACE_HOME + "/LICENSE",
dest: BUILD_DIR + "/LICENSE"
});
copy({
source: ACE_HOME + "/ChangeLog.txt",
dest: BUILD_DIR + "/ChangeLog.txt"
});
copy.file(ACE_HOME + "/build_support/editor.html", BUILD_DIR + "/editor.html");
copy.file(ACE_HOME + "/LICENSE", BUILD_DIR + "/LICENSE");
copy.file(ACE_HOME + "/ChangeLog.txt", BUILD_DIR + "/ChangeLog.txt");
return project;
console.log('# ace ---------');
for (var i = 0; i < 4; i++)
buildAce({compress: i & 2, noconflict: i & 1});
}
function demo(project) {
project = project || buildAce({
compress: false,
noconflict: false,
coreOnly: true
});
function demo() {
console.log('# kitchen sink ---------');
var version, ref;
var version = "", ref = "";
try {
version = JSON.parse(fs.readFileSync(ACE_HOME + "/package.json")).version;
ref = fs.readFileSync(ACE_HOME + "/.git-ref").toString();
} catch(e) {
ref = "";
version = "";
}
} catch(e) {}
function changeComments(data) {
return (data
.replace("doc/site/images/ace-logo.png", "demo/kitchen-sink/ace-logo.png")
.replace(/<!\-\-DEVEL[\d\D]*?DEVEL\-\->/g, "")
.replace(/PACKAGE\-\->|<!\-\-PACKAGE/g, "")
.replace(/\/\*DEVEL[\d\D]*?DEVEL\*\//g, "")
@ -185,49 +128,55 @@ function demo(project) {
.replace("%version%", version)
.replace("%commit%", ref)
);
};
function fixDocPaths(data) {
return data.replace(/"(demo|build)\//g, "\"");
}
copy({
source: ACE_HOME + "/kitchen-sink.html",
dest: BUILD_DIR + "/kitchen-sink.html",
filter: [changeComments, fixDocPaths]
});
copy({
source: ACE_HOME + "/demo/kitchen-sink/styles.css",
dest: BUILD_DIR + "/kitchen-sink/styles.css",
filter: [ changeComments ]
});
fs.readdirSync(ACE_HOME +"/demo/kitchen-sink/docs/").forEach(function(x) {
copy({
source: ACE_HOME +"/demo/kitchen-sink/docs/" + x,
dest: BUILD_DIR + "/kitchen-sink/docs/" + x
});
});
var demo = copy.createDataObject();
project.assumeAllFilesLoaded();
copy({
source: [{
project: cloneProject(project),
require: [ "kitchen-sink/demo" ]
}],
filter: getWriteFilters({filters:[fixDocPaths]}, "demo"),
dest: demo
});
copy(ACE_HOME +"/demo/kitchen-sink/docs/", BUILD_DIR + "/demo/kitchen-sink/docs/");
copy.file(ACE_HOME + "/demo/kitchen-sink/logo.png", BUILD_DIR + "/demo/kitchen-sink/logo.png");
copy.file(ACE_HOME + "/demo/kitchen-sink/styles.css", BUILD_DIR + "/demo/kitchen-sink/styles.css");
copy.file(ACE_HOME + "/kitchen-sink.html", BUILD_DIR + "/kitchen-sink.html", changeComments);
copy({
source: demo,
dest: BUILD_DIR + "/kitchen-sink/demo.js",
});
buildSubmodule({}, {
require: ["kitchen-sink/demo"],
projectType: "demo"
}, BUILD_DIR + "/demo/kitchen-sink/demo");
copyFileSync(ACE_HOME + "/demo/kitchen-sink/logo.png", BUILD_DIR + "/kitchen-sink/logo.png");
copy(ACE_HOME + "/demo/", BUILD_DIR + "/demo/", {
shallow: true,
exclude: /\s|requirejs/,
include: /\.(js|html)$/,
replace: function(source) {
if (!/^\s*</.test(source))
return source;
var removeRequireJS;
source = source.replace(/<script src="kitchen-sink\/require.js"[\s\S]+?require\(\[([^\]]+).*/, function(e, m) {
removeRequireJS = true;
var scripts = m.split(/,\s*/);
var result = [];
function comment(str) {result.push("<!-- " + str + " -->")}
function script(str) {result.push('<script src="../src/' + str + '.js"></script>')}
scripts.forEach(function(s) {
s = s.replace(/"/g, "");
if (s == "ace/ace") {
comment("load ace");
script("ace");
} else {
var extName = s.match(/[^/]*$/)[0];
comment("load ace " + extName + " extension");
script("ext-" + extName);
}
});
result.push("<script>");
return result.join("\n");
});
if (removeRequireJS)
source = source.replace(/\s*\}\);?\s*(<\/script>)/, "\n$1");
source = source.replace(/"\.\.\/build\//g, function(e) {
console.log(e); return '"../';
});
return source;
}
});
}
function jsFileList(path, filter) {
@ -236,369 +185,332 @@ function jsFileList(path, filter) {
filter = /_test/;
return fs.readdirSync(path).map(function(x) {
if (x.slice(-3) == ".js" && !filter.test(x) && !/\s/.test(x))
if (x.slice(-3) == ".js" && !filter.test(x) && !/\s|BASE|(\b|_)dummy(\b|_)/.test(x))
return x.slice(0, -3);
}).filter(function(x){ return !!x });
}).filter(Boolean);
}
function workers(path) {
return jsFileList(path).map(function(x) {
if (x.slice(-7) == "_worker")
return x.slice(0, -7);
}).filter(function(x) { return !!x; });
return jsFileList(path).map(function(x) {
if (x.slice(-7) == "_worker")
return x.slice(0, -7);
}).filter(function(x) { return !!x; });
}
function addSuffix(options) {
if (options.suffix == null) {
options.suffix = "";
if (options.compress)
options.suffix += "-min";
if (options.noconflict)
options.suffix += "-noconflict";
}
function modeList() {
return jsFileList("lib/ace/mode", /_highlight_rules|_test|_worker|xml_util|_outdent|behaviour|completions/);
}
function getWriteFilters(options, projectType) {
var filters = [
copy.filter.moduleDefines,
removeUseStrict,
removeLicenceComments,
inlineTextModules
];
if (options.filters)
filters = filters.concat(options.filters);
if (options.noconflict)
filters.push(namespace(options.ns));
if (options.compress)
filters.push(copy.filter.uglifyjs);
if (options.exportModule && projectType == "main") {
if (options.noconflict)
filters.push(exportAce(options.ns, options.exportModule, options.ns));
else
filters.push(exportAce(options.ns, options.exportModule));
}
return filters;
}
var buildAce = function(options) {
var aceProject = {
roots: [ACE_HOME + '/lib', ACE_HOME + '/demo'],
textPluginPattern: /^ace\/requirejs\/text!/
};
var defaults = {
targetDir: BUILD_DIR + "/src",
ns: "ace",
exportModule: "ace/ace",
requires: null,
compress: false,
noconflict: false,
suffix: null,
name: "ace",
modes: jsFileList("lib/ace/mode", /_highlight_rules|_test|_worker|xml_util|_outdent|behaviour/),
themes: jsFileList("lib/ace/theme"),
extensions: jsFileList("lib/ace/ext"),
workers: workers("lib/ace/mode"),
keybindings: ["vim", "emacs"]
};
for(var key in defaults)
if (!options.hasOwnProperty(key))
options[key] = defaults[key];
generateThemesModule(options.themes);
addSuffix(options);
if (!options.requires)
options.requires = [options.exportModule];
var targetDir = options.targetDir + options.suffix;
var name = options.name;
var project = copy.createCommonJsProject(aceProject);
var ace = copy.createDataObject();
copy({
source: [ACE_HOME + "/build_support/mini_require.js"],
dest: ace
});
copy({
source: [{
project: project,
require: options.requires
}],
filter: [ copy.filter.moduleDefines ],
dest: ace
});
if (options.coreOnly)
return project;
copy({
source: ace,
filter: getWriteFilters(options, "main"),
dest: targetDir + '/' + name + ".js"
});
console.log('# ace modes ---------');
project.assumeAllFilesLoaded();
options.modes.forEach(function(mode) {
console.log("mode " + mode);
copy({
source: [{
project: cloneProject(project),
require: [ 'ace/mode/' + mode ]
}],
filter: getWriteFilters(options, "mode"),
dest: targetDir + "/mode-" + mode + ".js"
});
});
console.log('# ace themes ---------');
project.assumeAllFilesLoaded();
options.themes.forEach(function(theme) {
console.log("theme " + theme);
copy({
source: [{
project: cloneProject(project),
require: ["ace/theme/" + theme]
}],
filter: getWriteFilters(options, "theme"),
dest: targetDir + "/theme-" + theme.replace("_theme", "") + ".js"
});
});
console.log('# ace extensions ---------');
project.assumeAllFilesLoaded();
options.extensions.forEach(function(ext) {
console.log("extensions " + ext);
copy({
source: [{
project: cloneProject(project),
require: [ 'ace/ext/' + ext ]
}],
filter: getWriteFilters(options, "ext"),
dest: targetDir + "/ext-" + ext + ".js"
});
});
console.log('# ace key bindings ---------');
// copy key bindings
project.assumeAllFilesLoaded();
options.keybindings.forEach(function(keybinding) {
copy({
source: [{
project: cloneProject(project),
require: [ 'ace/keyboard/' + keybinding ]
}],
filter: getWriteFilters(options, "keybinding"),
dest: targetDir + "/keybinding-" + keybinding + ".js"
});
});
console.log('# ace worker ---------');
options.workers.forEach(function(mode) {
console.log("worker for " + mode + " mode");
var worker = copy.createDataObject();
var workerProject = copy.createCommonJsProject({
roots: [ ACE_HOME + '/lib' ],
textPluginPattern: /^ace\/requirejs\/text!/
});
copy({
source: [{
project: workerProject,
require: [
'ace/worker/worker',
'ace/mode/' + mode + '_worker'
]
}],
filter: getWriteFilters(options, "worker"),
dest: worker
});
copy({
source: [
worker
],
filter: options.compress ? [copy.filter.uglifyjs] : [],
dest: targetDir + "/worker-" + mode + ".js"
});
});
if (options.shrinkwrap) {
console.log('# combining files into one ---------');
copy({
source: { root:targetDir, exclude:/(^|\\|\/)worker\-[^\\\/]*\.js$/ },
dest: BUILD_DIR + '/ace-min.js'
});
}
return project;
};
// silence annoying messages from dryice
var buildAce = function(fn) {
return function() {
var log = console.log
console.log = function() {
if (typeof arguments[0] == "string" && /Ignoring requirement/.test(arguments[0]))
return;
log.apply(console, arguments);
}
var ret = fn.apply(null, arguments);
console.log = log;
return ret;
}
}(buildAce);
var textModules = {}
var detectTextModules = function(input, source) {
if (!source)
throw new Error('Missing filename for text module');
if (typeof input !== 'string')
input = input.toString();
var module = source.isLocation ? source.path : source;
input = input.replace(/\\/g, "\\\\").replace(/"/g, '\\"');
if (/\.css$/.test(module)) {
// remove unnecessary whitespace from css
input = input.replace(/\n\s+/g, "\n");
input = '"' + input.replace(/\r?\n/g, '\\\n') + '"';
} else {
// but don't break other files!
input = '"' + input.replace(/\r?\n/g, '\\n\\\n') + '"';
}
textModules[module] = input;
return "";
};
detectTextModules.onRead = true;
copy.filter.addDefines = detectTextModules;
function generateThemesModule(themes) {
var themelist = [
'define(function(require, exports, module) {',
'\n\nmodule.exports.themes = ' + JSON.stringify(themes, null, ' '),
';\n\n});'
].join('');
fs.writeFileSync('./lib/ace/ext/themelist_utils/themes.js', themelist, 'utf8');
}
function inlineTextModules(text) {
var lastDep = "";
return text.replace(/, *['"]ace\/requirejs\/text!(.*?)['"]|= *require\(['"](?:ace|[.\/]+)\/requirejs\/text!(.*?)['"]\)/g, function(_, dep, call) {
if (dep) {
if (!lastDep) {
lastDep = dep;
return "";
}
} else if (call) {
call = textModules[lastDep];
delete textModules[lastDep];
lastDep = "";
function buildAceModule(opts, callback) {
// calling buildAceModuleInternal many times in parallel is slow, so we use queue
if (!buildAceModule.queue) {
buildAceModule.queue = [];
buildAceModule.dequeue = function() {
if (buildAceModule.running) return;
var call = buildAceModule.queue.shift();
buildAceModule.running = call;
if (call)
return "= " + call;
}
console.log(dep, lastDep, call);
throw "inlining of multiple text modules is not supported";
});
}
// TODO: replace with project.clone once it is fixed in dryice
function cloneProject(project) {
var clone = copy.createCommonJsProject({
roots: project.roots,
ignores: project.ignoreRequires,
textPluginPattern: project.textPluginPattern
});
Object.keys(project.currentModules).forEach(function(module) {
clone.currentModules[module] = project.currentModules[module];
});
Object.keys(project.ignoredModules).forEach(function(module) {
clone.ignoredModules[module] = project.ignoredModules[module];
});
return clone;
}
function copyFileSync(srcFile, destFile) {
var BUF_LENGTH = 64*1024,
buf = new Buffer(BUF_LENGTH),
bytesRead = BUF_LENGTH,
pos = 0,
fdr = null,
fdw = null;
fdr = fs.openSync(srcFile, 'r');
fdw = fs.openSync(destFile, 'w');
while (bytesRead === BUF_LENGTH) {
bytesRead = fs.readSync(fdr, buf, 0, BUF_LENGTH, pos);
fs.writeSync(fdw, buf, 0, bytesRead);
pos += bytesRead;
buildAceModuleInternal.apply(null, call);
};
}
buildAceModule.queue.push([opts, function(err, result) {
callback && callback(err, result);
buildAceModule.running = null;
buildAceModule.dequeue();
}]);
fs.closeSync(fdr);
fs.closeSync(fdw);
if (!buildAceModule.running) {
buildAceModule.dequeue();
} else {
process.nextTick(buildAceModule.dequeue);
}
}
function quoteString(str) {
return '"' + str.replace(/\\/, "\\\\").replace(/"/g, '\\"').replace(/\n/g, "\\\n") + '"';
function buildAceModuleInternal(opts, callback) {
var cache = opts.cache == undefined ? CACHE : opts.cache;
var key = opts.require + "|" + opts.projectType;
if (cache && cache.configs && cache.configs[key])
return write(null, cache.configs[key]);
var pathConfig = {
paths: {
ace: ACE_HOME + "/lib/ace",
"kitchen-sink": ACE_HOME + "/demo/kitchen-sink",
build_support: ACE_HOME + "/build_support",
},
root: ACE_HOME
};
function write(err, result) {
if (cache && key && !(cache.configs && cache.configs[key])) {
cache.configs = cache.configs || Object.create(null);
cache.configs[key] = result;
result.sources = result.sources.map(function(pkg) {
return {deps: pkg.deps};
});
}
if (!opts.outputFile)
return callback(err, result);
var code = result.code;
if (opts.compress) {
if (!result.codeMin)
result.codeMin = compress(result.code);
code = result.codeMin;
}
var targetDir = BUILD_DIR + "/src";
if (opts.compress)
targetDir += "-min";
if (opts.noconflict)
targetDir += "-noconflict";
var to = /^([\\/]|\w:)/.test(opts.outputFile)
? opts.outputFile
: path.join(opts.outputFolder || targetDir, opts.outputFile);
var filters = [];
var ns = opts.ns || "ace";
if (opts.filters)
filters = filters.concat(opts.filters);
if (opts.noconflict)
filters.push(namespace(ns));
var projectType = opts.projectType;
if (projectType == "main" || projectType == "ext") {
filters.push(exportAce(ns, opts.require[0],
opts.noconflict ? ns : "", projectType == "ext"));
}
filters.forEach(function(f) { code = f(code); });
build.writeToFile({code: code}, {
outputFolder: path.dirname(to),
outputFile: path.basename(to),
}, function() {});
callback && callback(err, result);
}
build(opts.require, {
cache: cache,
quiet: opts.quiet,
pathConfig: pathConfig,
additional: opts.additional,
enableBrowser: true,
keepDepArrays: "all",
noArchitect: true,
compress: false,
ignore: opts.ignore || [],
withRequire: false,
basepath: ACE_HOME,
transforms: [normalizeLineEndings],
afterRead: [optimizeTextModules]
}, write);
}
function removeUseStrict(text) {
return text.replace(/['"]use strict['"];/g, "");
function buildCore(options, extra, callback) {
options = extend(extra, options);
options.additional = [{
id: "build_support/mini_require",
order: -1000,
literal: true
}];
options.require =["ace/ace"];
options.projectType = "main";
options.ns = "ace";
buildAceModule(options, callback);
}
function removeLicenceComments(text) {
return text.replace(/(?:(;)|\n)\s*\/\*[\d\D]*?\*\/|\n\s*\/\/.*/g, "$1");
function buildSubmodule(options, extra, file, callback) {
options = extend(extra, options);
getLoadedFileList(options, function(coreFiles) {
options.outputFile = file + ".js";
options.ignore = options.ignore || coreFiles;
options.quiet = true;
buildAceModule(options, callback);
});
}
function buildAce(options) {
var snippetFiles = jsFileList("lib/ace/snippets");
var modeNames = modeList();
buildCore(options, {outputFile: "ace.js"}),
// modes
modeNames.forEach(function(name) {
buildSubmodule(options, {
projectType: "mode",
require: ["ace/mode/" + name]
}, "mode-" + name);
});
// snippets
modeNames.forEach(function(name) {
if (snippetFiles.indexOf(name + ".js") == -1)
addSnippetFile(name);
buildSubmodule(options, {
require: ["ace/snippets/" + name],
}, "snippets/" + name);
});
// themes
jsFileList("lib/ace/theme").forEach(function(name) {
buildSubmodule(options, {
projectType: "theme",
require: ["ace/theme/" + name]
}, "theme-" + name);
});
// keybindings
["vim", "emacs"].forEach(function(name) {
buildSubmodule(options, {
projectType: "keybinding",
require: ["ace/keyboard/" + name ]
}, "keybinding-" + name);
});
// extensions
jsFileList("lib/ace/ext").forEach(function(name) {
buildSubmodule(options, {
projectType: "ext",
require: ["ace/ext/" + name]
}, "ext-" + name);
});
// workers
workers("lib/ace/mode").forEach(function(name) {
buildSubmodule(options, {
projectType: "worker",
require: ["ace/mode/" + name + "_worker"],
ignore: [],
additional: [{
id: "ace/worker/worker",
transforms: [],
order: -1000
}],
}, "worker-" + name);
});
}
function getLoadedFileList(options, callback, result) {
if (!result) {
return buildCore({}, {}, function(e, result) {
getLoadedFileList(options, callback, result);
});
}
var deps = Object.create(null);
result.sources.forEach(function(pkg) {
pkg.deps && pkg.deps.forEach(function(p) {
if (!deps[p]) deps[p] = 1;
});
});
delete deps["ace/theme/textmate"];
callback(Object.keys(deps));
}
function normalizeLineEndings(module) {
module.source = module.source.replace(/\r\n/g, "\n");
}
function optimizeTextModules(sources) {
var textModules = {};
return sources.filter(function(pkg) {
if (!pkg.id) {
return true;
}
else if (pkg.id.indexOf("text!") > -1) {
detectTextModules(pkg);
return false;
}
else {
pkg.source = rewriteTextImports(pkg.source, pkg.deps);
return true;
}
}).map(function(pkg) {
if (pkg && pkg.deps) {
pkg.deps = pkg.deps && pkg.deps.filter(function(p) {
return p.indexOf("text!") == -1;
});
}
return pkg;
});
function rewriteTextImports(text, deps) {
return text.replace(/ require\(['"](?:ace|[.\/]+)\/requirejs\/text!(.*?)['"]\)/g, function(_, call) {
if (call) {
var dep;
deps.some(function(d) {
if (d.split("/").pop() == call.split("/").pop()) {
dep = d;
return true;
}
});
call = textModules[dep];
if (call)
return " " + call;
}
});
}
function detectTextModules(pkg) {
var input = pkg.source.replace(/\\/g, "\\\\").replace(/"/g, '\\"');
if (/\.css$/.test(pkg.id)) {
// remove unnecessary whitespace from css
input = input.replace(/\n\s+/g, "\n");
input = '"' + input.replace(/\n/g, '\\\n') + '"';
} else {
// but don't break other files!
input = '"' + input.replace(/\n/g, '\\n\\\n') + '"';
}
textModules[pkg.id] = input;
}
}
function namespace(ns) {
return function(text) {
text = text
.toString()
.replace('var ACE_NAMESPACE = "";', 'var ACE_NAMESPACE = "' + ns +'";')
.replace(/\bdefine\(/g, ns + ".define(");
.replace(/ACE_NAMESPACE\s*=\s*""/, 'ACE_NAMESPACE = "' + ns +'"')
.replace(/(\.define)|\bdefine\(/g, function(_, a) {
return a || ns + ".define(";
});
return text;
};
}
function exportAce(ns, module, requireBase) {
function exportAce(ns, modules, requireBase, extModules) {
requireBase = requireBase || "window";
module = module || "ace/ace";
return function(text) {
/*globals REQUIRE_NS, MODULES, NS*/
var template = function() {
(function() {
REQUIRE_NS.require(["MODULE"], function(a) {
a && a.config.init();
REQUIRE_NS.require(MODULES, function(a) {
a && a.config.init(true);
if (!window.NS)
window.NS = {};
window.NS = a;
for (var key in a) if (a.hasOwnProperty(key))
NS[key] = a[key];
window.NS[key] = a[key];
});
})();
};
return (text + ";" + template
if (extModules) {
template = function() {
(function() {
REQUIRE_NS.require(MODULES, function() {});
})();
};
}
text = text.replace(/function init\(packaged\) {/, "init(true);$&\n");
if (typeof modules == "string")
modules = [modules];
return (text.replace(/;\s*$/, "") + ";" + template
.toString()
.replace(/MODULE/g, module)
.replace(/MODULES/g, JSON.stringify(modules))
.replace(/REQUIRE_NS/g, requireBase)
.replace(/NS/g, ns)
.slice(13, -1)
@ -606,6 +518,53 @@ function exportAce(ns, module, requireBase) {
};
}
function updateModes() {
modeList().forEach(function(m) {
var filepath = __dirname + "/lib/ace/mode/" + m + ".js";
var source = fs.readFileSync(filepath, "utf8");
if (!/this.\$id\s*=\s*"/.test(source))
source = source.replace(/\n([ \t]*)(\}\).call\(\w*Mode.prototype\))/, '\n$1 this.$id = "";\n$1$2');
source = source.replace(/(this.\$id\s*=\s*)"[^"]*"/, '$1"ace/mode/' + m + '"');
fs.writeFileSync(filepath, source, "utf8");
});
}
function generateThemesModule(themes) {
var themelist = [
'define(function(require, exports, module) {',
'\n\nmodule.exports.themes = ' + JSON.stringify(themes, null, ' '),
';\n\n});'
].join('');
fs.writeFileSync(__dirname + '/lib/ace/ext/themelist_utils/themes.js', themelist, 'utf8');
}
function addSnippetFile(modeName) {
var snippetFilePath = ACE_HOME + "/lib/ace/snippets/" + modeName;
if (!fs.existsSync(snippetFilePath + ".js")) {
copy.file(ACE_HOME + "/tool/templates/snippets.js", snippetFilePath + ".js", function(t) {
return t.replace(/%modeName%/g, modeName);
});
}
if (!fs.existsSync(snippetFilePath + ".snippets")) {
fs.writeFileSync(snippetFilePath + ".snippets", "");
}
}
function compress(text) {
var ujs = require("dryice").copy.filter.uglifyjs;
ujs.options.mangle_toplevel = {except: ["ACE_NAMESPACE", "requirejs"]};
ujs.options.beautify = {ascii_only: true, inline_script: true}
return ujs(text);
}
function extend(base, extra) {
Object.keys(extra).forEach(function(k) {
base[k] = extra[k];
});
return base;
}
if (!module.parent)
main(process.argv);
else

View file

@ -1,14 +1,14 @@
Ace (Ajax.org Cloud9 Editor)
============================
_Note_: The new site at http://ace.ajax.org contains all the info below along with an embedding guide and all the other resources you need to get started with Ace.
_Note_: The new site at http://ace.c9.io contains all the info below along with an embedding guide and all the other resources you need to get started with Ace.
Ace is a standalone code editor written in JavaScript. Our goal is to create a browser based editor that matches and extends the features, usability and performance of existing native editors such as TextMate, Vim or Eclipse. It can be easily embedded in any web page or JavaScript application. Ace is developed as the primary editor for [Cloud9 IDE](http://www.cloud9ide.com/) and the successor of the Mozilla Skywriter (Bespin) Project.
Ace is a standalone code editor written in JavaScript. Our goal is to create a browser based editor that matches and extends the features, usability and performance of existing native editors such as TextMate, Vim or Eclipse. It can be easily embedded in any web page or JavaScript application. Ace is developed as the primary editor for [Cloud9 IDE](https://c9.io/) and the successor of the Mozilla Skywriter (Bespin) Project.
Features
--------
* Syntax highlighting for over 40 languages (TextMate/Sublime/_.tmlanguage_ files can be imported)
* Syntax highlighting for over 110 languages (TextMate/Sublime/_.tmlanguage_ files can be imported)
* Over 20 themes (TextMate/Sublime/_.tmtheme_ files can be imported)
* Automatic indent and outdent
* An optional command line
@ -28,9 +28,9 @@ Features
Take Ace for a spin!
--------------------
Check out the Ace live [demo](http://ajaxorg.github.com/ace/build/kitchen-sink.html) or get a [Cloud9 IDE account](http://c9.io) to experience Ace while editing one of your own GitHub projects.
Check out the Ace live [demo](http://ace.c9.io/build/kitchen-sink.html) or get a [Cloud9 IDE account](https://c9.io/) to experience Ace while editing one of your own GitHub projects.
If you want, you can use Ace as a textarea replacement thanks to the [Ace Bookmarklet](http://ajaxorg.github.com/ace/build/textarea/editor.html).
If you want, you can use Ace as a textarea replacement thanks to the [Ace Bookmarklet](http://ajaxorg.github.io/ace/build/demo/bookmarklet/index.html).
Embedding Ace
-------------
@ -79,16 +79,16 @@ By default the editor only supports plain text mode; many other languages are av
The mode can then be used like this:
```javascript
var JavaScriptMode = require("ace/mode/javascript").Mode;
var JavaScriptMode = ace.require("ace/mode/javascript").Mode;
editor.getSession().setMode(new JavaScriptMode());
```
Documentation
-------------
Additional usage information, including events to listen to and extending syntax highlighters, can be found [on the main Ace website](http://ace.ajax.org).
Additional usage information, including events to listen to and extending syntax highlighters, can be found [on the main Ace website](http://ace.c9.io).
You can also find API documentation at [http://ajaxorg.github.com/ace/api/index.html](http://ajaxorg.github.com/ace/api/index.html).
You can also find API documentation at [http://ace.c9.io/#nav=api](http://ace.c9.io/#nav=api).
Also check out the sample code for the kitchen sink [demo app](https://github.com/ajaxorg/ace/blob/master/demo/kitchen-sink/demo.js).
@ -112,7 +112,7 @@ Or using Node.JS
The editor can then be opened at http://localhost:8888/kitchen-sink.html.
To open the editor with a file:/// URL see [the wiki](https://github.com/ajaxorg/ace/wiki/Running-Ace-from-a-file:).
To open the editor with a file:/// URL see [the wiki](https://github.com/ajaxorg/ace/wiki/Running-Ace-from-file).
Building Ace
-----------

View file

@ -243,7 +243,7 @@
</ul>
</div>
<div class="sideToggler">
<div id="ellipsis_Document.getAllLines" class="ellipsis_description"><p>Returns all lines in the document as string array. Warning: The caller should not modify this array!</p>
<div id="ellipsis_Document.getAllLines" class="ellipsis_description"><p>Returns all lines in the document as string array.</p>
</div>
<div class="description"><p>Returns all lines in the document as string array. Warning: The caller should not modify this array!</p>

View file

@ -390,8 +390,8 @@
</div>
<div class="description"><p>Creates a new <code>Editor</code> object.</p>
<h4>Arguments</h4><table class="argumentTable argument-list table table-striped table-bordered"><tr class="argumentRow "><td class="argName ">renderer</td><td class="argType" "><a href="virtual_renderer.html" class="" title="VirtualRenderer (class)" data-id="VirtualRenderer">VirtualRenderer</a></td><td class="argDescription "><p>Required. Associated <code>VirtualRenderer</code> that draws everything</p>
</td></tr><tr class="argumentRow "><td class="argName ">session</td><td class="argType" "><a href="edit_session.html" class="" title="EditSession (class)" data-id="EditSession">EditSession</a></td><td class="argDescription "><p>Required. The <code>EditSession</code> to refer to</p>
<h4>Arguments</h4><table class="argumentTable argument-list table table-striped table-bordered"><tr class="argumentRow "><td class="argName ">renderer</td><td class="argType"><a href="virtual_renderer.html" class="" title="VirtualRenderer (class)" data-id="VirtualRenderer">VirtualRenderer</a></td><td class="argDescription "><p>Required. Associated <code>VirtualRenderer</code> that draws everything</p>
</td></tr><tr class="argumentRow "><td class="argName ">session</td><td class="argType"><a href="edit_session.html" class="" title="EditSession (class)" data-id="EditSession">EditSession</a></td><td class="argDescription "><p>Required. The <code>EditSession</code> to refer to</p>
</td></tr></table>
</div>
</div>
@ -444,7 +444,7 @@
</div>
<div class="description"><p>Emitted whenever the document is changed.</p>
<h4>Arguments</h4><table class="argumentTable argument-list table table-striped table-bordered"><tr class="argumentRow "><td class="argName ">e</td><td class="argType" "><a href="https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Object" class="" title="Object" data-id="Object">Object</a></td><td class="argDescription "><p>Required. Contains a single property, <code>data</code>, which has the delta of changes</p>
<h4>Arguments</h4><table class="argumentTable argument-list table table-striped table-bordered"><tr class="argumentRow "><td class="argName ">e</td><td class="argType"><a href="https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Object" class="" title="Object" data-id="Object">Object</a></td><td class="argDescription "><p>Required. Contains a single property, <code>data</code>, which has the delta of changes</p>
</td></tr></table>
</div>
</div>
@ -471,7 +471,7 @@
</div>
<div class="description"><p>Emitted when the selection style changes, via <a href="#Editor.setSelectionStyle" class="link-short" title="Editor.setSelectionStyle (class method)" data-id="Editor.setSelectionStyle"><code>Editor.setSelectionStyle()</code></a>.</p>
<h4>Arguments</h4><table class="argumentTable argument-list table table-striped table-bordered"><tr class="argumentRow "><td class="argName ">data</td><td class="argType" "><a href="https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Object" class="" title="Object" data-id="Object">Object</a></td><td class="argDescription "><p>Required. Contains one property, <code>data</code>, which indicates the new selection style</p>
<h4>Arguments</h4><table class="argumentTable argument-list table table-striped table-bordered"><tr class="argumentRow "><td class="argName ">data</td><td class="argType"><a href="https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Object" class="" title="Object" data-id="Object">Object</a></td><td class="argDescription "><p>Required. Contains one property, <code>data</code>, which indicates the new selection style</p>
</td></tr></table>
</div>
</div>
@ -498,7 +498,7 @@
</div>
<div class="description"><p>Emitted whenever the <a href="edit_session.html" class="link-short" title="EditSession (class)" data-id="EditSession"><code>EditSession</code></a> changes.</p>
<h4>Arguments</h4><table class="argumentTable argument-list table table-striped table-bordered"><tr class="argumentRow "><td class="argName ">e</td><td class="argType" "><a href="https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Object" class="" title="Object" data-id="Object">Object</a></td><td class="argDescription "><p>Required. An object with two properties, <code>oldSession</code> and <code>session</code>, that represent the old and new <a href="edit_session.html" class="link-short" title="EditSession (class)" data-id="EditSession"><code>EditSession</code></a>s.</p>
<h4>Arguments</h4><table class="argumentTable argument-list table table-striped table-bordered"><tr class="argumentRow "><td class="argName ">e</td><td class="argType"><a href="https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Object" class="" title="Object" data-id="Object">Object</a></td><td class="argDescription "><p>Required. An object with two properties, <code>oldSession</code> and <code>session</code>, that represent the old and new <a href="edit_session.html" class="link-short" title="EditSession (class)" data-id="EditSession"><code>EditSession</code></a>s.</p>
</td></tr></table>
</div>
</div>
@ -525,7 +525,7 @@
</div>
<div class="description"><p>Emitted when text is copied.</p>
<h4>Arguments</h4><table class="argumentTable argument-list table table-striped table-bordered"><tr class="argumentRow "><td class="argName ">text</td><td class="argType" "><a href="https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/String" class="" title="String" data-id="String">String</a></td><td class="argDescription "><p>Required. The copied text</p>
<h4>Arguments</h4><table class="argumentTable argument-list table table-striped table-bordered"><tr class="argumentRow "><td class="argName ">text</td><td class="argType"><a href="https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/String" class="" title="String" data-id="String">String</a></td><td class="argDescription "><p>Required. The copied text</p>
</td></tr></table>
</div>
</div>
@ -564,7 +564,7 @@
<ul class="signatures">
<li class="signature">
<ul>
<li class="signature-call"><span class="eventObjName">Editor</span><span class="eventListenerStart">.on("</span><span id="Editor.event.paste" class="member-name eventMember methodClicker">paste</span><span class="eventListenerClose">", </span><span class="eventFunctionOpen">function(</span><a href="https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/String" class="argument methodClicker" title="String" data-id="String">String</a> text<span class="eventFunctionClose">))</span></li>
<li class="signature-call"><span class="eventObjName">Editor</span><span class="eventListenerStart">.on("</span><span id="Editor.event.paste" class="member-name eventMember methodClicker">paste</span><span class="eventListenerClose">", </span><span class="eventFunctionOpen">function(</span><a href="https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Object" class="argument methodClicker" title="Object" data-id="Object">Object</a> e<span class="eventFunctionClose">))</span></li>
</ul>
<ul class="metaInfo">
</ul>
@ -577,7 +577,7 @@
</div>
<div class="description"><p>Emitted when text is pasted.</p>
<h4>Arguments</h4><table class="argumentTable argument-list table table-striped table-bordered"><tr class="argumentRow "><td class="argName ">text</td><td class="argType" "><a href="https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/String" class="" title="String" data-id="String">String</a></td><td class="argDescription "><p>Required. The pasted text</p>
<h4>Arguments</h4><table class="argumentTable argument-list table table-striped table-bordered"><tr class="argumentRow "><td class="argName ">e</td><td class="argType"><a href="https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Object" class="" title="Object" data-id="Object">Object</a></td><td class="argDescription "><p>Required. An object which contains one property, <code>text</code>, that represents the text to be pasted. Editing this property will alter the text that is pasted.</p>
</td></tr></table>
</div>
</div>
@ -610,7 +610,7 @@
</div>
<div class="description"><p>Adds the selection and cursor.</p>
<h4>Arguments</h4><table class="argumentTable argument-list table table-striped table-bordered"><tr class="argumentRow "><td class="argName ">orientedRange</td><td class="argType" "><a href="range.html" class="" title="Range (class)" data-id="Range">Range</a></td><td class="argDescription "><p>Required. A range containing a cursor</p>
<h4>Arguments</h4><table class="argumentTable argument-list table table-striped table-bordered"><tr class="argumentRow "><td class="argName ">orientedRange</td><td class="argType"><a href="range.html" class="" title="Range (class)" data-id="Range">Range</a></td><td class="argDescription "><p>Required. A range containing a cursor</p>
</td></tr></table>
</div>
</div>
@ -920,9 +920,9 @@
</div>
<div class="description"><p>Attempts to find <code>needle</code> within the document. For more information on <code>options</code>, see <a href="search.html" class="link-short" title="Search (class)" data-id="Search"><code>Search</code></a>.</p>
<h4>Arguments</h4><table class="argumentTable argument-list table table-striped table-bordered"><tr class="argumentRow "><td class="argName ">needle</td><td class="argType" "><a href="https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/String" class="" title="String" data-id="String">String</a></td><td class="argDescription "><p>Required. The text to search for (optional)</p>
</td></tr><tr class="argumentRow "><td class="argName ">options</td><td class="argType" "><a href="https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Object" class="" title="Object" data-id="Object">Object</a></td><td class="argDescription "><p>Required. An object defining various search properties</p>
</td></tr><tr class="argumentRow "><td class="argName ">animate</td><td class="argType" "><a href="https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Boolean" class="" title="Boolean" data-id="Boolean">Boolean</a></td><td class="argDescription "><p>Required. If <code>true</code> animate scrolling</p>
<h4>Arguments</h4><table class="argumentTable argument-list table table-striped table-bordered"><tr class="argumentRow "><td class="argName ">needle</td><td class="argType"><a href="https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/String" class="" title="String" data-id="String">String</a></td><td class="argDescription "><p>Required. The text to search for (optional)</p>
</td></tr><tr class="argumentRow "><td class="argName ">options</td><td class="argType"><a href="https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Object" class="" title="Object" data-id="Object">Object</a></td><td class="argDescription "><p>Required. An object defining various search properties</p>
</td></tr><tr class="argumentRow "><td class="argName ">animate</td><td class="argType"><a href="https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Boolean" class="" title="Boolean" data-id="Boolean">Boolean</a></td><td class="argDescription "><p>Required. If <code>true</code> animate scrolling</p>
</td></tr></table>
</div>
</div>
@ -954,9 +954,9 @@
</div>
<div class="description"><p>Finds and selects all the occurences of <code>needle</code>.</p>
<h4>Arguments</h4><table class="argumentTable argument-list table table-striped table-bordered"><tr class="argumentRow "><td class="argName ">The</td><td class="argType" "><a href="https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/String" class="" title="String" data-id="String">String</a></td><td class="argDescription "><p>Required. text to find</p>
</td></tr><tr class="argumentRow "><td class="argName ">The</td><td class="argType" "><a href="https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Object" class="" title="Object" data-id="Object">Object</a></td><td class="argDescription "><p>Required. search options</p>
</td></tr><tr class="argumentRow "><td class="argName ">keeps</td><td class="argType" "><a href="https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Boolean" class="" title="Boolean" data-id="Boolean">Boolean</a></td><td class="argDescription "><p>Required. </p>
<h4>Arguments</h4><table class="argumentTable argument-list table table-striped table-bordered"><tr class="argumentRow "><td class="argName ">The</td><td class="argType"><a href="https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/String" class="" title="String" data-id="String">String</a></td><td class="argDescription "><p>Required. text to find</p>
</td></tr><tr class="argumentRow "><td class="argName ">The</td><td class="argType"><a href="https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Object" class="" title="Object" data-id="Object">Object</a></td><td class="argDescription "><p>Required. search options</p>
</td></tr><tr class="argumentRow "><td class="argName ">keeps</td><td class="argType"><a href="https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Boolean" class="" title="Boolean" data-id="Boolean">Boolean</a></td><td class="argDescription "><p>Required. </p>
</td></tr></table>
</div>
</div>
@ -983,8 +983,8 @@
</div>
<div class="description"><p>Performs another search for <code>needle</code> in the document. For more information on <code>options</code>, see <a href="search.html" class="link-short" title="Search (class)" data-id="Search"><code>Search</code></a>.</p>
<h4>Arguments</h4><table class="argumentTable argument-list table table-striped table-bordered"><tr class="argumentRow "><td class="argName ">options</td><td class="argType" "><a href="https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Object" class="" title="Object" data-id="Object">Object</a></td><td class="argDescription "><p>Required. search options</p>
</td></tr><tr class="argumentRow "><td class="argName ">animate</td><td class="argType" "><a href="https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Boolean" class="" title="Boolean" data-id="Boolean">Boolean</a></td><td class="argDescription "><p>Required. If <code>true</code> animate scrolling</p>
<h4>Arguments</h4><table class="argumentTable argument-list table table-striped table-bordered"><tr class="argumentRow "><td class="argName ">options</td><td class="argType"><a href="https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Object" class="" title="Object" data-id="Object">Object</a></td><td class="argDescription "><p>Required. search options</p>
</td></tr><tr class="argumentRow "><td class="argName ">animate</td><td class="argType"><a href="https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Boolean" class="" title="Boolean" data-id="Boolean">Boolean</a></td><td class="argDescription "><p>Required. If <code>true</code> animate scrolling</p>
</td></tr></table>
</div>
</div>
@ -1011,8 +1011,8 @@
</div>
<div class="description"><p>Performs a search for <code>needle</code> backwards. For more information on <code>options</code>, see <a href="search.html" class="link-short" title="Search (class)" data-id="Search"><code>Search</code></a>.</p>
<h4>Arguments</h4><table class="argumentTable argument-list table table-striped table-bordered"><tr class="argumentRow "><td class="argName ">options</td><td class="argType" "><a href="https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Object" class="" title="Object" data-id="Object">Object</a></td><td class="argDescription "><p>Required. search options</p>
</td></tr><tr class="argumentRow "><td class="argName ">animate</td><td class="argType" "><a href="https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Boolean" class="" title="Boolean" data-id="Boolean">Boolean</a></td><td class="argDescription "><p>Required. If <code>true</code> animate scrolling</p>
<h4>Arguments</h4><table class="argumentTable argument-list table table-striped table-bordered"><tr class="argumentRow "><td class="argName ">options</td><td class="argType"><a href="https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Object" class="" title="Object" data-id="Object">Object</a></td><td class="argDescription "><p>Required. search options</p>
</td></tr><tr class="argumentRow "><td class="argName ">animate</td><td class="argType"><a href="https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Boolean" class="" title="Boolean" data-id="Boolean">Boolean</a></td><td class="argDescription "><p>Required. If <code>true</code> animate scrolling</p>
</td></tr></table>
</div>
</div>
@ -1064,8 +1064,8 @@
</div>
<div class="description"><p>Executes a command for each selection range.</p>
<h4>Arguments</h4><table class="argumentTable argument-list table table-striped table-bordered"><tr class="argumentRow "><td class="argName ">cmd</td><td class="argType" "><a href="https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/String" class="" title="String" data-id="String">String</a></td><td class="argDescription "><p>Required. The command to execute</p>
</td></tr><tr class="argumentRow "><td class="argName ">args</td><td class="argType" "><a href="https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/String" class="" title="String" data-id="String">String</a></td><td class="argDescription "><p>Required. Any arguments for the command</p>
<h4>Arguments</h4><table class="argumentTable argument-list table table-striped table-bordered"><tr class="argumentRow "><td class="argName ">cmd</td><td class="argType"><a href="https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/String" class="" title="String" data-id="String">String</a></td><td class="argDescription "><p>Required. The command to execute</p>
</td></tr><tr class="argumentRow "><td class="argName ">args</td><td class="argType"><a href="https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/String" class="" title="String" data-id="String">String</a></td><td class="argDescription "><p>Required. Any arguments for the command</p>
</td></tr></table>
</div>
</div>
@ -1523,8 +1523,8 @@
</div>
<div class="description"><p>Works like <a href="#nav=api&api=edit_session" class="link-short" title="EditSession.getTokenAt (class method)" data-id="EditSession.getTokenAt"><code>EditSession.getTokenAt()</code></a>, except it returns a number.</p>
<h4>Arguments</h4><table class="argumentTable argument-list table table-striped table-bordered"><tr class="argumentRow "><td class="argName ">row</td><td class="argType" "><a href="https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Object" class="" title="Object" data-id="Object">Object</a></td><td class="argDescription "><p>Required. </p>
</td></tr><tr class="argumentRow "><td class="argName ">column</td><td class="argType" "><a href="https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Object" class="" title="Object" data-id="Object">Object</a></td><td class="argDescription "><p>Required. </p>
<h4>Arguments</h4><table class="argumentTable argument-list table table-striped table-bordered"><tr class="argumentRow "><td class="argName ">row</td><td class="argType"><a href="https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Object" class="" title="Object" data-id="Object">Object</a></td><td class="argDescription "><p>Required. </p>
</td></tr><tr class="argumentRow "><td class="argName ">column</td><td class="argType"><a href="https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Object" class="" title="Object" data-id="Object">Object</a></td><td class="argDescription "><p>Required. </p>
</td></tr></table>
</div>
</div>
@ -1966,9 +1966,9 @@
</div>
<div class="description"><p>Moves the cursor to the specified line number, and also into the indiciated column.</p>
<h4>Arguments</h4><table class="argumentTable argument-list table table-striped table-bordered"><tr class="argumentRow "><td class="argName ">lineNumber</td><td class="argType" "><a href="https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Number" class="" title="Number" data-id="Number">Number</a></td><td class="argDescription "><p>Required. The line number to go to</p>
</td></tr><tr class="argumentRow "><td class="argName ">column</td><td class="argType" "><a href="https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Number" class="" title="Number" data-id="Number">Number</a></td><td class="argDescription "><p>Required. A column number to go to</p>
</td></tr><tr class="argumentRow "><td class="argName ">animate</td><td class="argType" "><a href="https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Boolean" class="" title="Boolean" data-id="Boolean">Boolean</a></td><td class="argDescription "><p>Required. If <code>true</code> animates scolling</p>
<h4>Arguments</h4><table class="argumentTable argument-list table table-striped table-bordered"><tr class="argumentRow "><td class="argName ">lineNumber</td><td class="argType"><a href="https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Number" class="" title="Number" data-id="Number">Number</a></td><td class="argDescription "><p>Required. The line number to go to</p>
</td></tr><tr class="argumentRow "><td class="argName ">column</td><td class="argType"><a href="https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Number" class="" title="Number" data-id="Number">Number</a></td><td class="argDescription "><p>Required. A column number to go to</p>
</td></tr><tr class="argumentRow "><td class="argName ">animate</td><td class="argType"><a href="https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Boolean" class="" title="Boolean" data-id="Boolean">Boolean</a></td><td class="argDescription "><p>Required. If <code>true</code> animates scolling</p>
</td></tr></table>
</div>
</div>
@ -2070,7 +2070,7 @@
</div>
<div class="description"><p>Inserts <code>text</code> into wherever the cursor is pointing.</p>
<h4>Arguments</h4><table class="argumentTable argument-list table table-striped table-bordered"><tr class="argumentRow "><td class="argName ">text</td><td class="argType" "><a href="https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/String" class="" title="String" data-id="String">String</a></td><td class="argDescription "><p>Required. The new text to add</p>
<h4>Arguments</h4><table class="argumentTable argument-list table table-striped table-bordered"><tr class="argumentRow "><td class="argName ">text</td><td class="argType"><a href="https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/String" class="" title="String" data-id="String">String</a></td><td class="argDescription "><p>Required. The new text to add</p>
</td></tr></table>
</div>
</div>
@ -2132,7 +2132,7 @@
</div>
<div class="description"><p>Indicates if the entire row is currently visible on the screen.</p>
<h4>Arguments</h4><table class="argumentTable argument-list table table-striped table-bordered"><tr class="argumentRow "><td class="argName ">row</td><td class="argType" "><a href="https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Number" class="" title="Number" data-id="Number">Number</a></td><td class="argDescription "><p>Required. The row to check</p>
<h4>Arguments</h4><table class="argumentTable argument-list table table-striped table-bordered"><tr class="argumentRow "><td class="argName ">row</td><td class="argType"><a href="https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Number" class="" title="Number" data-id="Number">Number</a></td><td class="argDescription "><p>Required. The row to check</p>
</td></tr></table>
</div>
</div>
@ -2164,7 +2164,7 @@
</div>
<div class="description"><p>Indicates if the row is currently visible on the screen.</p>
<h4>Arguments</h4><table class="argumentTable argument-list table table-striped table-bordered"><tr class="argumentRow "><td class="argName ">row</td><td class="argType" "><a href="https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Number" class="" title="Number" data-id="Number">Number</a></td><td class="argDescription "><p>Required. The row to check</p>
<h4>Arguments</h4><table class="argumentTable argument-list table table-striped table-bordered"><tr class="argumentRow "><td class="argName ">row</td><td class="argType"><a href="https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Number" class="" title="Number" data-id="Number">Number</a></td><td class="argDescription "><p>Required. The row to check</p>
</td></tr></table>
</div>
</div>
@ -2191,7 +2191,7 @@
</div>
<div class="description"><p>Moves the cursor&#39;s row and column to the next matching bracket.</p>
<h4>Arguments</h4><table class="argumentTable argument-list table table-striped table-bordered"><tr class="argumentRow "><td class="argName ">select</td><td class="argType" "><a href="https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Object" class="" title="Object" data-id="Object">Object</a></td><td class="argDescription "><p>Required. </p>
<h4>Arguments</h4><table class="argumentTable argument-list table table-striped table-bordered"><tr class="argumentRow "><td class="argName ">select</td><td class="argType"><a href="https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Object" class="" title="Object" data-id="Object">Object</a></td><td class="argDescription "><p>Required. </p>
</td></tr></table>
</div>
</div>
@ -2218,7 +2218,7 @@
</div>
<div class="description"><p>If the character before the cursor is a number, this functions changes its value by <code>amount</code>.</p>
<h4>Arguments</h4><table class="argumentTable argument-list table table-striped table-bordered"><tr class="argumentRow "><td class="argName ">amount</td><td class="argType" "><a href="https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Number" class="" title="Number" data-id="Number">Number</a></td><td class="argDescription "><p>Required. The value to change the numeral by (can be negative to decrease value)</p>
<h4>Arguments</h4><table class="argumentTable argument-list table table-striped table-bordered"><tr class="argumentRow "><td class="argName ">amount</td><td class="argType"><a href="https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Number" class="" title="Number" data-id="Number">Number</a></td><td class="argDescription "><p>Required. The value to change the numeral by (can be negative to decrease value)</p>
</td></tr></table>
</div>
</div>
@ -2245,8 +2245,8 @@
</div>
<div class="description"><p>Moves the cursor to the specified row and column. Note that this does not de-select the current selection.</p>
<h4>Arguments</h4><table class="argumentTable argument-list table table-striped table-bordered"><tr class="argumentRow "><td class="argName ">row</td><td class="argType" "><a href="https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Number" class="" title="Number" data-id="Number">Number</a></td><td class="argDescription "><p>Required. The new row number</p>
</td></tr><tr class="argumentRow "><td class="argName ">column</td><td class="argType" "><a href="https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Number" class="" title="Number" data-id="Number">Number</a></td><td class="argDescription "><p>Required. The new column number</p>
<h4>Arguments</h4><table class="argumentTable argument-list table table-striped table-bordered"><tr class="argumentRow "><td class="argName ">row</td><td class="argType"><a href="https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Number" class="" title="Number" data-id="Number">Number</a></td><td class="argDescription "><p>Required. The new row number</p>
</td></tr><tr class="argumentRow "><td class="argName ">column</td><td class="argType"><a href="https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Number" class="" title="Number" data-id="Number">Number</a></td><td class="argDescription "><p>Required. The new column number</p>
</td></tr></table>
</div>
</div>
@ -2273,7 +2273,7 @@
</div>
<div class="description"><p>Moves the cursor to the position indicated by <code>pos.row</code> and <code>pos.column</code>.</p>
<h4>Arguments</h4><table class="argumentTable argument-list table table-striped table-bordered"><tr class="argumentRow "><td class="argName ">pos</td><td class="argType" "><a href="https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Object" class="" title="Object" data-id="Object">Object</a></td><td class="argDescription "><p>Required. An object with two properties, row and column</p>
<h4>Arguments</h4><table class="argumentTable argument-list table table-striped table-bordered"><tr class="argumentRow "><td class="argName ">pos</td><td class="argType"><a href="https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Object" class="" title="Object" data-id="Object">Object</a></td><td class="argDescription "><p>Required. An object with two properties, row and column</p>
</td></tr></table>
</div>
</div>
@ -2384,7 +2384,7 @@
</div>
<div class="description"><p>Moves the cursor down in the document the specified number of times. Note that this does de-select the current selection.</p>
<h4>Arguments</h4><table class="argumentTable argument-list table table-striped table-bordered"><tr class="argumentRow "><td class="argName ">times</td><td class="argType" "><a href="https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Number" class="" title="Number" data-id="Number">Number</a></td><td class="argDescription "><p>Required. The number of times to change navigation</p>
<h4>Arguments</h4><table class="argumentTable argument-list table table-striped table-bordered"><tr class="argumentRow "><td class="argName ">times</td><td class="argType"><a href="https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Number" class="" title="Number" data-id="Number">Number</a></td><td class="argDescription "><p>Required. The number of times to change navigation</p>
</td></tr></table>
</div>
</div>
@ -2461,7 +2461,7 @@
</div>
<div class="description"><p>Moves the cursor left in the document the specified number of times. Note that this does de-select the current selection.</p>
<h4>Arguments</h4><table class="argumentTable argument-list table table-striped table-bordered"><tr class="argumentRow "><td class="argName ">times</td><td class="argType" "><a href="https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Number" class="" title="Number" data-id="Number">Number</a></td><td class="argDescription "><p>Required. The number of times to change navigation</p>
<h4>Arguments</h4><table class="argumentTable argument-list table table-striped table-bordered"><tr class="argumentRow "><td class="argName ">times</td><td class="argType"><a href="https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Number" class="" title="Number" data-id="Number">Number</a></td><td class="argDescription "><p>Required. The number of times to change navigation</p>
</td></tr></table>
</div>
</div>
@ -2538,7 +2538,7 @@
</div>
<div class="description"><p>Moves the cursor right in the document the specified number of times. Note that this does de-select the current selection.</p>
<h4>Arguments</h4><table class="argumentTable argument-list table table-striped table-bordered"><tr class="argumentRow "><td class="argName ">times</td><td class="argType" "><a href="https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Number" class="" title="Number" data-id="Number">Number</a></td><td class="argDescription "><p>Required. The number of times to change navigation</p>
<h4>Arguments</h4><table class="argumentTable argument-list table table-striped table-bordered"><tr class="argumentRow "><td class="argName ">times</td><td class="argType"><a href="https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Number" class="" title="Number" data-id="Number">Number</a></td><td class="argDescription "><p>Required. The number of times to change navigation</p>
</td></tr></table>
</div>
</div>
@ -2565,8 +2565,8 @@
</div>
<div class="description"><p>Moves the cursor to the specified row and column. Note that this does de-select the current selection.</p>
<h4>Arguments</h4><table class="argumentTable argument-list table table-striped table-bordered"><tr class="argumentRow "><td class="argName ">row</td><td class="argType" "><a href="https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Number" class="" title="Number" data-id="Number">Number</a></td><td class="argDescription "><p>Required. The new row number</p>
</td></tr><tr class="argumentRow "><td class="argName ">column</td><td class="argType" "><a href="https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Number" class="" title="Number" data-id="Number">Number</a></td><td class="argDescription "><p>Required. The new column number</p>
<h4>Arguments</h4><table class="argumentTable argument-list table table-striped table-bordered"><tr class="argumentRow "><td class="argName ">row</td><td class="argType"><a href="https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Number" class="" title="Number" data-id="Number">Number</a></td><td class="argDescription "><p>Required. The new row number</p>
</td></tr><tr class="argumentRow "><td class="argName ">column</td><td class="argType"><a href="https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Number" class="" title="Number" data-id="Number">Number</a></td><td class="argDescription "><p>Required. The new column number</p>
</td></tr></table>
</div>
</div>
@ -2593,7 +2593,7 @@
</div>
<div class="description"><p>Moves the cursor up in the document the specified number of times. Note that this does de-select the current selection.</p>
<h4>Arguments</h4><table class="argumentTable argument-list table table-striped table-bordered"><tr class="argumentRow "><td class="argName ">times</td><td class="argType" "><a href="https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Number" class="" title="Number" data-id="Number">Number</a></td><td class="argDescription "><p>Required. The number of times to change navigation</p>
<h4>Arguments</h4><table class="argumentTable argument-list table table-striped table-bordered"><tr class="argumentRow "><td class="argName ">times</td><td class="argType"><a href="https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Number" class="" title="Number" data-id="Number">Number</a></td><td class="argDescription "><p>Required. The number of times to change navigation</p>
</td></tr></table>
</div>
</div>
@ -3105,7 +3105,7 @@
</div>
<div class="description"><p>Called whenever a text &quot;paste&quot; happens.</p>
<h4>Arguments</h4><table class="argumentTable argument-list table table-striped table-bordered"><tr class="argumentRow "><td class="argName ">text</td><td class="argType" "><a href="https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/String" class="" title="String" data-id="String">String</a></td><td class="argDescription "><p>Required. The pasted text</p>
<h4>Arguments</h4><table class="argumentTable argument-list table table-striped table-bordered"><tr class="argumentRow "><td class="argName ">text</td><td class="argType"><a href="https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/String" class="" title="String" data-id="String">String</a></td><td class="argDescription "><p>Required. The pasted text</p>
</td></tr></table>
</div>
</div>
@ -3277,7 +3277,7 @@
</div>
<div class="description"><p>Removes words of text from the editor. A &quot;word&quot; is defined as a string of characters bookended by whitespace.</p>
<h4>Arguments</h4><table class="argumentTable argument-list table table-striped table-bordered"><tr class="argumentRow "><td class="argName ">dir</td><td class="argType" "><a href="https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/String" class="" title="String" data-id="String">String</a></td><td class="argDescription "><p>Required. The direction of the deletion to occur, either &quot;left&quot; or &quot;right&quot;</p>
<h4>Arguments</h4><table class="argumentTable argument-list table table-striped table-bordered"><tr class="argumentRow "><td class="argName ">dir</td><td class="argType"><a href="https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/String" class="" title="String" data-id="String">String</a></td><td class="argDescription "><p>Required. The direction of the deletion to occur, either &quot;left&quot; or &quot;right&quot;</p>
</td></tr></table>
</div>
</div>
@ -3329,7 +3329,7 @@
</div>
<div class="description"><p>Removes the selection marker.</p>
<h4>Arguments</h4><table class="argumentTable argument-list table table-striped table-bordered"><tr class="argumentRow "><td class="argName ">The</td><td class="argType" "><a href="range.html" class="" title="Range (class)" data-id="Range">Range</a></td><td class="argDescription "><p>Required. selection range added with <a href="#nav=api&api=multi_select" class="link-short" title="Editor.addSelectionMarker (class method)" data-id="Editor.addSelectionMarker"><code>addSelectionMarker()</code></a>.</p>
<h4>Arguments</h4><table class="argumentTable argument-list table table-striped table-bordered"><tr class="argumentRow "><td class="argName ">The</td><td class="argType"><a href="range.html" class="" title="Range (class)" data-id="Range">Range</a></td><td class="argDescription "><p>Required. selection range added with <a href="#nav=api&api=multi_select" class="link-short" title="Editor.addSelectionMarker (class method)" data-id="Editor.addSelectionMarker"><code>addSelectionMarker()</code></a>.</p>
</td></tr></table>
</div>
</div>
@ -3456,8 +3456,8 @@
</div>
<div class="description"><p>Replaces the first occurance of <code>options.needle</code> with the value in <code>replacement</code>.</p>
<h4>Arguments</h4><table class="argumentTable argument-list table table-striped table-bordered"><tr class="argumentRow "><td class="argName ">replacement</td><td class="argType" "><a href="https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/String" class="" title="String" data-id="String">String</a></td><td class="argDescription "><p>Required. The text to replace with</p>
</td></tr><tr class="argumentRow "><td class="argName ">options</td><td class="argType" "><a href="https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Object" class="" title="Object" data-id="Object">Object</a></td><td class="argDescription "><p>Required. The <a href="search.html" class="link-short" title="Search (class)" data-id="Search"><code>Search</code></a> options to use</p>
<h4>Arguments</h4><table class="argumentTable argument-list table table-striped table-bordered"><tr class="argumentRow "><td class="argName ">replacement</td><td class="argType"><a href="https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/String" class="" title="String" data-id="String">String</a></td><td class="argDescription "><p>Required. The text to replace with</p>
</td></tr><tr class="argumentRow "><td class="argName ">options</td><td class="argType"><a href="https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Object" class="" title="Object" data-id="Object">Object</a></td><td class="argDescription "><p>Required. The <a href="search.html" class="link-short" title="Search (class)" data-id="Search"><code>Search</code></a> options to use</p>
</td></tr></table>
</div>
</div>
@ -3484,8 +3484,8 @@
</div>
<div class="description"><p>Replaces all occurances of <code>options.needle</code> with the value in <code>replacement</code>.</p>
<h4>Arguments</h4><table class="argumentTable argument-list table table-striped table-bordered"><tr class="argumentRow "><td class="argName ">replacement</td><td class="argType" "><a href="https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/String" class="" title="String" data-id="String">String</a></td><td class="argDescription "><p>Required. The text to replace with</p>
</td></tr><tr class="argumentRow "><td class="argName ">options</td><td class="argType" "><a href="https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Object" class="" title="Object" data-id="Object">Object</a></td><td class="argDescription "><p>Required. The <a href="search.html" class="link-short" title="Search (class)" data-id="Search"><code>Search</code></a> options to use</p>
<h4>Arguments</h4><table class="argumentTable argument-list table table-striped table-bordered"><tr class="argumentRow "><td class="argName ">replacement</td><td class="argType"><a href="https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/String" class="" title="String" data-id="String">String</a></td><td class="argDescription "><p>Required. The text to replace with</p>
</td></tr><tr class="argumentRow "><td class="argName ">options</td><td class="argType"><a href="https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Object" class="" title="Object" data-id="Object">Object</a></td><td class="argDescription "><p>Required. The <a href="search.html" class="link-short" title="Search (class)" data-id="Search"><code>Search</code></a> options to use</p>
</td></tr></table>
</div>
</div>
@ -3512,7 +3512,7 @@
</div>
<div class="description"><p>Triggers a resize of the editor.</p>
<h4>Arguments</h4><table class="argumentTable argument-list table table-striped table-bordered"><tr class="argumentRow "><td class="argName ">force</td><td class="argType" "><a href="https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Boolean" class="" title="Boolean" data-id="Boolean">Boolean</a></td><td class="argDescription "><p>Required. If <code>true</code>, recomputes the size, even if the height and width haven&#39;t changed</p>
<h4>Arguments</h4><table class="argumentTable argument-list table table-striped table-bordered"><tr class="argumentRow "><td class="argName ">force</td><td class="argType"><a href="https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Boolean" class="" title="Boolean" data-id="Boolean">Boolean</a></td><td class="argDescription "><p>Required. If <code>true</code>, recomputes the size, even if the height and width haven&#39;t changed</p>
</td></tr></table>
</div>
</div>
@ -3613,10 +3613,10 @@
</div>
<div class="description"><p>Scrolls to a line. If <code>center</code> is <code>true</code>, it puts the line in middle of screen (or attempts to).</p>
<h4>Arguments</h4><table class="argumentTable argument-list table table-striped table-bordered"><tr class="argumentRow "><td class="argName ">line</td><td class="argType" "><a href="https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Number" class="" title="Number" data-id="Number">Number</a></td><td class="argDescription "><p>Required. The line to scroll to</p>
</td></tr><tr class="argumentRow "><td class="argName ">center</td><td class="argType" "><a href="https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Boolean" class="" title="Boolean" data-id="Boolean">Boolean</a></td><td class="argDescription "><p>Required. If <code>true</code></p>
</td></tr><tr class="argumentRow "><td class="argName ">animate</td><td class="argType" "><a href="https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Boolean" class="" title="Boolean" data-id="Boolean">Boolean</a></td><td class="argDescription "><p>Required. If <code>true</code> animates scrolling</p>
</td></tr><tr class="argumentRow "><td class="argName ">callback</td><td class="argType" "><a href="https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Function" class="" title="Function" data-id="Function">Function</a></td><td class="argDescription "><p>Required. Function to be called when the animation has finished</p>
<h4>Arguments</h4><table class="argumentTable argument-list table table-striped table-bordered"><tr class="argumentRow "><td class="argName ">line</td><td class="argType"><a href="https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Number" class="" title="Number" data-id="Number">Number</a></td><td class="argDescription "><p>Required. The line to scroll to</p>
</td></tr><tr class="argumentRow "><td class="argName ">center</td><td class="argType"><a href="https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Boolean" class="" title="Boolean" data-id="Boolean">Boolean</a></td><td class="argDescription "><p>Required. If <code>true</code></p>
</td></tr><tr class="argumentRow "><td class="argName ">animate</td><td class="argType"><a href="https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Boolean" class="" title="Boolean" data-id="Boolean">Boolean</a></td><td class="argDescription "><p>Required. If <code>true</code> animates scrolling</p>
</td></tr><tr class="argumentRow "><td class="argName ">callback</td><td class="argType"><a href="https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Function" class="" title="Function" data-id="Function">Function</a></td><td class="argDescription "><p>Required. Function to be called when the animation has finished</p>
</td></tr></table>
</div>
</div>
@ -3643,7 +3643,7 @@
</div>
<div class="description"><p>Moves the editor to the specified row.</p>
<h4>Arguments</h4><table class="argumentTable argument-list table table-striped table-bordered"><tr class="argumentRow "><td class="argName ">row</td><td class="argType" "><a href="https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Object" class="" title="Object" data-id="Object">Object</a></td><td class="argDescription "><p>Required. </p>
<h4>Arguments</h4><table class="argumentTable argument-list table table-striped table-bordered"><tr class="argumentRow "><td class="argName ">row</td><td class="argType"><a href="https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Object" class="" title="Object" data-id="Object">Object</a></td><td class="argDescription "><p>Required. </p>
</td></tr></table>
</div>
</div>
@ -3695,8 +3695,8 @@
</div>
<div class="description"><p>Finds the next occurence of text in an active selection and adds it to the selections.</p>
<h4>Arguments</h4><table class="argumentTable argument-list table table-striped table-bordered"><tr class="argumentRow "><td class="argName ">dir</td><td class="argType" "><a href="https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Number" class="" title="Number" data-id="Number">Number</a></td><td class="argDescription "><p>Required. The direction of lines to select: -1 for up, 1 for down</p>
</td></tr><tr class="argumentRow "><td class="argName ">skip</td><td class="argType" "><a href="https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Boolean" class="" title="Boolean" data-id="Boolean">Boolean</a></td><td class="argDescription "><p>Required. If <code>true</code>, removes the active selection range</p>
<h4>Arguments</h4><table class="argumentTable argument-list table table-striped table-bordered"><tr class="argumentRow "><td class="argName ">dir</td><td class="argType"><a href="https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Number" class="" title="Number" data-id="Number">Number</a></td><td class="argDescription "><p>Required. The direction of lines to select: -1 for up, 1 for down</p>
</td></tr><tr class="argumentRow "><td class="argName ">skip</td><td class="argType"><a href="https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Boolean" class="" title="Boolean" data-id="Boolean">Boolean</a></td><td class="argDescription "><p>Required. If <code>true</code>, removes the active selection range</p>
</td></tr></table>
</div>
</div>
@ -3723,8 +3723,8 @@
</div>
<div class="description"><p>Adds a cursor above or below the active cursor.</p>
<h4>Arguments</h4><table class="argumentTable argument-list table table-striped table-bordered"><tr class="argumentRow "><td class="argName ">dir</td><td class="argType" "><a href="https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Number" class="" title="Number" data-id="Number">Number</a></td><td class="argDescription "><p>Required. The direction of lines to select: -1 for up, 1 for down</p>
</td></tr><tr class="argumentRow "><td class="argName ">skip</td><td class="argType" "><a href="https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Boolean" class="" title="Boolean" data-id="Boolean">Boolean</a></td><td class="argDescription "><p>Required. If <code>true</code>, removes the active selection range</p>
<h4>Arguments</h4><table class="argumentTable argument-list table table-striped table-bordered"><tr class="argumentRow "><td class="argName ">dir</td><td class="argType"><a href="https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Number" class="" title="Number" data-id="Number">Number</a></td><td class="argDescription "><p>Required. The direction of lines to select: -1 for up, 1 for down</p>
</td></tr><tr class="argumentRow "><td class="argName ">skip</td><td class="argType"><a href="https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Boolean" class="" title="Boolean" data-id="Boolean">Boolean</a></td><td class="argDescription "><p>Required. If <code>true</code>, removes the active selection range</p>
</td></tr></table>
</div>
</div>
@ -3825,7 +3825,7 @@
</div>
<div class="description"><p>Specifies whether to use behaviors or not. &quot;Behaviors&quot; in this case is the auto-pairing of special characters, like quotation marks, parenthesis, or brackets.</p>
<h4>Arguments</h4><table class="argumentTable argument-list table table-striped table-bordered"><tr class="argumentRow "><td class="argName ">enabled</td><td class="argType" "><a href="https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Boolean" class="" title="Boolean" data-id="Boolean">Boolean</a></td><td class="argDescription "><p>Required. Enables or disables behaviors</p>
<h4>Arguments</h4><table class="argumentTable argument-list table table-striped table-bordered"><tr class="argumentRow "><td class="argName ">enabled</td><td class="argType"><a href="https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Boolean" class="" title="Boolean" data-id="Boolean">Boolean</a></td><td class="argDescription "><p>Required. Enables or disables behaviors</p>
</td></tr></table>
</div>
</div>
@ -3876,7 +3876,7 @@
</div>
<div class="description"><p>Sets the delay (in milliseconds) of the mouse drag.</p>
<h4>Arguments</h4><table class="argumentTable argument-list table table-striped table-bordered"><tr class="argumentRow "><td class="argName ">dragDelay</td><td class="argType" "><a href="https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Number" class="" title="Number" data-id="Number">Number</a></td><td class="argDescription "><p>Required. A value indicating the new delay</p>
<h4>Arguments</h4><table class="argumentTable argument-list table table-striped table-bordered"><tr class="argumentRow "><td class="argName ">dragDelay</td><td class="argType"><a href="https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Number" class="" title="Number" data-id="Number">Number</a></td><td class="argDescription "><p>Required. A value indicating the new delay</p>
</td></tr></table>
</div>
</div>
@ -3927,7 +3927,7 @@
</div>
<div class="description"><p>Set a new font size (in pixels) for the editor text.</p>
<h4>Arguments</h4><table class="argumentTable argument-list table table-striped table-bordered"><tr class="argumentRow "><td class="argName ">size</td><td class="argType" "><a href="https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Number" class="" title="Number" data-id="Number">Number</a></td><td class="argDescription "><p>Required. A font size</p>
<h4>Arguments</h4><table class="argumentTable argument-list table table-striped table-bordered"><tr class="argumentRow "><td class="argName ">size</td><td class="argType"><a href="https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Number" class="" title="Number" data-id="Number">Number</a></td><td class="argDescription "><p>Required. A font size</p>
</td></tr></table>
</div>
</div>
@ -3954,7 +3954,7 @@
</div>
<div class="description"><p>Determines whether or not the current line should be highlighted.</p>
<h4>Arguments</h4><table class="argumentTable argument-list table table-striped table-bordered"><tr class="argumentRow "><td class="argName ">shouldHighlight</td><td class="argType" "><a href="https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Boolean" class="" title="Boolean" data-id="Boolean">Boolean</a></td><td class="argDescription "><p>Required. Set to <code>true</code> to highlight the current line</p>
<h4>Arguments</h4><table class="argumentTable argument-list table table-striped table-bordered"><tr class="argumentRow "><td class="argName ">shouldHighlight</td><td class="argType"><a href="https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Boolean" class="" title="Boolean" data-id="Boolean">Boolean</a></td><td class="argDescription "><p>Required. Set to <code>true</code> to highlight the current line</p>
</td></tr></table>
</div>
</div>
@ -4005,7 +4005,7 @@
</div>
<div class="description"><p>Determines if the currently selected word should be highlighted.</p>
<h4>Arguments</h4><table class="argumentTable argument-list table table-striped table-bordered"><tr class="argumentRow "><td class="argName ">shouldHighlight</td><td class="argType" "><a href="https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Boolean" class="" title="Boolean" data-id="Boolean">Boolean</a></td><td class="argDescription "><p>Required. Set to <code>true</code> to highlight the currently selected word</p>
<h4>Arguments</h4><table class="argumentTable argument-list table table-striped table-bordered"><tr class="argumentRow "><td class="argName ">shouldHighlight</td><td class="argType"><a href="https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Boolean" class="" title="Boolean" data-id="Boolean">Boolean</a></td><td class="argDescription "><p>Required. Set to <code>true</code> to highlight the currently selected word</p>
</td></tr></table>
</div>
</div>
@ -4032,7 +4032,7 @@
</div>
<div class="description"><p>Sets a new key handler, such as &quot;vim&quot; or &quot;windows&quot;.</p>
<h4>Arguments</h4><table class="argumentTable argument-list table table-striped table-bordered"><tr class="argumentRow "><td class="argName ">keyboardHandler</td><td class="argType" "><a href="https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/String" class="" title="String" data-id="String">String</a></td><td class="argDescription "><p>Required. The new key handler</p>
<h4>Arguments</h4><table class="argumentTable argument-list table table-striped table-bordered"><tr class="argumentRow "><td class="argName ">keyboardHandler</td><td class="argType"><a href="https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/String" class="" title="String" data-id="String">String</a></td><td class="argDescription "><p>Required. The new key handler</p>
</td></tr></table>
</div>
</div>
@ -4059,7 +4059,7 @@
</div>
<div class="description"><p>Pass in <code>true</code> to enable overwrites in your session, or <code>false</code> to disable. If overwrites is enabled, any text you enter will type over any text after it. If the value of <code>overwrite</code> changes, this function also emites the <code>changeOverwrite</code> event.</p>
<h4>Arguments</h4><table class="argumentTable argument-list table table-striped table-bordered"><tr class="argumentRow "><td class="argName ">overwrite</td><td class="argType" "><a href="https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Boolean" class="" title="Boolean" data-id="Boolean">Boolean</a></td><td class="argDescription "><p>Required. Defines wheter or not to set overwrites</p>
<h4>Arguments</h4><table class="argumentTable argument-list table table-striped table-bordered"><tr class="argumentRow "><td class="argName ">overwrite</td><td class="argType"><a href="https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Boolean" class="" title="Boolean" data-id="Boolean">Boolean</a></td><td class="argDescription "><p>Required. Defines wheter or not to set overwrites</p>
</td></tr></table>
</div>
</div>
@ -4086,7 +4086,7 @@
</div>
<div class="description"><p>Sets the column defining where the print margin should be.</p>
<h4>Arguments</h4><table class="argumentTable argument-list table table-striped table-bordered"><tr class="argumentRow "><td class="argName ">showPrintMargin</td><td class="argType" "><a href="https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Number" class="" title="Number" data-id="Number">Number</a></td><td class="argDescription "><p>Required. Specifies the new print margin</p>
<h4>Arguments</h4><table class="argumentTable argument-list table table-striped table-bordered"><tr class="argumentRow "><td class="argName ">showPrintMargin</td><td class="argType"><a href="https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Number" class="" title="Number" data-id="Number">Number</a></td><td class="argDescription "><p>Required. Specifies the new print margin</p>
</td></tr></table>
</div>
</div>
@ -4113,7 +4113,7 @@
</div>
<div class="description"><p>If <code>readOnly</code> is true, then the editor is set to read-only mode, and none of the content can change.</p>
<h4>Arguments</h4><table class="argumentTable argument-list table table-striped table-bordered"><tr class="argumentRow "><td class="argName ">readOnly</td><td class="argType" "><a href="https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Boolean" class="" title="Boolean" data-id="Boolean">Boolean</a></td><td class="argDescription "><p>Required. Specifies whether the editor can be modified or not</p>
<h4>Arguments</h4><table class="argumentTable argument-list table table-striped table-bordered"><tr class="argumentRow "><td class="argName ">readOnly</td><td class="argType"><a href="https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Boolean" class="" title="Boolean" data-id="Boolean">Boolean</a></td><td class="argDescription "><p>Required. Specifies whether the editor can be modified or not</p>
</td></tr></table>
</div>
</div>
@ -4140,7 +4140,7 @@
</div>
<div class="description"><p>Sets how fast the mouse scrolling should do.</p>
<h4>Arguments</h4><table class="argumentTable argument-list table table-striped table-bordered"><tr class="argumentRow "><td class="argName ">speed</td><td class="argType" "><a href="https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Number" class="" title="Number" data-id="Number">Number</a></td><td class="argDescription "><p>Required. A value indicating the new speed (in milliseconds)</p>
<h4>Arguments</h4><table class="argumentTable argument-list table table-striped table-bordered"><tr class="argumentRow "><td class="argName ">speed</td><td class="argType"><a href="https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Number" class="" title="Number" data-id="Number">Number</a></td><td class="argDescription "><p>Required. A value indicating the new speed (in milliseconds)</p>
</td></tr></table>
</div>
</div>
@ -4170,7 +4170,7 @@
although this code change in the future.</p>
<p>This function also emits the <code>&#39;changeSelectionStyle&#39;</code> event.</p>
<h4>Arguments</h4><table class="argumentTable argument-list table table-striped table-bordered"><tr class="argumentRow "><td class="argName ">style</td><td class="argType" "><a href="https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/String" class="" title="String" data-id="String">String</a></td><td class="argDescription "><p>Required. The new selection style</p>
<h4>Arguments</h4><table class="argumentTable argument-list table table-striped table-bordered"><tr class="argumentRow "><td class="argName ">style</td><td class="argType"><a href="https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/String" class="" title="String" data-id="String">String</a></td><td class="argDescription "><p>Required. The new selection style</p>
</td></tr></table>
</div>
</div>
@ -4197,7 +4197,7 @@ although this code change in the future.</p>
</div>
<div class="description"><p>Sets a new editsession to use. This method also emits the <code>&#39;changeSession&#39;</code> event.</p>
<h4>Arguments</h4><table class="argumentTable argument-list table table-striped table-bordered"><tr class="argumentRow "><td class="argName ">session</td><td class="argType" "><a href="edit_session.html" class="" title="EditSession (class)" data-id="EditSession">EditSession</a></td><td class="argDescription "><p>Required. The new session to use</p>
<h4>Arguments</h4><table class="argumentTable argument-list table table-striped table-bordered"><tr class="argumentRow "><td class="argName ">session</td><td class="argType"><a href="edit_session.html" class="" title="EditSession (class)" data-id="EditSession">EditSession</a></td><td class="argDescription "><p>Required. The new session to use</p>
</td></tr></table>
</div>
</div>
@ -4224,7 +4224,7 @@ although this code change in the future.</p>
</div>
<div class="description"><p>Indicates whether the fold widgets are shown or not.</p>
<h4>Arguments</h4><table class="argumentTable argument-list table table-striped table-bordered"><tr class="argumentRow "><td class="argName ">show</td><td class="argType" "><a href="https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Boolean" class="" title="Boolean" data-id="Boolean">Boolean</a></td><td class="argDescription "><p>Required. Specifies whether the fold widgets are shown</p>
<h4>Arguments</h4><table class="argumentTable argument-list table table-striped table-bordered"><tr class="argumentRow "><td class="argName ">show</td><td class="argType"><a href="https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Boolean" class="" title="Boolean" data-id="Boolean">Boolean</a></td><td class="argDescription "><p>Required. Specifies whether the fold widgets are shown</p>
</td></tr></table>
</div>
</div>
@ -4251,7 +4251,7 @@ although this code change in the future.</p>
</div>
<div class="description"><p>If <code>showInvisibles</code> is set to <code>true</code>, invisible characters&mdash;like spaces or new lines&mdash;are show in the editor.</p>
<h4>Arguments</h4><table class="argumentTable argument-list table table-striped table-bordered"><tr class="argumentRow "><td class="argName ">showInvisibles</td><td class="argType" "><a href="https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Boolean" class="" title="Boolean" data-id="Boolean">Boolean</a></td><td class="argDescription "><p>Required. Specifies whether or not to show invisible characters</p>
<h4>Arguments</h4><table class="argumentTable argument-list table table-striped table-bordered"><tr class="argumentRow "><td class="argName ">showInvisibles</td><td class="argType"><a href="https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Boolean" class="" title="Boolean" data-id="Boolean">Boolean</a></td><td class="argDescription "><p>Required. Specifies whether or not to show invisible characters</p>
</td></tr></table>
</div>
</div>
@ -4278,7 +4278,7 @@ although this code change in the future.</p>
</div>
<div class="description"><p>If <code>showPrintMargin</code> is set to <code>true</code>, the print margin is shown in the editor.</p>
<h4>Arguments</h4><table class="argumentTable argument-list table table-striped table-bordered"><tr class="argumentRow "><td class="argName ">showPrintMargin</td><td class="argType" "><a href="https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Boolean" class="" title="Boolean" data-id="Boolean">Boolean</a></td><td class="argDescription "><p>Required. Specifies whether or not to show the print margin</p>
<h4>Arguments</h4><table class="argumentTable argument-list table table-striped table-bordered"><tr class="argumentRow "><td class="argName ">showPrintMargin</td><td class="argType"><a href="https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Boolean" class="" title="Boolean" data-id="Boolean">Boolean</a></td><td class="argDescription "><p>Required. Specifies whether or not to show the print margin</p>
</td></tr></table>
</div>
</div>
@ -4305,7 +4305,7 @@ although this code change in the future.</p>
</div>
<div class="description"><p>Adds a new class, <code>style</code>, to the editor.</p>
<h4>Arguments</h4><table class="argumentTable argument-list table table-striped table-bordered"><tr class="argumentRow "><td class="argName ">style</td><td class="argType" "><a href="https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/String" class="" title="String" data-id="String">String</a></td><td class="argDescription "><p>Required. A class name</p>
<h4>Arguments</h4><table class="argumentTable argument-list table table-striped table-bordered"><tr class="argumentRow "><td class="argName ">style</td><td class="argType"><a href="https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/String" class="" title="String" data-id="String">String</a></td><td class="argDescription "><p>Required. A class name</p>
</td></tr></table>
</div>
</div>
@ -4332,7 +4332,7 @@ although this code change in the future.</p>
</div>
<div class="description"><p>Sets a new theme for the editor. <code>theme</code> should exist, and be a directory path, like <code>ace/theme/textmate</code>.</p>
<h4>Arguments</h4><table class="argumentTable argument-list table table-striped table-bordered"><tr class="argumentRow "><td class="argName ">theme</td><td class="argType" "><a href="https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/String" class="" title="String" data-id="String">String</a></td><td class="argDescription "><p>Required. The path to a theme</p>
<h4>Arguments</h4><table class="argumentTable argument-list table table-striped table-bordered"><tr class="argumentRow "><td class="argName ">theme</td><td class="argType"><a href="https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/String" class="" title="String" data-id="String">String</a></td><td class="argDescription "><p>Required. The path to a theme</p>
</td></tr></table>
</div>
</div>
@ -4364,8 +4364,8 @@ although this code change in the future.</p>
</div>
<div class="description"><p>Sets the current document to <code>val</code>.</p>
<h4>Arguments</h4><table class="argumentTable argument-list table table-striped table-bordered"><tr class="argumentRow "><td class="argName ">val</td><td class="argType" "><a href="https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/String" class="" title="String" data-id="String">String</a></td><td class="argDescription "><p>Required. The new value to set for the document</p>
</td></tr><tr class="argumentRow "><td class="argName ">cursorPos</td><td class="argType" "><a href="https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Number" class="" title="Number" data-id="Number">Number</a></td><td class="argDescription "><p>Required. Where to set the new value. <code>undefined</code> or 0 is selectAll, -1 is at the document start, and 1 is at the end</p>
<h4>Arguments</h4><table class="argumentTable argument-list table table-striped table-bordered"><tr class="argumentRow "><td class="argName ">val</td><td class="argType"><a href="https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/String" class="" title="String" data-id="String">String</a></td><td class="argDescription "><p>Required. The new value to set for the document</p>
</td></tr><tr class="argumentRow "><td class="argName ">cursorPos</td><td class="argType"><a href="https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Number" class="" title="Number" data-id="Number">Number</a></td><td class="argDescription "><p>Required. Where to set the new value. <code>undefined</code> or 0 is selectAll, -1 is at the document start, and 1 is at the end</p>
</td></tr></table>
</div>
</div>
@ -4394,7 +4394,7 @@ when such a character is typed in.</p>
<div class="description"><p>Specifies whether to use wrapping behaviors or not, i.e. automatically wrapping the selection with characters such as brackets
when such a character is typed in.</p>
<h4>Arguments</h4><table class="argumentTable argument-list table table-striped table-bordered"><tr class="argumentRow "><td class="argName ">enabled</td><td class="argType" "><a href="https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Boolean" class="" title="Boolean" data-id="Boolean">Boolean</a></td><td class="argDescription "><p>Required. Enables or disables wrapping behaviors</p>
<h4>Arguments</h4><table class="argumentTable argument-list table table-striped table-bordered"><tr class="argumentRow "><td class="argName ">enabled</td><td class="argType"><a href="https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Boolean" class="" title="Boolean" data-id="Boolean">Boolean</a></td><td class="argDescription "><p>Required. Enables or disables wrapping behaviors</p>
</td></tr></table>
</div>
</div>
@ -4595,7 +4595,7 @@ when such a character is typed in.</p>
</div>
<div class="description"><p>Transposes the selected ranges.</p>
<h4>Arguments</h4><table class="argumentTable argument-list table table-striped table-bordered"><tr class="argumentRow "><td class="argName ">dir</td><td class="argType" "><a href="https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Number" class="" title="Number" data-id="Number">Number</a></td><td class="argDescription "><p>Required. The direction to rotate selections</p>
<h4>Arguments</h4><table class="argumentTable argument-list table table-striped table-bordered"><tr class="argumentRow "><td class="argName ">dir</td><td class="argType"><a href="https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Number" class="" title="Number" data-id="Number">Number</a></td><td class="argDescription "><p>Required. The direction to rotate selections</p>
</td></tr></table>
</div>
</div>
@ -4647,7 +4647,7 @@ when such a character is typed in.</p>
</div>
<div class="description"><p>Removes the class <code>style</code> from the editor.</p>
<h4>Arguments</h4><table class="argumentTable argument-list table table-striped table-bordered"><tr class="argumentRow "><td class="argName ">style</td><td class="argType" "><a href="https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Object" class="" title="Object" data-id="Object">Object</a></td><td class="argDescription "><p>Required. </p>
<h4>Arguments</h4><table class="argumentTable argument-list table table-striped table-bordered"><tr class="argumentRow "><td class="argName ">style</td><td class="argType"><a href="https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Object" class="" title="Object" data-id="Object">Object</a></td><td class="argDescription "><p>Required. </p>
</td></tr></table>
</div>
</div>

View file

@ -163,7 +163,7 @@
<article id="Selection" data-title="Selection (class)" class="article">
<div class="section description">
<div class="memberContent"><p>Contains the cursor position and the text selection of an edit session.</p>
<p>The row/columns used in the selection are in document coordinates representing ths coordinates as thez appear in the document before applying soft wrap and folding.</p>
<p>The row/columns used in the selection are in document coordinates representing the coordinates as they appear in the document before applying soft wrap and folding.</p>
</div>
</div>
@ -1778,4 +1778,4 @@
<script defer src="./resources/javascripts/disqus-ext.js"></script>
<script defer src="./resources/javascripts/ga.js"></script>
<div id="disqus_thread"></div>
</div>
</div>

2
build

@ -1 +1 @@
Subproject commit cf536740d866276b65cfd351610001c2a841e751
Subproject commit a4e495d8901876c6bafe3870a35cb8e32c827e97

View file

@ -20,7 +20,7 @@ function foo() {
var bar = true;
}</textarea><br>
SourceUrl: <br>
<input id="srcURL" style="width:300px" value="http://ajaxorg.github.com/ace-builds/textarea/src/"></input><br>
<input id="srcURL" style="width:300px" value="http://ajaxorg.github.com/ace-builds/src-noconflict"></input><br>
<button id="buBuild">Build Link</button> <br> <a href="#"></a>
<a href="https://github.com/ajaxorg/ace/">
<div class="fork_on_github" ></div>
@ -49,63 +49,60 @@ function foo() {
<script>
function inject(callback) {
var baseUrl = "src/";
var load = window.__ace_loader__ = function(path, module, callback) {
function inject(options, callback) {
var baseUrl = options.baseUrl || "../../src-noconflict";
var load = function(path, callback) {
var head = document.getElementsByTagName('head')[0];
var s = document.createElement('script');
s.src = baseUrl + path;
s.src = baseUrl + "/" + path;
head.appendChild(s);
s.onload = function() {
window.__ace_shadowed__.require([module], callback);
s.onload = s.onreadystatechange = function(_, isAbort) {
if (isAbort || !s.readyState || s.readyState == "loaded" || s.readyState == "complete") {
s = s.onload = s.onreadystatechange = null;
if (!isAbort)
callback();
}
};
};
load('ace-bookmarklet.js', "ace/ext/textarea", function() {
var ace = window.__ace_shadowed__;
ace.options.mode = "javascript";
var Event = ace.require("ace/lib/event");
var areas = document.getElementsByTagName("textarea");
for (var i = 0; i < areas.length; i++) {
Event.addListener(areas[i], "click", function(e) {
if (e.detail == 3) {
ace.transformTextarea(e.target, load);
}
});
}
callback && callback();
load("ace.js", function() {
ace.config.loadModule("ace/ext/textarea", function() {
var event = ace.require("ace/lib/event");
var areas = document.getElementsByTagName("textarea");
for (var i = 0; i < areas.length; i++) {
event.addListener(areas[i], "click", function(e) {
if (e.detail == 3) {
ace.transformTextarea(e.target, options.ace);
}
});
}
callback && callback();
});
});
}
// Call the inject function to load the ace files.
var textAce;
inject(function () {
inject({}, function () {
// Transform the textarea on the page into an ace editor.
var ace = window.__ace_shadowed__;
var t = document.querySelector("textarea");
textAce = ace.transformTextarea(t, window.__ace_loader__);
textAce = ace.require("ace/ext/textarea").transformTextarea(t);
setTimeout(function(){textAce.setDisplaySettings(true)});
});
document.getElementById("buBuild").onclick = function() {
var injectSrc = inject.toString().split("\n").join("");
injectSrc = injectSrc.replace('baseUrl = "src/"', 'baseUrl="' + document.getElementById("srcURL").value + '"');
var aceOptions = textAce.getOptions();
var opt = [];
for (var option in aceOptions) {
opt.push(option + ":'" + aceOptions[option] + "'");
}
injectSrc = injectSrc.replace('ace.options.mode = "javascript"', 'ace.options = { ' + opt.join(",") + ' }');
injectSrc = injectSrc.replace(/\s+/g, " ");
var options = textAce.getOptions();
options.baseUrl = document.getElementById("srcURL").value;
var a = document.querySelector("a");
a.href = "javascript:(" + injectSrc + ")()";
a.href = "javascript:(" + injectSrc + ")(" + JSON.stringify(options) + ")";
a.innerHTML = "Ace Bookmarklet Link";
}

View file

@ -8,8 +8,8 @@
body {
overflow: hidden;
}
#editor {
#editor {
margin: 0;
position: absolute;
top: 0;
@ -27,7 +27,7 @@
alert("Ace Rocks " + items[i]);
}
}</pre>
<script src="src-noconflict/ace.js" type="text/javascript" charset="utf-8"></script>
<script>
var editor = ace.edit("editor");

View file

@ -3,7 +3,7 @@
*
* Copyright (c) 2010, Ajax.org B.V.
* All rights reserved.
*
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright
@ -14,7 +14,7 @@
* * Neither the name of Ajax.org B.V. nor the
* names of its contributors may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
@ -38,69 +38,62 @@
var ACE_NAMESPACE = "";
var global = (function() {
return this;
})();
var global = (function() { return this; })();
if (!global && typeof window != "undefined") global = window; // strict mode
if (!ACE_NAMESPACE && typeof requirejs !== "undefined")
return;
var _define = function(module, deps, payload) {
if (typeof module !== 'string') {
if (_define.original)
_define.original.apply(window, arguments);
var define = function(module, deps, payload) {
if (typeof module !== "string") {
if (define.original)
define.original.apply(this, arguments);
else {
console.error('dropping module because define wasn\'t a string.');
console.error("dropping module because define wasn\'t a string.");
console.trace();
}
return;
}
if (arguments.length == 2)
payload = deps;
if (!_define.modules) {
_define.modules = {};
_define.payloads = {};
if (!define.modules[module]) {
define.payloads[module] = payload;
define.modules[module] = null;
}
_define.payloads[module] = payload;
_define.modules[module] = null;
};
define.modules = {};
define.payloads = {};
/**
* Get at functionality define()ed using the function above
*/
var _require = function(parentId, module, callback) {
if (Object.prototype.toString.call(module) === "[object Array]") {
if (typeof module === "string") {
var payload = lookup(parentId, module);
if (payload != undefined) {
callback && callback();
return payload;
}
} else if (Object.prototype.toString.call(module) === "[object Array]") {
var params = [];
for (var i = 0, l = module.length; i < l; ++i) {
var dep = lookup(parentId, module[i]);
if (!dep && _require.original)
return _require.original.apply(window, arguments);
if (dep == undefined && require.original)
return;
params.push(dep);
}
if (callback) {
callback.apply(null, params);
}
return callback && callback.apply(null, params) || true;
}
else if (typeof module === 'string') {
var payload = lookup(parentId, module);
if (!payload && _require.original)
return _require.original.apply(window, arguments);
};
if (callback) {
callback();
}
return payload;
}
else {
if (_require.original)
return _require.original.apply(window, arguments);
}
var require = function(module, callback) {
var packagedModule = _require("", module, callback);
if (packagedModule == undefined && require.original)
return require.original.apply(this, arguments);
return packagedModule;
};
var normalizeModule = function(parentId, moduleName) {
@ -119,7 +112,6 @@ var normalizeModule = function(parentId, moduleName) {
moduleName = moduleName.replace(/\/\.\//, "/").replace(/[^\/]+\/\.\.\//, "");
}
}
return moduleName;
};
@ -128,12 +120,11 @@ var normalizeModule = function(parentId, moduleName) {
* definition function if needed.
*/
var lookup = function(parentId, moduleName) {
moduleName = normalizeModule(parentId, moduleName);
var module = _define.modules[moduleName];
var module = define.modules[moduleName];
if (!module) {
module = _define.payloads[moduleName];
module = define.payloads[moduleName];
if (typeof module === 'function') {
var exports = {};
var mod = {
@ -149,19 +140,15 @@ var lookup = function(parentId, moduleName) {
var returnValue = module(req, exports, mod);
exports = returnValue || mod.exports;
_define.modules[moduleName] = exports;
delete _define.payloads[moduleName];
define.modules[moduleName] = exports;
delete define.payloads[moduleName];
}
module = _define.modules[moduleName] = exports || module;
module = define.modules[moduleName] = exports || module;
}
return module;
};
function exportAce(ns) {
var require = function(module, callback) {
return _require("", module, callback);
};
var root = global;
if (ns) {
if (!global[ns])
@ -170,13 +157,13 @@ function exportAce(ns) {
}
if (!root.define || !root.define.packaged) {
_define.original = root.define;
root.define = _define;
define.original = root.define;
root.define = define;
root.define.packaged = true;
}
if (!root.require || !root.require.packaged) {
_require.original = root.require;
require.original = root.require;
root.require = require;
root.require.packaged = true;
}

View file

@ -4,7 +4,7 @@ body {
margin:0;
padding:0;
background-color:#e6f5fc;
}
H2, H3, H4 {
@ -58,7 +58,7 @@ PRE{
position:relative;
overflow:hidden;
background: url(images/background.png) repeat-x 0 0;
border-bottom:1px solid #c9e8fa;
border-bottom:1px solid #c9e8fa;
}
#header .content .signature {
@ -224,7 +224,3 @@ UL.menu-footer LI A {
UL.menu-footer LI A:hover {
text-decoration:underline;
}

45
demo/autocompletion.html Normal file
View file

@ -0,0 +1,45 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>ACE Autocompletion demo</title>
<style type="text/css" media="screen">
body {
overflow: hidden;
}
#editor {
margin: 0;
position: absolute;
top: 0;
bottom: 0;
left: 0;
right: 0;
}
</style>
</head>
<body>
<pre id="editor"></pre>
<!-- load ace -->
<script src="../build/src-noconflict/ace.js"></script>
<!-- load ace language tools -->
<script src="../build/src-noconflict/ext-language_tools.js"></script>
<script>
// trigger extension
ace.require("ace/ext/language_tools");
var editor = ace.edit("editor");
editor.session.setMode("ace/mode/html");
editor.setTheme("ace/theme/tomorrow");
// enable autocompletion and snippets
editor.setOptions({
enableBasicAutocompletion: true,
enableSnippets: true,
enableLiveAutocompletion: false
});
</script>
<script src="./show_own_source.js"></script>
</body>
</html>

68
demo/autoresize.html Normal file
View file

@ -0,0 +1,68 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>Editor</title>
<style type="text/css" media="screen">
.ace_editor {
border: 1px solid lightgray;
margin: auto;
height: 200px;
width: 80%;
}
.scrollmargin {
height: 80px;
text-align: center;
}
</style>
</head>
<body>
<pre id="editor1">autoresizing editor</pre>
<div class="scrollmargin"></div>
<pre id="editor2">minHeight = 2 lines</pre>
<div class="scrollmargin"></div>
<pre id="editor3" style="width: 40%;"></pre>
<div class="scrollmargin"></div>
<pre id="editor"></pre>
<script src="kitchen-sink/require.js"></script>
<script>
// setup paths
require.config({paths: { "ace" : "../lib/ace"}});
// load ace and extensions
require(["ace/ace"], function(ace) {
var editor1 = ace.edit("editor1");
editor1.setTheme("ace/theme/tomorrow_night_eighties");
editor1.session.setMode("ace/mode/html");
editor1.setAutoScrollEditorIntoView(true);
editor1.setOption("maxLines", 30);
var editor2 = ace.edit("editor2");
editor2.setTheme("ace/theme/tomorrow_night_blue");
editor2.session.setMode("ace/mode/html");
editor2.setAutoScrollEditorIntoView(true);
editor2.setOption("maxLines", 30);
editor2.setOption("minLines", 2);
var editor = ace.edit("editor3");
editor.setOptions({
autoScrollEditorIntoView: true,
maxLines: 8
});
editor.renderer.setScrollMargin(10, 10, 10, 10);
var editor = ace.edit("editor");
editor.setTheme("ace/theme/tomorrow");
editor.session.setMode("ace/mode/html");
editor.setAutoScrollEditorIntoView(true);
editor.setOption("maxLines", 100);
});
</script>
<script src="./show_own_source.js"></script>
</body>
</html>

39
demo/chromevox.html Normal file
View file

@ -0,0 +1,39 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>ACE ChromeVox demo</title>
<style type="text/css" media="screen">
body {
overflow: hidden;
}
#editor {
margin: 0;
position: absolute;
top: 0;
bottom: 0;
left: 0;
right: 0;
}
</style>
</head>
<body>
<pre id="editor"></pre>
<!-- load ace -->
<script src="../build/src/ace.js"></script>
<!-- load ace accessibility extension -->
<script src="../build/src/ext-chromevox.js"></script>
<script>
// trigger extension
ace.require("ace/ext/chromevox");
var editor = ace.edit("editor");
editor.session.setMode("ace/mode/html");
editor.setTheme("ace/theme/tomorrow");
</script>
<script src="./show_own_source.js"></script>
</body>
</html>

View file

@ -1,3 +0,0 @@
ace.require("ace/lib/net").get(document.baseURI, function(t){
editor.setValue(t, 1);
})

43
demo/emmet.html Normal file
View file

@ -0,0 +1,43 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>ACE Emmet demo</title>
<style type="text/css" media="screen">
body {
overflow: hidden;
}
#editor {
margin: 0;
position: absolute;
top: 0;
bottom: 0;
left: 0;
right: 0;
}
</style>
</head>
<body>
<pre id="editor"></pre>
<!-- load emmet code and snippets compiled for browser -->
<script src="https://cloud9ide.github.io/emmet-core/emmet.js"></script>
<script src="kitchen-sink/require.js"></script>
<script>
// setup paths
require.config({paths: { "ace" : "../lib/ace"}});
// load ace and extensions
require(["ace/ace", "ace/ext/emmet"], function(ace) {
var editor = ace.edit("editor");
editor.session.setMode("ace/mode/html");
// enable emmet on the current editor
editor.setOption("enableEmmet", true);
});
</script>
<script src="./show_own_source.js"></script>
</body>
</html>

44
demo/ie7.html Normal file
View file

@ -0,0 +1,44 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>ACE Editor StatusBar Demo</title>
<style type="text/css" media="screen">
/*!important without this top: 0; bottom: 0 doesn't work on old ie */
body, html {
position: absolute;
top: 0px; bottom: 0; left: 0; right: 0;
margin:0; padding:0;
overflow:hidden
}
#editor {
margin: 0;
position: absolute;
top: 0; bottom: 0; left: 0; right: 0;
}
</style>
</head>
<body>
<pre id="editor">
require("ace/ext/old_ie");
// now ace will work even on ie7!
var editor = ace.edit("editor");
</pre>
<script src="../build/src/ace.js"></script>
<script src="../build/src/ext-old_ie.js"></script>
<script>
// before creating an editor patch up things for old ie
require("ace/ext/old_ie");
// now ace will work even on ie7!
var editor = ace.edit("editor");
editor.setTheme("ace/theme/textmate");
editor.session.setMode("ace/mode/javascript");
</script>
</body>
</html>

View file

@ -22,8 +22,11 @@
<pre id="editor"></pre>
<script src="../build/src-noconflict/ace.js"></script>
<script src="kitchen-sink/require.js"></script>
<script>
// setup paths
require.config({paths: { "ace" : "../lib/ace"}});
require(["ace/ace"], function(ace) {
var editor = ace.edit("editor")
editor.setTheme("ace/theme/twilight")
editor.session.setMode("ace/mode/html")
@ -33,14 +36,16 @@
name: "showKeyboardShortcuts",
bindKey: {win: "Ctrl-Alt-h", mac: "Command-Alt-h"},
exec: function(editor) {
config.loadModule("ace/ext/keybinding_menu", function(module) {
ace.config.loadModule("ace/ext/keybinding_menu", function(module) {
module.init(editor);
editor.showKeyboardShortcuts()
})
}
})
editor.execCommand("showKeyboardShortcuts")
})
</script>
<script src="./demo_helper.js"></script>
<script src="./show_own_source.js"></script>
</body>
</html>

View file

@ -33,6 +33,13 @@ define(function(require, exports, module) {
"use strict";
require("ace/lib/fixoldbrowsers");
require("ace/multi_select");
require("ace/ext/spellcheck");
require("./inline_editor");
require("./dev_util");
require("./file_drop");
var config = require("ace/config");
config.init();
var env = {};
@ -51,12 +58,14 @@ var HashHandler = require("ace/keyboard/hash_handler").HashHandler;
var Renderer = require("ace/virtual_renderer").VirtualRenderer;
var Editor = require("ace/editor").Editor;
var MultiSelect = require("ace/multi_select").MultiSelect;
var whitespace = require("ace/ext/whitespace");
var doclist = require("./doclist");
var modelist = require("ace/ext/modelist");
var themelist = require("ace/ext/themelist");
var layout = require("./layout");
var TokenTooltip = require("./token_tooltip").TokenTooltip;
var util = require("./util");
@ -69,6 +78,12 @@ var ElasticTabstopsLite = require("ace/ext/elastic_tabstops_lite").ElasticTabsto
var IncrementalSearch = require("ace/incremental_search").IncrementalSearch;
var workerModule = require("ace/worker/worker_client");
if (location.href.indexOf("noworker") !== -1) {
workerModule.WorkerClient = workerModule.UIWorkerClient;
}
/*********** create editor ***************************/
var container = document.getElementById("editor-container");
@ -82,11 +97,7 @@ split.on("focus", function(editor) {
});
env.split = split;
window.env = env;
window.ace = env.editor;
env.editor.setAnimatedScroll(true);
// add multiple cursor support to editor
require("ace/multi_select").MultiSelect(env.editor);
var consoleEl = dom.createElement("div");
container.parentNode.appendChild(consoleEl);
@ -155,11 +166,11 @@ env.editor.commands.addCommands([{
bindKey: "ctrl+enter",
exec: function(editor) {
try {
var r = eval(editor.getCopyText()||editor.getValue());
var r = window.eval(editor.getCopyText() || editor.getValue());
} catch(e) {
r = e;
}
editor.cmdLine.setValue(r + "")
editor.cmdLine.setValue(r + "");
},
readOnly: true
}, {
@ -168,8 +179,28 @@ env.editor.commands.addCommands([{
exec: function(editor) {
config.loadModule("ace/ext/keybinding_menu", function(module) {
module.init(editor);
editor.showKeyboardShortcuts()
})
editor.showKeyboardShortcuts();
});
}
}, {
name: "increaseFontSize",
bindKey: "Ctrl-=|Ctrl-+",
exec: function(editor) {
var size = parseInt(editor.getFontSize(), 10) || 12;
editor.setFontSize(size + 1);
}
}, {
name: "decreaseFontSize",
bindKey: "Ctrl+-|Ctrl-_",
exec: function(editor) {
var size = parseInt(editor.getFontSize(), 10) || 12;
editor.setFontSize(Math.max(size - 1 || 1));
}
}, {
name: "resetFontSize",
bindKey: "Ctrl+0|Ctrl-Numpad0",
exec: function(editor) {
editor.setFontSize(12);
}
}]);
@ -193,7 +224,31 @@ var commands = env.editor.commands;
commands.addCommand({
name: "save",
bindKey: {win: "Ctrl-S", mac: "Command-S"},
exec: function() {alert("Fake Save File");}
exec: function(arg) {
var session = env.editor.session;
var name = session.name.match(/[^\/]+$/);
localStorage.setItem(
"saved_file:" + name,
session.getValue()
);
env.editor.cmdLine.setValue("saved "+ name);
}
});
commands.addCommand({
name: "load",
bindKey: {win: "Ctrl-O", mac: "Command-O"},
exec: function(arg) {
var session = env.editor.session;
var name = session.name.match(/[^\/]+$/);
var value = localStorage.getItem("saved_file:" + name);
if (typeof value == "string") {
session.setValue(value);
env.editor.cmdLine.setValue("loaded "+ name);
} else {
env.editor.cmdLine.setValue("no previuos value saved for "+ name);
}
}
});
var keybindings = {
@ -241,6 +296,7 @@ var showGutterEl = document.getElementById("show_gutter");
var showPrintMarginEl = document.getElementById("show_print_margin");
var highlightSelectedWordE = document.getElementById("highlight_selected_word");
var showHScrollEl = document.getElementById("show_hscroll");
var showVScrollEl = document.getElementById("show_vscroll");
var animateScrollEl = document.getElementById("animate_scroll");
var softTabEl = document.getElementById("soft_tab");
var behavioursEl = document.getElementById("enable_behaviours");
@ -259,26 +315,25 @@ doclist.history = doclist.docs.map(function(doc) {
});
doclist.history.index = 0;
doclist.cycleOpen = function(editor, dir) {
var h = this.history
var h = this.history;
h.index += dir;
if (h.index >= h.length)
if (h.index >= h.length)
h.index = 0;
else if (h.index <= 0)
h.index = h.length - 1;
var s = h[h.index];
docEl.value = s;
docEl.onchange();
h.index
}
};
doclist.addToHistory = function(name) {
var h = this.history
var h = this.history;
var i = h.indexOf(name);
if (i != h.index) {
if (i != -1)
h.splice(i, 1);
h.index = h.push(name);
}
}
};
bindDropdown("doc", function(name) {
doclist.loadDoc(name, function(session) {
@ -316,20 +371,26 @@ function updateUIEditorOptions() {
saveOption(behavioursEl, editor.getBehavioursEnabled());
}
themelist.themes.forEach(function(x){ x.value = x.theme });
fillDropdown(themeEl, {
Bright: themelist.themes.filter(function(x){return !x.isDark}),
Dark: themelist.themes.filter(function(x){return x.isDark}),
});
event.addListener(themeEl, "mouseover", function(e){
this.desiredValue = e.target.value;
if (!this.$timer)
this.$timer = setTimeout(this.updateTheme);
themeEl.desiredValue = e.target.value;
if (!themeEl.$timer)
themeEl.$timer = setTimeout(themeEl.updateTheme);
});
event.addListener(themeEl, "mouseout", function(e){
this.desiredValue = null;
if (!this.$timer)
this.$timer = setTimeout(this.updateTheme, 20);
themeEl.desiredValue = null;
if (!themeEl.$timer)
themeEl.$timer = setTimeout(themeEl.updateTheme, 20);
});
themeEl.updateTheme = function(){
env.split.setTheme(themeEl.desiredValue || themeEl.selectedValue);
env.split.setTheme((themeEl.desiredValue || themeEl.selectedValue));
themeEl.$timer = null;
};
@ -354,28 +415,11 @@ bindDropdown("folding", function(value) {
});
bindDropdown("soft_wrap", function(value) {
var session = env.editor.session;
var renderer = env.editor.renderer;
switch (value) {
case "off":
session.setUseWrapMode(false);
renderer.setPrintMarginColumn(80);
break;
case "free":
session.setUseWrapMode(true);
session.setWrapLimitRange(null, null);
renderer.setPrintMarginColumn(80);
break;
default:
session.setUseWrapMode(true);
var col = parseInt(value, 10);
session.setWrapLimitRange(col, col);
renderer.setPrintMarginColumn(col);
}
env.editor.setOption("wrap", value);
});
bindCheckbox("select_style", function(checked) {
env.editor.setSelectionStyle(checked ? "line" : "text");
env.editor.setOption("selectionStyle", checked ? "line" : "text");
});
bindCheckbox("highlight_active", function(checked) {
@ -403,7 +447,11 @@ bindCheckbox("highlight_selected_word", function(checked) {
});
bindCheckbox("show_hscroll", function(checked) {
env.editor.renderer.setHScrollBarAlwaysVisible(checked);
env.editor.setOption("hScrollBarAlwaysVisible", checked);
});
bindCheckbox("show_vscroll", function(checked) {
env.editor.setOption("vScrollBarAlwaysVisible", checked);
});
bindCheckbox("animate_scroll", function(checked) {
@ -424,6 +472,9 @@ bindCheckbox("fade_fold_widgets", function(checked) {
bindCheckbox("read_only", function(checked) {
env.editor.setReadOnly(checked);
});
bindCheckbox("scrollPastEnd", function(checked) {
env.editor.setOption("scrollPastEnd", checked);
});
bindDropdown("split", function(value) {
var sp = env.split;
@ -475,59 +526,20 @@ bindCheckbox("highlight_token", function(checked) {
}
});
/************** dragover ***************************/
event.addListener(container, "dragover", function(e) {
var types = e.dataTransfer.types;
if (types && Array.prototype.indexOf.call(types, 'Files') !== -1)
return event.preventDefault(e);
});
event.addListener(container, "drop", function(e) {
var file;
try {
file = e.dataTransfer.files[0];
if (window.FileReader) {
var reader = new FileReader();
reader.onload = function() {
var mode = modelist.getModeForPath(file.name);
env.editor.session.doc.setValue(reader.result);
modeEl.value = mode.name;
env.editor.session.setMode(mode.mode);
env.editor.session.modeName = mode.name;
};
reader.readAsText(file);
}
return event.preventDefault(e);
} catch(err) {
return event.stopEvent(e);
}
});
var StatusBar = require("ace/ext/statusbar").StatusBar;
new StatusBar(env.editor, cmdLine.container);
var Emmet = require("ace/ext/emmet");
net.loadScript("https://rawgithub.com/nightwing/emmet-core/master/emmet.js", function() {
net.loadScript("https://cloud9ide.github.io/emmet-core/emmet.js", function() {
Emmet.setCore(window.emmet);
env.editor.setOption("enableEmmet", true);
})
});
require("ace/placeholder").PlaceHolder;
// require("ace/placeholder").PlaceHolder;
var snippetManager = require("ace/snippets").snippetManager
var jsSnippets = require("ace/snippets/javascript");
window.snippetManager = snippetManager
saveSnippets()
function saveSnippets() {
jsSnippets.snippets = snippetManager.parseSnippetFile(jsSnippets.snippetText);
snippetManager.register(jsSnippets.snippets, "javascript")
}
var snippetManager = require("ace/snippets").snippetManager;
env.editSnippets = function() {
var sp = env.split;
@ -538,25 +550,36 @@ env.editSnippets = function() {
sp.setSplits(1);
sp.setSplits(2);
sp.setOrientation(sp.BESIDE);
var editor = sp.$editors[1]
if (!env.snippetSession) {
var file = jsSnippets.snippetText;
env.snippetSession = doclist.initDoc(file, "", {});
env.snippetSession.setMode("ace/mode/tmsnippet");
env.snippetSession.setUseSoftTabs(false);
var editor = sp.$editors[1];
var id = sp.$editors[0].session.$mode.$id || "";
var m = snippetManager.files[id];
if (!doclist["snippets/" + id]) {
var text = m.snippetText;
var s = doclist.initDoc(text, "", {});
s.setMode("ace/mode/snippets");
doclist["snippets/" + id] = s;
}
editor.on("blur", function() {
jsSnippets.snippetText = editor.getValue();
saveSnippets();
})
editor.setSession(env.snippetSession, 1);
m.snippetText = editor.getValue();
snippetManager.unregister(m.snippets);
m.snippets = snippetManager.parseSnippetFile(m.snippetText, m.scope);
snippetManager.register(m.snippets);
});
sp.$editors[0].once("changeMode", function() {
sp.setSplits(1);
});
editor.setSession(doclist["snippets/" + id], 1);
editor.focus();
}
};
ace.commands.bindKey("Tab", function(editor) {
var success = snippetManager.expandWithTab(editor);
if (!success)
editor.execCommand("indent");
})
require("ace/ext/language_tools");
env.editor.setOptions({
enableBasicAutocompletion: true,
enableLiveAutocompletion: false,
enableSnippets: true
});
var beautify = require("ace/ext/beautify");
env.editor.commands.addCommands(beautify.commands);
});

View file

@ -0,0 +1,217 @@
/* ***** BEGIN LICENSE BLOCK *****
* Distributed under the BSD license:
*
* Copyright (c) 2010, Ajax.org B.V.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* * Neither the name of Ajax.org B.V. nor the
* names of its contributors may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* ***** END LICENSE BLOCK ***** */
define(function(require, exports, module) {
var dom = require("ace/lib/dom");
var Range = require("ace/range").Range;
function warn() {
var s = (new Error()).stack || "";
s = s.split("\n");
if (s[1] == "Error") s.shift(); // remove error description on chrome
s.shift(); // remove warn
s.shift(); // remove the getter
s = s.join("\n");
// allow easy access to ace in console, but not in ace code
if (!/at Object.InjectedScript.|@debugger eval|snippets:\/{3}|\(<anonymous>:\d+:\d+\)/.test(s)) {
console.error("trying to access to global variable");
}
}
function def(o, key, get) {
try {
Object.defineProperty(o, key, {
configurable: true,
get: get,
set: function(val) {
delete o[key];
o[key] = val;
}
});
} catch(e) {
console.error(e);
}
}
def(window, "ace", function(){ warn(); return window.env.editor });
def(window, "editor", function(){ warn(); return window.env.editor });
def(window, "session", function(){ warn(); return window.env.editor.session });
def(window, "split", function(){ warn(); return window.env.split });
def(window, "devUtil", function(){ warn(); return exports });
exports.showTextArea = function(argument) {
dom.importCssString("\
.ace_text-input {\
position: absolute;\
z-index: 10!important;\
width: 6em!important;\
height: 1em;\
opacity: 1!important;\
background: rgba(0, 92, 255, 0.11);\
border: none;\
font: inherit;\
padding: 0 1px;\
margin: 0 -1px;\
text-indent: 0em;\
}\
");
};
exports.addGlobals = function() {
window.oop = require("ace/lib/oop");
window.dom = require("ace/lib/dom");
window.Range = require("ace/range").Range;
window.Editor = require("ace/editor").Editor;
window.assert = require("ace/test/asyncjs/assert");
window.asyncjs = require("ace/test/asyncjs/async");
window.UndoManager = require("ace/undomanager").UndoManager;
window.EditSession = require("ace/edit_session").EditSession;
window.MockRenderer = require("ace/test/mockrenderer").MockRenderer;
window.EventEmitter = require("ace/lib/event_emitter").EventEmitter;
window.getSelection = getSelection;
window.setSelection = setSelection;
window.testSelection = testSelection;
};
function getSelection(editor) {
var data = editor.multiSelect.toJSON();
if (!data.length) data = [data];
data = data.map(function(x) {
var a, c;
if (x.isBackwards) {
a = x.end;
c = x.start;
} else {
c = x.end;
a = x.start;
}
return Range.comparePoints(a, c)
? [a.row, a.column, c.row, c.column]
: [a.row, a.column];
});
return data.length > 1 ? data : data[0];
}
function setSelection(editor, data) {
if (typeof data[0] == "number")
data = [data];
editor.selection.fromJSON(data.map(function(x) {
var start = {row: x[0], column: x[1]};
var end = x.length == 2 ? start : {row: x[2], column: x[3]};
var isBackwards = Range.comparePoints(start, end) > 0;
return isBackwards ? {
start: end,
end: start,
isBackwards: true
} : {
start: start,
end: end,
isBackwards: true
};
}));
}
function testSelection(editor, data) {
assert.equal(getSelection(editor) + "", data + "");
}
exports.recordTestCase = function() {
exports.addGlobals();
var editor = window.editor;
var testcase = window.testcase = [];
var assert;
testcase.push({
type: "setValue",
data: editor.getValue()
}, {
type: "setSelection",
data: getSelection(editor)
});
editor.commands.on("afterExec", function(e) {
testcase.push({
type: "exec",
data: e
});
testcase.push({
type: "value",
data: editor.getValue()
});
testcase.push({
type: "selection",
data: getSelection(editor)
});
});
editor.on("mouseup", function() {
testcase.push({
type: "setSelection",
data: getSelection(editor)
});
});
testcase.toString = function() {
var lastValue = "";
// var lastSelection = ""
var str = this.map(function(x) {
var data = x.data;
switch (x.type) {
case "exec":
return 'editor.execCommand("'
+ data.command.name
+ (data.args ? '", ' + JSON.stringify(data.args) : '"')
+ ')';
case "setSelection":
return 'setSelection(editor, ' + JSON.stringify(data) + ')';
case "setValue":
if (lastValue != data) {
lastValue = data;
return 'editor.setValue(' + JSON.stringify(data) + ', -1)';
}
return;
case "selection":
return 'testSelection(editor, ' + JSON.stringify(data) + ')';
case "value":
if (lastValue != data) {
lastValue = data;
return 'assert.equal('
+ 'editor.getValue(),'
+ JSON.stringify(data)
+ ')';
}
return;
}
}).filter(Boolean).join("\n");
return getSelection + "\n"
+ testSelection + "\n"
+ setSelection + "\n"
+ "\n" + str + "\n";
};
};
});

View file

@ -66,103 +66,51 @@ function makeHuge(txt) {
}
var docs = {
"docs/javascript.js": "JavaScript",
"docs/AsciiDoc.asciidoc": "AsciiDoc",
"docs/clojure.clj": "Clojure",
"docs/coffeescript.coffee": "CoffeeScript",
"docs/coldfusion.cfm": "ColdFusion",
"docs/cpp.cpp": "C/C++",
"docs/csharp.cs": "C#",
"docs/css.css": "CSS",
"docs/curly.curly": "Curly",
"docs/dart.dart": "Dart",
"docs/diff.diff": "Diff",
"docs/dot.dot": "Dot",
"docs/freemarker.ftl" : "FreeMarker",
"docs/glsl.glsl": "Glsl",
"docs/golang.go": "Go",
"docs/groovy.groovy": "Groovy",
"docs/haml.haml": "Haml",
"docs/Haxe.hx": "haXe",
"docs/html.html": "HTML",
"docs/html_ruby.erb": "HTML (Ruby)",
"docs/jade.jade": "Jade",
"docs/java.java": "Java",
"docs/jsp.jsp": "JSP",
"docs/json.json": "JSON",
"docs/jsx.jsx": "JSX",
"docs/javascript.js": {order: 1, name: "JavaScript"},
"docs/latex.tex": {name: "LaTeX", wrapped: true},
"docs/less.less": "LESS",
"docs/lisp.lisp": "Lisp",
"docs/lsl.lsl": "LSL",
"docs/scheme.scm": "Scheme",
"docs/livescript.ls": "LiveScript",
"docs/liquid.liquid": "Liquid",
"docs/logiql.logic": "LogiQL",
"docs/lua.lua": "Lua",
"docs/lucene.lucene": "Lucene",
"docs/luapage.lp": "LuaPage",
"docs/Makefile": "Makefile",
"docs/markdown.md": {name: "Markdown", wrapped: true},
"docs/mushcode.mc": {name: "MUSHCode", wrapped: true},
"docs/objectivec.m": {name: "Objective-C"},
"docs/ocaml.ml": "OCaml",
"docs/OpenSCAD.scad": "OpenSCAD",
"docs/pascal.pas": "Pascal",
"docs/perl.pl": "Perl",
"docs/pgsql.pgsql": {name: "pgSQL", wrapped: true},
"docs/php.php": "PHP",
"docs/plaintext.txt": {name: "Plain Text", prepare: makeHuge, wrapped: true},
"docs/powershell.ps1": "Powershell",
"docs/properties.properties": "Properties",
"docs/python.py": "Python",
"docs/r.r": "R",
"docs/rdoc.Rd": "RDoc",
"docs/rhtml.rhtml": "RHTML",
"docs/ruby.rb": "Ruby",
"docs/abap.abap": "SAP - ABAP",
"docs/scala.scala": "Scala",
"docs/scss.scss": "SCSS",
"docs/sass.sass": "SASS",
"docs/sh.sh": "SH",
"docs/stylus.styl": "Stylus",
"docs/sql.sql": {name: "SQL", wrapped: true},
"docs/svg.svg": "SVG",
"docs/tcl.tcl": "Tcl",
"docs/tex.tex": "Tex",
"docs/textile.textile": {name: "Textile", wrapped: true},
"docs/snippets.snippets": "snippets",
"docs/toml.toml": "TOML",
"docs/typescript.ts": "Typescript",
"docs/vbscript.vbs": "VBScript",
"docs/velocity.vm": "Velocity",
"docs/xml.xml": "XML",
"docs/xquery.xq": "XQuery",
"docs/yaml.yaml": "YAML",
"docs/c9search.c9search_results": "C9 Search Results",
"docs/actionscript.as": "ActionScript",
"docs/assembly_x86.asm": "Assembly_x86",
"docs/autohotkey.ahk": "AutoHotKey",
"docs/batchfile.bat": "BatchFile",
"docs/erlang/erl": "Erlang",
"docs/forth.frt": "Forth",
"docs/haskell.hs": "Haskell",
"docs/julia.js": "Julia",
"docs/prolog/plg": "Prolog",
"docs/rust.rs": "Rust",
"docs/twig.twig": "Twig"
"docs/mel.mel": "MEL",
"docs/Nix.nix": "Nix"
};
var ownSource = {
/* filled from require*/
};
var hugeDocs = {
var hugeDocs = require.toUrl ? {
"build/src/ace.js": "",
"build/src-min/ace.js": ""
} : {
"src/ace.js": "",
"src-min/ace.js": ""
};
modelist.modes.forEach(function(m) {
var ext = m.extensions.split("|")[0];
if (ext[0] === "^") {
path = ext.substr(1);
} else {
var path = m.name + "." + ext;
}
path = "docs/" + path;
if (!docs[path]) {
docs[path] = {name: m.caption};
} else if (typeof docs[path] == "object" && !docs[path].name) {
docs[path].name = m.caption;
}
});
if (window.require && window.require.s) try {
for (var path in window.require.s.contexts._.defined) {
if (path.indexOf("!") != -1)
@ -173,6 +121,13 @@ if (window.require && window.require.s) try {
}
} catch(e) {}
function sort(list) {
return list.sort(function(a, b) {
var cmp = (b.order || 0) - (a.order || 0);
return cmp || a.name && a.name.localeCompare(b.name);
});
}
function prepareDocList(docs) {
var list = [];
for (var path in docs) {
@ -214,13 +169,44 @@ function loadDoc(name, callback) {
});
}
function saveDoc(name, callback) {
var doc = fileCache[name] || name;
if (!doc || !doc.session)
return callback("Unknown document: " + name);
var path = doc.path;
var parts = path.split("/");
if (parts[0] == "docs")
path = "demo/kitchen-sink/" + path;
else if (parts[0] == "ace")
path = "lib/" + path;
upload(path, doc.session.getValue(), callback);
}
function upload(url, data, callback) {
url = net.qualifyURL(url);
if (!/https?:/.test(url))
return callback(new Error("Unsupported url scheme"));
var xhr = new XMLHttpRequest();
xhr.open("PUT", url, true);
xhr.onreadystatechange = function () {
if (xhr.readyState === 4) {
callback(!/^2../.test(xhr.status));
}
};
xhr.send(data);
};
module.exports = {
fileCache: fileCache,
docs: prepareDocList(docs),
docs: sort(prepareDocList(docs)),
ownSource: prepareDocList(ownSource),
hugeDocs: prepareDocList(hugeDocs),
initDoc: initDoc,
loadDoc: loadDoc
loadDoc: loadDoc,
saveDoc: saveDoc,
};
module.exports.all = {
"Mode Examples": module.exports.docs,

11
demo/kitchen-sink/docs/.gitignore vendored Normal file
View file

@ -0,0 +1,11 @@
# A sample .gitignore file.
.buildlog
.DS_Store
.svn
# Negated patterns:
!foo.bar
# Also ignore user settings...
/.settings

View file

@ -0,0 +1,53 @@
#
# example Dockerfile for http://docs.docker.io/en/latest/examples/postgresql_service/
#
FROM ubuntu
MAINTAINER SvenDowideit@docker.com
# Add the PostgreSQL PGP key to verify their Debian packages.
# It should be the same key as https://www.postgresql.org/media/keys/ACCC4CF8.asc
RUN apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys B97B0AFCAA1A47F044F244A07FCC7D46ACCC4CF8
# Add PostgreSQL's repository. It contains the most recent stable release
# of PostgreSQL, ``9.3``.
RUN echo "deb http://apt.postgresql.org/pub/repos/apt/ precise-pgdg main" > /etc/apt/sources.list.d/pgdg.list
# Update the Ubuntu and PostgreSQL repository indexes
RUN apt-get update
# Install ``python-software-properties``, ``software-properties-common`` and PostgreSQL 9.3
# There are some warnings (in red) that show up during the build. You can hide
# them by prefixing each apt-get statement with DEBIAN_FRONTEND=noninteractive
RUN apt-get -y -q install python-software-properties software-properties-common
RUN apt-get -y -q install postgresql-9.3 postgresql-client-9.3 postgresql-contrib-9.3
# Note: The official Debian and Ubuntu images automatically ``apt-get clean``
# after each ``apt-get``
# Run the rest of the commands as the ``postgres`` user created by the ``postgres-9.3`` package when it was ``apt-get installed``
USER postgres
# Create a PostgreSQL role named ``docker`` with ``docker`` as the password and
# then create a database `docker` owned by the ``docker`` role.
# Note: here we use ``&&\`` to run commands one after the other - the ``\``
# allows the RUN command to span multiple lines.
RUN /etc/init.d/postgresql start &&\
psql --command "CREATE USER docker WITH SUPERUSER PASSWORD 'docker';" &&\
createdb -O docker docker
# Adjust PostgreSQL configuration so that remote connections to the
# database are possible.
RUN echo "host all all 0.0.0.0/0 md5" >> /etc/postgresql/9.3/main/pg_hba.conf
# And add ``listen_addresses`` to ``/etc/postgresql/9.3/main/postgresql.conf``
RUN echo "listen_addresses='*'" >> /etc/postgresql/9.3/main/postgresql.conf
# Expose the PostgreSQL port
EXPOSE 5432
# Add VOLUMEs to allow backup of config, logs and databases
VOLUME ["/etc/postgresql", "/var/log/postgresql", "/var/lib/postgresql"]
# Set the default command to run when starting the container
CMD ["/usr/lib/postgresql/9.3/bin/postgres", "-D", "/var/lib/postgresql/9.3/main", "-c", "config_file=/etc/postgresql/9.3/main/postgresql.conf"]

View file

@ -0,0 +1,247 @@
vars it, p
p = {label, value|
print("\n" + label)
print(inspect(value))
}
-- Create an array from 0 to 15
p("range", i-collect(range(5)))
-- Create an array from 0 to 15 and break up in chunks of 4
p("chunked range", i-collect(i-chunk(4, range(16))))
-- Check if all or none items in stream pass test.
p("all < 60 in range(60)", i-all?({i|i<60}, range(60)))
p("any < 60 in range(60)", i-any?({i|i>60}, range(60)))
p("all < 60 in range(70)", i-all?({i|i<60}, range(70)))
p("any < 60 in range(70)", i-any?({i|i>60}, range(70)))
-- Zip three different collections together
p("zipped", i-collect(i-zip(
range(10),
[1,2,3,4,5],
i-map({i|i*i}, range(10))
)))
vars names, person, i, doubles, lengths, cubeRange
names = ["Thorin", "Dwalin", "Balin", "Bifur", "Bofur", "Bombur", "Oin",
"Gloin", "Ori", "Nori", "Dori", "Fili", "Kili", "Bilbo", "Gandalf"]
for name in names {
if name != "Bilbo" && name != "Gandalf" {
print(name)
}
}
person = {name: "Tim", age: 30}
for key, value in person {
print(key + " = " + value)
}
i = 0
while i < 10 {
i = i + 1
print(i)
}
print("range")
for i in range(10) {
print(i + 1)
}
for i in range(10) {
print(10 - i)
}
-- Dynamic object that gives the first 10 doubles
doubles = {
@len: {| 10 }
@get: {key|
if key is Integer { key * key }
}
}
print("#doubles", #doubles)
print("Doubles")
for k, v in doubles {
print([k, v])
}
-- Dynamic object that has names list as keys and string lenth as values
lengths = {
@keys: {| names }
@get: {key|
if key is String { #key }
}
}
print ("Lengths")
for k, v in lengths {
print([k, v])
}
cubeRange = {n|
vars i, v
i = 0
{
@call: {|
v = i
i = i + 1
if v < n { v * v * v }
}
}
}
print("Cubes")
for k, v in cubeRange(5) {
print([k, v])
}
print("String")
for k, v in "Hello World" {
print([k, v])
}
print([i for i in range(10)])
print([i for i in range(20) if i % 3])
-- Example showing how to do parallel work using split..and
base = {bootstrap, target-dir|
split {
copy("res", target-dir)
} and {
if newer("src/*.less", target-dir + "/style.css") {
lessc("src/" + bootstrap + ".less", target-dir + "/style.css")
}
} and {
build("src/" + bootstrap + ".js", target-dir + "/app.js")
}
}
vars Dragon, pet
Dragon = {name|
vars asleep, stuff-in-belly, stuff-in-intestine,
feed, walk, put-to-bed, toss, rock,
hungry?, poopy?, passage-of-time
asleep = false
stuff-in-belly = 10 -- He's full.
stuff-in-intestine = 0 -- He doesn't need to go.
print(name + ' is born.')
feed = {|
print('You feed ' + name + '.')
stuff-in-belly = 10
passage-of-time()
}
walk = {|
print('You walk ' + name + ".")
stuff-in-intestine = 0
passage-of-time
}
put-to-bed = {|
print('You put ' + name + ' to bed.')
asleep = true
for i in range(3) {
if asleep {
passage-of-time()
}
if asleep {
print(name + ' snores, filling the room with smoke.')
}
}
if asleep {
asleep = false
print(name + ' wakes up slowly.')
}
}
toss = {|
print('You toss ' + name + ' up into the air.')
print('He giggles, which singes your eyebrows.')
passage-of-time()
}
rock = {|
print('You rock ' + name + ' gently.')
asleep = true
print('He briefly dozes off...')
passage-of-time()
if asleep {
asleep = false
print('...but wakes when you stop.')
}
}
hungry? = {|
stuff-in-belly <= 2
}
poopy? = {|
stuff-in-intestine >= 8
}
passage-of-time = {|
if stuff-in-belly > 0 {
-- Move food from belly to intestine
stuff-in-belly = stuff-in-belly - 1
stuff-in-intestine = stuff-in-intestine + 1
} else { -- Our dragon is starving!
if asleep {
asleep = false
print('He wakes up suddenly!')
}
print(name + ' is starving! In desperation, he ate YOU!')
abort "died"
}
if stuff-in-intestine >= 10 {
stuff-in-intestine = 0
print('Whoops! ' + name + ' had an accident...')
}
if hungry?() {
if asleep {
asleep = false
print('He wakes up suddenly!')
}
print(name + "'s stomach grumbles...")
}
if poopy?() {
if asleep {
asleep = false
print('He wakes up suddenly!')
}
print(name + ' does the potty dance...')
}
}
-- Export the public interface to this closure object.
{
feed: feed
walk: walk
put-to-bed: put-to-bed
toss: toss
rock: rock
}
}
pet = Dragon('Norbert')
pet.feed()
pet.toss()
pet.walk()
pet.put-to-bed()
pet.rock()
pet.put-to-bed()
pet.put-to-bed()
pet.put-to-bed()
pet.put-to-bed()

View file

@ -0,0 +1,57 @@
{
# Name of our deployment
network.description = "HelloWorld";
# Enable rolling back to previous versions of our infrastructure
network.enableRollback = true;
# It consists of a single server named 'helloserver'
helloserver =
# Every server gets passed a few arguments, including a reference
# to nixpkgs (pkgs)
{ config, pkgs, ... }:
let
# We import our custom packages from ./default passing pkgs as argument
packages = import ./default.nix { pkgs = pkgs; };
# This is the nodejs version specified in default.nix
nodejs = packages.nodejs;
# And this is the application we'd like to deploy
app = packages.app;
in
{
# We'll be running our application on port 8080, because a regular
# user cannot bind to port 80
# Then, using some iptables magic we'll forward traffic designated to port 80 to 8080
networking.firewall.enable = true;
# We will open up port 22 (SSH) as well otherwise we're locking ourselves out
networking.firewall.allowedTCPPorts = [ 80 8080 22 ];
networking.firewall.allowPing = true;
# Port forwarding using iptables
networking.firewall.extraCommands = ''
iptables -t nat -A PREROUTING -p tcp --dport 80 -j REDIRECT --to-port 8080
'';
# To run our node.js program we're going to use a systemd service
# We can configure the service to automatically start on boot and to restart
# the process in case it crashes
systemd.services.helloserver = {
description = "Hello world application";
# Start the service after the network is available
after = [ "network.target" ];
# We're going to run it on port 8080 in production
environment = { PORT = "8080"; };
serviceConfig = {
# The actual command to run
ExecStart = "${nodejs}/bin/node ${app}/server.js";
# For security reasons we'll run this process as a special 'nodejs' user
User = "nodejs";
Restart = "always";
};
};
# And lastly we ensure the user we run our application as is created
users.extraUsers = {
nodejs = { };
};
};
}

View file

@ -0,0 +1,171 @@
%abc-2.1
H:This file contains some example English tunes
% note that the comments (like this one) are to highlight usages
% and would not normally be included in such detail
O:England % the origin of all tunes is England
X:1 % tune no 1
T:Dusty Miller, The % title
T:Binny's Jig % an alternative title
C:Trad. % traditional
R:DH % double hornpipe
M:3/4 % meter
K:G % key
B>cd BAG|FA Ac BA|B>cd BAG|DG GB AG:|
Bdd gfg|aA Ac BA|Bdd gfa|gG GB AG:|
BG G/2G/2G BG|FA Ac BA|BG G/2G/2G BG|DG GB AG:|
W:Hey, the dusty miller, and his dusty coat;
W:He will win a shilling, or he spend a groat.
W:Dusty was the coat, dusty was the colour;
W:Dusty was the kiss, that I got frae the miller.
X:2
T:Old Sir Simon the King
C:Trad.
S:Offord MSS % from Offord manuscript
N:see also Playford % reference note
M:9/8
R:SJ % slip jig
N:originally in C % transcription note
K:G
D|GFG GAG G2D|GFG GAG F2D|EFE EFE EFG|A2G F2E D2:|
D|GAG GAB d2D|GAG GAB c2D|[1 EFE EFE EFG|[A2G] F2E D2:|\ % no line-break in score
M:12/8 % change of meter
[2 E2E EFE E2E EFG|\ % no line-break in score
M:9/8 % change of meter
A2G F2E D2|]
X:3
T:William and Nancy
T:New Mown Hay
T:Legacy, The
C:Trad.
O:England; Gloucs; Bledington % place of origin
B:Sussex Tune Book % can be found in these books
B:Mally's Cotswold Morris vol.1 2
D:Morris On % can be heard on this record
P:(AB)2(AC)2A % play the parts in this order
M:6/8
K:G
[P:A] D|"G"G2G GBd|"C"e2e "G"dBG|"D7"A2d "G"BAG|"C"E2"D7"F "G"G2:|
[P:B] d|"G"e2d B2d|"C"gfe "G"d2d| "G"e2d B2d|"C"gfe "D7"d2c|
"G"B2B Bcd|"C"e2e "G"dBG|"D7"A2d "G"BAG|"C"E2"D7"F "G"G2:|
% changes of meter, using inline fields
[T:Slows][M:4/4][L:1/4][P:C]"G"d2|"C"e2 "G"d2|B2 d2|"Em"gf "A7"e2|"D7"d2 "G"d2|\
"C"e2 "G"d2|[M:3/8][L:1/8] "G"B2 d |[M:6/8] "C"gfe "D7"d2c|
"G"B2B Bcd|"C"e2e "G"dBG|"D7"A2d "G"BAG|"C"E2"D7"F "G"G2:|
X:4
T:South Downs Jig
R:jig
S:Robert Harbron
M:6/8
L:1/8
K:G
|: d | dcA G3 | EFG AFE | DEF GAB | cde d2d |
dcA G3 | EFG AFE | DEF GAB | cAF G2 :|
B | Bcd e2c | d2B c2A | Bcd e2c | [M:9/8]d2B c2B A3 |
[M:6/8]DGF E3 | cBA FED | DEF GAB |1 cAF G2 :|2 cAF G3 |]
X:5
T:Atholl Brose
% in this example, which reproduces Highland Bagpipe gracing,
% the large number of grace notes mean that it is more convenient to be specific about
% score line-breaks (using the $ symbol), rather than using code line breaks to indicate them
I:linebreak $
K:D
{gcd}c<{e}A {gAGAG}A2 {gef}e>A {gAGAG}Ad|
{gcd}c<{e}A {gAGAG}A>e {ag}a>f {gef}e>d|
{gcd}c<{e}A {gAGAG}A2 {gef}e>A {gAGAG}Ad|
{g}c/d/e {g}G>{d}B {gf}gG {dc}d>B:|$
{g}c<e {gf}g>e {ag}a>e {gf}g>e|
{g}c<e {gf}g>e {ag}a2 {GdG}a>d|
{g}c<e {gf}g>e {ag}a>e {gf}g>f|
{gef}e>d {gf}g>d {gBd}B<{e}G {dc}d>B|
{g}c<e {gf}g>e {ag}a>e {gf}g>e|
{g}c<e {gf}g>e {ag}a2 {GdG}ad|
{g}c<{GdG}e {gf}ga {f}g>e {g}f>d|
{g}e/f/g {Gdc}d>c {gBd}B<{e}G {dc}d2|]
X:6
T:Untitled Reel
C:Trad.
K:D
eg|a2ab ageg|agbg agef|g2g2 fgag|f2d2 d2:|\
ed|cecA B2ed|cAcA E2ed|cecA B2ed|c2A2 A2:|
K:G
AB|cdec BcdB|ABAF GFE2|cdec BcdB|c2A2 A2:|
X:7
T:Kitchen Girl
C:Trad.
K:D
[c4a4] [B4g4]|efed c2cd|e2f2 gaba|g2e2 e2fg|
a4 g4|efed cdef|g2d2 efed|c2A2 A4:|
K:G
ABcA BAGB|ABAG EDEG|A2AB c2d2|e3f edcB|ABcA BAGB|
ABAG EGAB|cBAc BAG2|A4 A4:|
%abc-2.1
%%pagewidth 21cm
%%pageheight 29.7cm
%%topspace 0.5cm
%%topmargin 1cm
%%botmargin 0cm
%%leftmargin 1cm
%%rightmargin 1cm
%%titlespace 0cm
%%titlefont Times-Bold 32
%%subtitlefont Times-Bold 24
%%composerfont Times 16
%%vocalfont Times-Roman 14
%%staffsep 60pt
%%sysstaffsep 20pt
%%musicspace 1cm
%%vocalspace 5pt
%%measurenb 0
%%barsperstaff 5
%%scale 0.7
X: 1
T: Canzonetta a tre voci
C: Claudio Monteverdi (1567-1643)
M: C
L: 1/4
Q: "Andante mosso" 1/4 = 110
%%score [1 2 3]
V: 1 clef=treble name="Soprano"sname="A"
V: 2 clef=treble name="Alto" sname="T"
V: 3 clef=bass middle=d name="Tenor" sname="B"
%%MIDI program 1 75 % recorder
%%MIDI program 2 75
%%MIDI program 3 75
K: Eb
% 1 - 4
[V: 1] |:z4 |z4 |f2ec |_ddcc |
w: Son que-sti~i cre-spi cri-ni~e
w: Que-sti son gli~oc-chi che mi-
[V: 2] |:c2BG|AAGc|(F/G/A/B/)c=A|B2AA |
w: Son que-sti~i cre-spi cri-ni~e que - - - - sto~il vi-so e
w: Que-sti son~gli oc-chi che mi-ran - - - - do fi-so mi-
[V: 3] |:z4 |f2ec|_ddcf |(B/c/_d/e/)ff|
w: Son que-sti~i cre-spi cri-ni~e que - - - - sto~il
w: Que-sti son~gli oc-chi che mi-ran - - - - do
% 5 - 9
[V: 1] cAB2 |cAAA |c3B|G2!fermata!Gz ::e4|
w: que-sto~il vi-so ond' io ri-man-go~uc-ci-so. Deh,
w: ran-do fi-so, tut-to re-stai con-qui-so.
[V: 2] AAG2 |AFFF |A3F|=E2!fermata!Ez::c4|
w: que-sto~il vi-so ond' io ri-man-go~uc-ci-so. Deh,
w: ran-do fi-so tut-to re-stai con-qui-so.
[V: 3] (ag/f/e2)|A_ddd|A3B|c2!fermata!cz ::A4|
w: vi - - - so ond' io ti-man-go~uc-ci-so. Deh,
w: fi - - - so tut-to re-stai con-qui-so.
% 10 - 15
[V: 1] f_dec |B2c2|zAGF |\
w: dim-me-lo ben mi-o, che que-sto\
=EFG2 |1F2z2:|2F8|] % more notes
w: sol de-si-o_. % more lyrics
[V: 2] ABGA |G2AA|GF=EF |(GF3/2=E//D//E)|1F2z2:|2F8|]
w: dim-me-lo ben mi-o, che que-sto sol de-si - - - - o_.
[V: 3] _dBc>d|e2AF|=EFc_d|c4 |1F2z2:|2F8|]
w: dim-me-lo ben mi-o, che que-sto sol de-si-o_.

View file

@ -0,0 +1,5 @@
with Ada.Text_IO; use Ada.Text_IO;
procedure Hello is
begin
Put_Line("Hello, world!");
end Hello;

View file

@ -1,4 +1,4 @@
Searching for 'var' in /workspace/configs
Searching for var in/.c9/metadata/workspace/pluginsregexp, case sensitive, whole word
configs/default.js:
1: var fs = require("fs");

View file

@ -0,0 +1,42 @@
-- https://github.com/Cirru/cirru-gopher/blob/master/code/scope.cr,
set a (int 2)
print (self)
set c (child)
under c
under parent
print a
print $ get c a
set c x (int 3)
print $ get c x
set just-print $ code
print a
print just-print
eval (self) just-print
eval just-print
print (string "string with space")
print (string "escapes \n \"\\")
brackets ((((()))))
"eval" $ string "eval"
print (add $ (int 1) (int 2))
print $ unwrap $
map (a $ int 1) (b $ int 2)
print a
int 1
, b c
int 2
, d

View file

@ -0,0 +1 @@
TODO

View file

@ -1,28 +1,18 @@
.text-layer {
font-family: Monaco, "Courier New", monospace;
font-size: 12pX;
font: 12px Monaco, "Courier New", monospace;
cursor: text;
}
.blinker {
animation-duration: 1s;
animation-name: blink;
animation-iteration-count: infinite;
animation-direction: alternate;
animation-timing-function: linear;
animation: blink 1s linear infinite alternate;
}
@keyframes blink {
0% {
0%, 40% {
opacity: 0;
}
40% {
opacity: 0;
}
40.5% {
opacity: 1
}
100% {
40.5%, 100% {
opacity: 1
}
}

View file

@ -0,0 +1,14 @@
#!/usr/bin/env rdmd
// Computes average line length for standard input.
import std.stdio;
void main() {
ulong lines = 0;
double sumLength = 0;
foreach (line; stdin.byLine()) {
++lines;
sumLength += line.length;
}
writeln("Average line length: ",
lines ? sumLength / lines : 0);
}

View file

@ -1,58 +1,19 @@
main() {
print('Hello World!');
// Go ahead and modify this example.
import "dart:html";
// Computes the nth Fibonacci number.
int fibonacci(int n) {
if (n < 2) return n;
return fibonacci(n - 1) + fibonacci(n - 2);
}
// Displays a Fibonacci number.
void main() {
int i = 20;
String message = "fibonacci($i) = ${fibonacci(i)}";
int fib(int n) => (n > 1) ? (fib(n - 1) + fib(n - 2)) : n;
main() {
print('fib(20) = ${fib(20)}');
// This example uses HTML to display the result and it will appear
// in a nested HTML frame (an iframe).
document.body.append(new HeadingElement.h1()..appendText(message));
}
/*asd
asdad
*/
0.67
77
.86
import("http://dartwatch.com/myOtherLibrary.dart");
import("myOtherLibrary.dart", prefix:"lib1");
"""asdasdads
asdadsadsasd
asdasdasdad"""
'23424'
0x234
foo is bar
int x = 4 << 10
// Create a class for Point.
class Point {
// Final variables cannot be changed once they are assigned.
// Create two instance variables.
final num x, y;
// A constructor, with syntactic sugar for setting instance variables.
Point(this.x, this.y);
// A named constructor with an initializer list.
Point.origin() : x = 0, y = 0;
// A method.
num distanceTo(Point other) {
var dx = x - other.x;
var dy = y - other.y;
return sqrt(dx * dx + dy * dy);
}
}
// Check for null.
var unicorn;
assert(unicorn == null);
// Check for NaN.
var iMeantToDoThis = 0/0;
assert(iMeantToDoThis.isNaN());

View file

@ -0,0 +1,30 @@
note
description: "Represents a person."
class
PERSON
create
make, make_unknown
feature {NONE} -- Creation
make (a_name: like name)
-- Create a person with `a_name' as `name'.
do
name := a_name
ensure
name = a_name
end
make_unknown
do ensure
name = Void
end
feature -- Access
name: detachable STRING
-- Full name or Void if unknown.
end

View file

@ -0,0 +1,31 @@
<!DOCTYPE html>
<html>
<head>
<title>Cloud9 Rocks!</title>
</head>
<body>
<table class="table">
<tr>
<th>Name</th>
<th>Size</th>
</tr>
<% if (!isRoot) { %>
<tr>
<td><a href="..">..</a></td>
<td></td></td>
</tr>
<% } %>
<% entries.forEach(function(entry) { %>
<tr>
<td>
<span class="glyphicon <%= entry.mime == 'directory' ? 'folder': 'file'%>"></span>
<a href="<%= entry.name %>"><%= entry.name %></a>
</td>
<td><%= entry.size %></td>
</tr>
<% }) %>
</table>
</body>
</html>

View file

@ -0,0 +1,42 @@
defmodule HelloModule do
@moduledoc """
This is supposed to be `markdown`.
__Yes__ this is [mark](http://down.format)
# Truly
## marked
* with lists
* more
* and more
Even.with(code)
blocks |> with |> samples
_Docs are first class citizens in Elixir_ (Jose Valim)
"""
# A "Hello world" function
def some_fun do
IO.puts "Juhu Kinners!"
end
# A private function
defp priv do
is_regex ~r"""
This is a regex
spanning several
lines.
"""
x = elem({ :a, :b, :c }, 0) #=> :a
end
end
test_fun = fn(x) ->
cond do
x > 10 ->
:greater_than_ten
true ->
:maybe_ten
end
end

View file

@ -0,0 +1,12 @@
{- Ace {- 4 -} Elm -}
main = lift clock (every second)
clock t = collage 400 400 [ filled lightGrey (ngon 12 110)
, outlined (solid grey) (ngon 12 110)
, hand orange 100 t
, hand charcoal 100 (t/60)
, hand charcoal 60 (t/720) ]
hand clr len time =
let angle = degrees (90 - 6 * inSeconds time)
in traced (solid clr) <| segment (0,0) (len * cos angle, len * sin angle)

View file

@ -0,0 +1,31 @@
O003 (DIAMOND SQUARE)
N2 G54 G90 G49 G80
N3 M6 T1 (1.ENDMILL)
N4 M3 S1800
N5 G0 X-.6 Y2.050
N6 G43 H1 Z.1
N7 G1 Z-.3 F50.
N8 G41 D1 Y1.45
N9 G1 X0 F20.
N10 G2 J-1.45
(CUTTER COMP CANCEL)
N11 G1 Z-.2 F50.
N12 Y-.990
N13 G40
N14 G0 X-.6 Y1.590
N15 G0 Z.1
N16 M5 G49 G28 G91 Z0
N17 CALL O9456
N18 #500=0.004
N19 #503=[#500+#501]
N20 VC45=0.0006
VS4=0.0007
N21 G90 G10 L20 P3 X5.Y4. Z6.567
N22 G0 X5000
N23 IF [#1 LT 0.370] GOTO 49
N24 X-0.678 Y+.990
N25 G84.3 X-0.1
N26 #4=#5*COS[45]
N27 #4=#5*SIN[45]
N28 VZOFZ=652.9658
%

View file

@ -0,0 +1,28 @@
@these @are @tags
Feature: Serve coffee
Coffee should not be served until paid for
Coffee should not be served until the button has been pressed
If there is no coffee left then money should be refunded
Scenario Outline: Eating
Given there are <start> cucumbers
When I eat <eat> cucumbers
Then I should have <left> cucumbers
Examples:
| start | eat | left |
| 12 | 5 | 7 |
| 20 | 5 | 15 |
Scenario: Buy last coffee
Given there are 1 coffees left in the machine
And I have deposited 1$
When I press the coffee button
Then I should be served a "coffee"
# this a comment
"""
this is a
pystring
"""

View file

@ -0,0 +1,8 @@
{{!-- Ace + :-}} --}}
<div id="comments">
{{#each comments}}
<h2><a href="/posts/{{../permalink}}#{{id}}">{{title}}</a></h2>
<div>{{{body}}}</div>
{{/each}}
</div>

View file

@ -0,0 +1,10 @@
Redirect /linux http://www.linux.org
Redirect 301 /kernel http://www.linux.org
# comment
RewriteEngine on
RewriteCond %{HTTP_USER_AGENT} ^Mozilla.*
RewriteRule ^/$ /homepage.max.html [L]
RewriteRule ^/$ /homepage.std.html [L]

View file

@ -1,3 +1,4 @@
<!DOCTYPE html>
<html>
<head>

View file

@ -11,6 +11,7 @@
<% @books.each do |book| %>
<tr>
<%# comment %>
<td><%= book.title %></td>
<td><%= book.content %></td>
<td><%= link_to 'Show', book %></td>

View file

@ -0,0 +1,4 @@
[.ShellClassInfo]
IconResource=..\logo.png
[ViewState]
FolderType=Generic

View file

@ -0,0 +1,6 @@
// computes factorial of a number
factorial := method(n,
if(n == 0, return 1)
res := 1
Range 1 to(n) foreach(i, res = res * i)
)

View file

@ -0,0 +1 @@
TODO

View file

@ -2,7 +2,7 @@ for op = (:+, :*, :&, :|, :$)
@eval ($op)(a,b,c) = ($op)(($op)(a,b),c)
end
v = α';
function g(x,y)
return x * y
x + y

View file

@ -0,0 +1,9 @@
import logic
section
variables (A : Type) (p q : A Prop)
example : (x : A, p x q x) y : A, p y :=
assume H : x : A, p x q x,
take y : A,
show p y, from and.elim_left (H y)
end

View file

@ -8,7 +8,7 @@ integer someIntNormal = 3672;
integer someIntHex = 0x00000000;
integer someIntMath = PI_BY_TWO;
integer event = 5673; // invalid reserved keyword!
integer event = 5673; // invalid.illegal
key someKeyTexture = TEXTURE_DEFAULT;
string someStringSpecial = EOF;
@ -53,12 +53,12 @@ default
someIntHex = 0x00000000;
someIntMath = PI_BY_TWO;
event = 5673; // invalid reserved keyword!
event = 5673; // invalid.illegal
someKeyTexture = TEXTURE_DEFAULT;
someStringSpecial = EOF;
llCollisionSprite(someKeyTexture); // invalid deprecated function!
llSetInventoryPermMask("some item", MASK_NEXT, PERM_ALL); // reserved.godmode
llWhisper(PUBLIC_CHANNEL, "Leaving \"default\" now...");
state other;

View file

@ -34,3 +34,5 @@ print([===[
table.maxn is deprecated, use # instead.
--]=]--
print(table.maxn{1,2,[4]=4,[8]=8) -- outputs 8 instead of 2
print(5 --[[ blah ]])

View file

@ -0,0 +1,52 @@
/* Mask Syntax Demo */
div > ' Test ~[name]';
define :userProfile {
header {
h4 > @title;
button.close;
}
}
:userProfile {
@title > ' Hello ~[: username.toUpperCase()]'
}
style {
html, body {
background: url('name.png') 0 0 no-repeat;
}
}
button {
event click (e) {
this.textContent = `name ${e.clientX} !`;
}
}
md > """
- div
- span
Hello
[one](http://google.com)
""";
header .foo > 'Heading'
button .baz x-signal='click: test' disabled > "
Hello,
world
\"Buddy\"
"
var a = {
name: `name ${window.innerWidth}`
};
span .foo > "~[bind: a.name]"

View file

@ -0,0 +1,17 @@
%{
%{
Ace Matlab demo
%}
%}
classdef hello
methods
function greet(this)
disp('Hello!') % say hi
end
end
end
% transpose
a = [ 'x''y', "x\n\
y", 1' ]' + 2'

View file

@ -0,0 +1,33 @@
// animated duplicates, instances script
proc animatedDuplication (int $rangeStart, int $rangeEnd, int $numOfDuplicates, int $duplicateOrInstance)
{
int $range_start = $rangeStart;
int $range_end = $rangeEnd;
int $num_of_duplicates = $numOfDuplicates;
int $step_size = ($range_end - $range_start) / $num_of_duplicates;
int $i = 0;
int $temp;
currentTime $range_start; // set to range start
string $selectedObjects[]; // to store selected objects
$selectedObjects = `ls -sl`; // store selected objects
select $selectedObjects;
while ($i <= $num_of_duplicates)
{
$temp = $range_start + ($step_size * $i);
currentTime ($temp);
// seleced the objects to duplicate or instance
select $selectedObjects;
if($duplicateOrInstance == 0)
{
duplicate;
}
else
{
instance;
}
$i++;
}
}

View file

@ -0,0 +1 @@
TODO

View file

@ -41,8 +41,8 @@ SELECT city, temp_lo, temp_hi, prcp, "date", location
/**
* Dollar quotes starting at the end of the line are colored as SQL unless
* a special language tag is used. Pearl and Python are currently implemented
* but lots of others are possible.
* a special language tag is used. Dollar quote syntax coloring is implemented
* for Perl, Python, JavaScript, and Json.
*/
create or replace function blob_content_chunked(
in p_data bytea,
@ -82,6 +82,24 @@ CREATE FUNCTION usesavedplan() RETURNS trigger AS $python$
SD["plan"] = plan
$python$ LANGUAGE plpythonu;
-- pl/v8 (javascript)
CREATE FUNCTION plv8_test(keys text[], vals text[]) RETURNS text AS $javascript$
var o = {};
for(var i=0; i<keys.length; i++){
o[keys[i]] = vals[i];
}
return JSON.stringify(o);
$javascript$ LANGUAGE plv8 IMMUTABLE STRICT;
-- json
select * from json_object_keys($json$
{
"f1": 5,
"f2": "test",
"f3": {}
}
$json$);
-- psql commands
\df cash*

View file

@ -0,0 +1,148 @@
form Highlighter test
sentence My_sentence This should all be a string
text My_text This should also all be a string
word My_word Only the first word is a string, the rest is invalid
boolean Binary 1
boolean Text no
boolean Quoted "yes"
comment This should be a string
real left_Range -123.6
positive right_Range_max 3.3
integer Int 4
natural Nat 4
endform
# External scripts
include /path/to/file
runScript: "/path/to/file"
execute /path/to/file
stopwatch
# old-style procedure call
call oldStyle "quoted" 2 unquoted string
assert oldStyle.local = 1
# New-style procedure call with parens
@newStyle("quoted", 2, "quoted string")
if praatVersion >= 5364
# New-style procedure call with colon
@newStyle: "quoted", 2, "quoted string"
endif
# if-block with built-in variables
if windows
# We are on Windows
elsif unix = 1 or !macintosh
exitScript: "We are on Linux"
else macintosh == 1
exit We are on Mac
endif
# inline if with inline comment
var = if macintosh = 1 then 0 else 1 fi ; This is an inline comment
# for-loop with explicit from using local variable
# and paren-style function calls and variable interpolation
n = numberOfSelected("Sound")
for i from newStyle.local to n
sound'i' = selected("Sound", i)
sound[i] = sound'i'
endfor
for i from 1 to n
# Different styles of object selection
select sound'i'
sound = selected()
sound$ = selected$("Sound")
select Sound 'sound$'
selectObject(sound[i])
selectObject: sound
# Pause commands
beginPause("Viewing " + sound$)
if i > 1
button = endPause("Stop", "Previous",
...if i = total_sounds then "Finish" else "Next" fi,
...3, 1)
else
button = endPause("Stop",
...if i = total_sounds then "Finish" else "Next" fi,
...2, 1)
endif
editor_name$ = if total_textgrids then "TextGrid " else "Sound " fi + name$
nocheck editor 'editor_name$'
nocheck Close
nocheck endeditor
# New-style standalone command call
Rename: "SomeName"
# Command call with assignment
duration = Get total duration
# Multi-line command with modifier
pitch = noprogress To Pitch (ac): 0, 75, 15, "no",
...0.03, 0.45, 0.01, 0.35, 0.14, 600
# do-style command with assignment
minimum = do("Get minimum...", 0, 0, "Hertz", "Parabolic")
# New-style multi-line command call with broken strings
table = Create Table with column names: "table", 0,
..."file subject speaker
...f0 f1 f2 f3 " +
..."duration response"
removeObject: pitch, table
# Picture window commands
selectObject: sound
# do-style command
do("Select inner viewport...", 1, 6, 0.5, 1.5)
Black
Draw... 0 0 0 0 "no" Curve
Draw inner box
Text bottom: "yes", sound$
Erase all
# Demo window commands
demo Erase all
demo Select inner viewport... 0 100 0 100
demo Axes... 0 100 0 100
demo Paint rectangle... white 0 100 0 100
demo Text... 50 centre 50 half Click to finish
demoWaitForInput ( )
demo Erase all
demo Text: 50, "centre", 50, "half", "Finished"
endfor
# An old-style sendpraat block
sendpraat Praat
...'newline$' Create Sound as pure tone... "tone" 1 0 0.4 44100 440 0.2 0.01 0.01
...'newline$' Play
...'newline$' Remove
# A new-style sendpraat block
beginSendPraat: "Praat"
Create Sound as pure tone: "tone", 1, 0, 0.4, 44100, 440, 0.2, 0.01, 0.01
duration = Get total duration
Remove
endSendPraat: "duration"
appendInfoLine: "The generated sound lasted for ", duration, "seconds"
time = stopwatch
clearinfo
echo This script took
print 'time' seconds to
printline execute.
# Old-style procedure declaration
procedure oldStyle .str1$ .num .str2$
.local = 1
endproc
# New-style procedure declaration
procedure newStyle (.str1$, .num, .str2$)
.local = 1
endproc

View file

@ -0,0 +1,16 @@
message Point {
required int32 x = 1;
required int32 y = 2;
optional string label = 3;
}
message Line {
required Point start = 1;
required Point end = 2;
optional string label = 3;
}
message Polyline {
repeated Point point = 1;
optional string label = 2;
}

View file

@ -20,7 +20,7 @@ class Range
end
end
{:id => 34, :key => "value"}
{:id => ?", :key => "value"}
herDocs = [<<'FOO', <<BAR, <<-BAZ, <<-`EXEC`] #comment

View file

@ -2,9 +2,9 @@
# Script to open a browser to current branch
# Repo formats:
# ssh git@github.com:richoH/gh_pr.git
# http https://richoH@github.com/richoH/gh_pr.git
# git git://github.com/richoH/gh_pr.git
# ssh git@github.com:richo/gh_pr.git
# http https://richoH@github.com/richo/gh_pr.git
# git git://github.com/richo/gh_pr.git
username=`git config --get github.user`

View file

@ -0,0 +1,28 @@
var { each, map } = require('sjs:sequence');
var { get } = require('sjs:http');
function foo(items, nada) {
var component = { name: "Ace", role: "Editor" };
console.log("
Welcome, #{component.name}
".trim());
logging.debug(`Component added: $String(component) (${component})`);
console.log(`
Welcome, {${function() {
return { x: 1, y: "why?}"};
}()}
`.trim());
waitfor {
items .. each.par { |item|
get(item);
}
} and {
var lengths = items .. map(i -> i.length);
} or {
hold(1500);
throw new Error("timed out");
}
} // Real Tab.

View file

@ -0,0 +1,7 @@
{foreach $foo as $bar}
<a href="{$bar.zig}">{$bar.zag}</a>
<a href="{$bar.zig2}">{$bar.zag2}</a>
<a href="{$bar.zig3}">{$bar.zag3}</a>
{foreachelse}
There were no rows found.
{/foreach}

View file

@ -0,0 +1,46 @@
/**
* Greets a person using "Hello" by default.
* @param name The name of the person.
* @param? greetingWord Optional greeting word to use instead of "Hello".
*/
{template .helloName #eee}
{if not $greetingWord}
Hello {$name}!
{else}
{$greetingWord} {$name}!
{/if}
{/template}
/**
* Greets a person and optionally a list of other people.
* @param name The name of the person.
* @param additionalNames The additional names to greet. May be an empty list.
*/
{template .helloNames}
// Greet the person.
{call .helloName data="all" /}<br>
// Greet the additional people.
{foreach $additionalName in $additionalNames}
{call .helloName}
{param name: $additionalName /}
{/call}
{if not isLast($additionalName)}
<br> // break after every line except the last
{/if}
{ifempty}
No additional people to greet.
{/foreach}
{/template}
{/foreach}
{if length($items) > 5}
{msg desc="Says hello to the user."}
{namespace ns autoescape="contextual"}
/** Example. */
{template .example}
foo is {$ij.foo}
{/template}

View file

@ -0,0 +1,56 @@
query
count 10
created 2011-06-21T08:10:46Z
lang en-US
results
photo
0
farm 6
id 5855620975
isfamily 0
isfriend 0
ispublic 1
owner 32021554@N04
secret f1f5e8515d
server 5110
title 7087 bandit cat
1
farm 4
id 5856170534
isfamily 0
isfriend 0
ispublic 1
owner 32021554@N04
secret ff1efb2a6f
server 3217
title 6975 rusty cat
2
farm 6
id 5856172972
isfamily 0
isfriend 0
ispublic 1
owner 51249875@N03
secret 6c6887347c
server 5192
title watermarked-cats
3
farm 6
id 5856168328
isfamily 0
isfriend 0
ispublic 1
owner 32021554@N04
secret 0c1cfdf64c
server 5078
title 7020 mandy cat
4
farm 3
id 5856171774
isfamily 0
isfriend 0
ispublic 1
owner 32021554@N04
secret 7f5a3180ab
server 2696
title 7448 bobby cat

View file

@ -0,0 +1,72 @@
-- =============================================
-- Author: Morgan Yarbrough
-- Create date: 4/27/2015
-- Description: Test procedure that shows off language features.
-- Includes non-standard folding with region comments using either
-- line comments or block comments (both are demonstrated below).
-- This mode imitates SSMS and it designed to be used with SQL Server theme.
-- =============================================
CREATE PROCEDURE dbo.TestProcedure
--#region parameters
@vint INT = 1
,@vdate DATE = NULL
,@vdatetime DATETIME = DATEADD(dd, 1, GETDATE())
,@vvarchar VARCHAR(MAX) = ''
--#endregion
AS
BEGIN
/*#region set statements */
SET NOCOUNT ON;
SET XACT_ABORT ON;
SET QUOTED_IDENTIFIER ON;
/*#endregion*/
/**
* These comments will produce a fold widget
*/
-- folding demonstration
SET @vint = CASE
WHEN @vdate IS NULL
THEN 1
ELSE 2
END
-- another folding demonstration
IF @vint = 1
BEGIN
SET @vvarchar = 'one'
SET @vint = DATEDIFF(dd, @vdate, @vdatetime)
END
-- this mode handles strings properly
DECLARE @sql NVARCHAR(4000) = N'SELECT TOP(1) OrderID
FROM Orders
WHERE @OrderDate > GETDATE()'
-- this mode is aware of built in stored procedures
EXECUTE sp_executesql @sql
-- demonstrating some syntax highlighting
SELECT Orders.OrderID
,Customers.CompanyName
,DATEFROMPARTS(YEAR(GETDATE()), 1, 1) AS FirstDayOfYear
FROM Orders
INNER JOIN Customers
ON Orders.CustomerID = Customers.CustomerID
WHERE CompanyName NOT LIKE '%something'
OR CompanyName IS NULL
OR CompanyName IN ('bla', 'nothing')
-- this mode includes snippets
-- place your cusor at the end of the line below and trigger auto complete (Ctrl+Space)
createpr
-- SQL Server allows using keywords as object names (not recommended) as long as they are wrapped in brackets
DATABASE -- keyword
[DATABASE] -- not a keyword
END

View file

@ -1,9 +1,30 @@
{% autoescape true %}
{{ var }}
{{ var|raw }} {# var won't be escaped #}
{{ var|escape }} {# var won't be doubled-escaped #}
{% endautoescape %}
<!DOCTYPE html>
<html>
<head>
<title>My Webpage</title>
</head>
<body>
<ul id="navigation">
{% for item in navigation %}
<li><a href="{{ item.href|escape }}">{{ item.caption }}</a></li>
{% endfor %}
</ul>
{{ include('twig.html', sandboxed = true) }}
{% if 1 not in [1, 2, 3] %}
{{"string #{with} \" escapes" 'another#one' }}
{# is equivalent to #}
{% if not (1 in [1, 2, 3]) %}
{% autoescape true %}
{{ var }}
{{ var|raw }} {# var won't be escaped #}
{{ var|escape }} {# var won't be doubled-escaped #}
{% endautoescape %}
{{ include('twig.html', sandboxed = true) }}
{{"string #{with} \" escapes" 'another#one' }}
<h1>My Webpage</h1>
{{ a_variable }}
</body>
</html>

View file

@ -0,0 +1,21 @@
using Gtk;
int main (string[] args) {
Gtk.init (ref args);
var foo = new MyFoo<string[](), MyBar<string, int>>();
var window = new Window();
window.title = "Hello, World!";
window.border_width = 10;
window.window_position = WindowPosition.CENTER;
window.set_default_size(350, 70);
window.destroy.connect(Gtk.main_quit);
var label = new Label("Hello, World!");
window.add(label);
window.show_all();
Gtk.main();
return 0;
}

View file

@ -0,0 +1,12 @@
always @(negedge reset or posedge clk) begin
if (reset == 0) begin
d_out <= 16'h0000;
d_out_mem[resetcount] <= d_out;
laststoredvalue <= d_out;
end else begin
d_out <= d_out + 1'b1;
end
end
always @(bufreadaddr)
bufreadval = d_out_mem[bufreadaddr];

View file

@ -0,0 +1,34 @@
library IEEE
user IEEE.std_logic_1164.all;
use IEEE.numeric_std.all;
entity COUNT16 is
port (
cOut :out std_logic_vector(15 downto 0); -- counter output
clkEn :in std_logic; -- count enable
clk :in std_logic; -- clock input
rst :in std_logic -- reset input
);
end entity;
architecture count_rtl of COUNT16 is
signal count :std_logic_vector (15 downto 0);
begin
process (clk, rst) begin
if(rst = '1') then
count <= (others=>'0');
elsif(rising_edge(clk)) then
if(clkEn = '1') then
count <= count + 1;
end if;
end if;
end process;
cOut <= count;
end architecture;

View file

@ -0,0 +1,73 @@
/* ***** BEGIN LICENSE BLOCK *****
* Distributed under the BSD license:
*
* Copyright (c) 2010, Ajax.org B.V.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* * Neither the name of Ajax.org B.V. nor the
* names of its contributors may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* ***** END LICENSE BLOCK ***** */
define(function(require, exports, module) {
var config = require("ace/config");
var event = require("ace/lib/event");
var modelist = require("ace/ext/modelist");
module.exports = function(editor) {
event.addListener(editor.container, "dragover", function(e) {
var types = e.dataTransfer.types;
if (types && Array.prototype.indexOf.call(types, 'Files') !== -1)
return event.preventDefault(e);
});
event.addListener(editor.container, "drop", function(e) {
var file;
try {
file = e.dataTransfer.files[0];
if (window.FileReader) {
var reader = new FileReader();
reader.onload = function() {
var mode = modelist.getModeForPath(file.name);
editor.session.doc.setValue(reader.result);
editor.session.setMode(mode.mode);
editor.session.modeName = mode.name;
};
reader.readAsText(file);
}
return event.preventDefault(e);
} catch(err) {
return event.stopEvent(e);
}
});
};
var Editor = require("ace/editor").Editor;
config.defineOptions(Editor.prototype, "editor", {
loadDroppedFile: {
set: function() { module.exports(this); },
value: true
}
});
});

View file

@ -0,0 +1,102 @@
/* ***** BEGIN LICENSE BLOCK *****
* Distributed under the BSD license:
*
* Copyright (c) 2010, Ajax.org B.V.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* * Neither the name of Ajax.org B.V. nor the
* names of its contributors may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* ***** END LICENSE BLOCK ***** */
define(function(require, exports, module) {
"use strict";
var LineWidgets = require("ace/line_widgets").LineWidgets;
var Editor = require("ace/editor").Editor;
var Renderer = require("ace/virtual_renderer").VirtualRenderer;
var dom = require("ace/lib/dom");
require("ace/commands/default_commands").commands.push({
name: "openInlineEditor",
bindKey: "F3",
exec: function(editor) {
var split = window.env.split;
var s = editor.session;
var inlineEditor = new Editor(new Renderer());
var splitSession = split.$cloneSession(s);
var row = editor.getCursorPosition().row;
if (editor.session.lineWidgets && editor.session.lineWidgets[row]) {
editor.session.lineWidgets[row].destroy();
return;
}
var rowCount = 10;
var w = {
row: row,
// rowCount: rowCount,
fixedWidth: true,
el: dom.createElement("div"),
editor: inlineEditor
};
var el = w.el;
el.appendChild(inlineEditor.container);
if (!editor.session.widgetManager) {
editor.session.widgetManager = new LineWidgets(editor.session);
editor.session.widgetManager.attach(editor);
}
var h = rowCount*editor.renderer.layerConfig.lineHeight;
inlineEditor.container.style.height = h + "px";
el.style.position = "absolute";
el.style.zIndex = "4";
el.style.borderTop = "solid blue 2px";
el.style.borderBottom = "solid blue 2px";
inlineEditor.setSession(splitSession);
editor.session.widgetManager.addLineWidget(w);
var kb = {
handleKeyboard:function(_,hashId, keyString) {
if (hashId === 0 && keyString === "esc") {
w.destroy();
return true;
}
}
};
w.destroy = function() {
editor.keyBinding.removeKeyboardHandler(kb);
s.widgetManager.removeLineWidget(w);
};
editor.keyBinding.addKeyboardHandler(kb);
inlineEditor.keyBinding.addKeyboardHandler(kb);
inlineEditor.setTheme("ace/theme/solarized_light");
}
});
});

View file

@ -103,11 +103,6 @@ var Split = function(){
exports.singleLineEditor = function(el) {
var renderer = new Renderer(el);
el.style.overflow = "hidden";
renderer.scrollBar.element.style.top = "0";
renderer.scrollBar.element.style.display = "none";
renderer.scrollBar.orginalWidth = renderer.scrollBar.width;
renderer.scrollBar.width = 0;
renderer.content.style.height = "auto";
renderer.screenToTextCoordinates = function(x, y) {
var pos = this.pixelToScreenCoordinates(x, y);
@ -117,72 +112,15 @@ exports.singleLineEditor = function(el) {
);
};
renderer.maxLines = 4;
renderer.$computeLayerConfigWithScroll = renderer.$computeLayerConfig;
renderer.$computeLayerConfig = function() {
var config = this.layerConfig;
var height = this.session.getScreenLength() * this.lineHeight;
if (config.height != height) {
var vScroll = height > this.maxLines * this.lineHeight;
if (vScroll != this.$vScroll) {
if (vScroll) {
this.scrollBar.element.style.display = "";
this.scrollBar.width = this.scrollBar.orginalWidth;
this.container.style.height = config.height + "px";
height = config.height;
this.scrollTop = height - this.maxLines * this.lineHeight;
} else {
this.scrollBar.element.style.display = "none";
this.scrollBar.width = 0;
}
this.onResize();
this.$vScroll = vScroll;
}
if (this.$vScroll)
return renderer.$computeLayerConfigWithScroll();
this.container.style.height = height + "px";
this.scroller.style.height = height + "px";
this.content.style.height = height + "px";
this._emit("resize");
}
var longestLine = this.$getLongestLine();
var firstRow = 0;
var lastRow = this.session.getLength();
this.scrollTop = 0;
config.width = longestLine;
config.padding = this.$padding;
config.firstRow = 0;
config.firstRowScreen = 0;
config.lastRow = lastRow;
config.lineHeight = this.lineHeight;
config.characterWidth = this.characterWidth;
config.minHeight = height;
config.maxHeight = height;
config.offset = 0;
config.height = height;
this.$gutterLayer.element.style.marginTop = 0 + "px";
this.content.style.marginTop = 0 + "px";
this.content.style.width = longestLine + 2 * this.$padding + "px";
};
renderer.isScrollableBy=function(){return false};
renderer.$maxLines = 4;
renderer.setStyle("ace_one-line");
var editor = new Editor(renderer);
new MultiSelect(editor);
editor.session.setUndoManager(new UndoManager());
editor.setHighlightActiveLine(false);
editor.setShowPrintMargin(false);
editor.renderer.setShowGutter(false);
editor.renderer.setHighlightGutterLine(false);
editor.$mouseHandler.$focusWaitTimout = 0;
return editor;

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 48 KiB

Before After
Before After

View file

@ -1,5 +1,5 @@
/** vim: et:ts=4:sw=4:sts=4
* @license RequireJS 2.1.5 Copyright (c) 2010-2012, The Dojo Foundation All Rights Reserved.
* @license RequireJS 2.1.11+ Copyright (c) 2010-2014, The Dojo Foundation All Rights Reserved.
* Available via the MIT or new BSD license.
* see: http://github.com/jrburke/requirejs for details
*/
@ -12,7 +12,7 @@ var requirejs, require, define;
(function (global) {
var req, s, head, baseElement, dataMain, src,
interactiveScript, currentlyAddingScript, mainScript, subPath,
version = '2.1.5',
version = '2.1.11+',
commentRegExp = /(\/\*([\s\S]*?)\*\/|([^:]|^)\/\/(.*)$)/mg,
cjsRequireRegExp = /[^.]\s*require\s*\(\s*["']([^'"\s]+)["']\s*\)/g,
jsSuffixRegExp = /\.js$/,
@ -22,7 +22,7 @@ var requirejs, require, define;
hasOwn = op.hasOwnProperty,
ap = Array.prototype,
apsp = ap.splice,
isBrowser = !!(typeof window !== 'undefined' && navigator && document),
isBrowser = !!(typeof window !== 'undefined' && typeof navigator !== 'undefined' && window.document),
isWebWorker = !isBrowser && typeof importScripts !== 'undefined',
//PS3 indicates loaded and complete, but need to wait for complete
//specifically. Sequence is 'loading', 'loaded', execution,
@ -108,7 +108,10 @@ var requirejs, require, define;
if (source) {
eachProp(source, function (value, prop) {
if (force || !hasProp(target, prop)) {
if (deepStringMixin && typeof value !== 'string') {
if (deepStringMixin && typeof value === 'object' && value &&
!isArray(value) && !isFunction(value) &&
!(value instanceof RegExp)) {
if (!target[prop]) {
target[prop] = {};
}
@ -134,7 +137,11 @@ var requirejs, require, define;
return document.getElementsByTagName('script');
}
//Allow getting a global that expressed in
function defaultOnError(err) {
throw err;
}
//Allow getting a global that is expressed in
//dot notation, like 'a.b.c'.
function getGlobal(value) {
if (!value) {
@ -173,7 +180,7 @@ var requirejs, require, define;
if (typeof requirejs !== 'undefined') {
if (isFunction(requirejs)) {
//Do not overwrite and existing requirejs instance.
//Do not overwrite an existing requirejs instance.
return;
}
cfg = requirejs;
@ -197,6 +204,7 @@ var requirejs, require, define;
waitSeconds: 7,
baseUrl: './',
paths: {},
bundles: {},
pkgs: {},
shim: {},
config: {}
@ -210,6 +218,7 @@ var requirejs, require, define;
defQueue = [],
defined = {},
urlFetched = {},
bundlesMap = {},
requireCounter = 1,
unnormalizedCounter = 1;
@ -223,8 +232,8 @@ var requirejs, require, define;
* @param {Array} ary the array of path segments.
*/
function trimDots(ary) {
var i, part;
for (i = 0; ary[i]; i += 1) {
var i, part, length = ary.length;
for (i = 0; i < length; i++) {
part = ary[i];
if (part === '.') {
ary.splice(i, 1);
@ -257,7 +266,7 @@ var requirejs, require, define;
* @returns {String} normalized name
*/
function normalize(name, baseName, applyMap) {
var pkgName, pkgConfig, mapValue, nameParts, i, j, nameSegment,
var pkgMain, mapValue, nameParts, i, j, nameSegment, lastIndex,
foundMap, foundI, foundStarMap, starI,
baseParts = baseName && baseName.split('/'),
normalizedBaseParts = baseParts,
@ -270,29 +279,26 @@ var requirejs, require, define;
//otherwise, assume it is a top-level require that will
//be relative to baseUrl in the end.
if (baseName) {
if (getOwn(config.pkgs, baseName)) {
//If the baseName is a package name, then just treat it as one
//name to concat the name with.
normalizedBaseParts = baseParts = [baseName];
} else {
//Convert baseName to array, and lop off the last part,
//so that . matches that 'directory' and not name of the baseName's
//module. For instance, baseName of 'one/two/three', maps to
//'one/two/three.js', but we want the directory, 'one/two' for
//this normalization.
normalizedBaseParts = baseParts.slice(0, baseParts.length - 1);
//Convert baseName to array, and lop off the last part,
//so that . matches that 'directory' and not name of the baseName's
//module. For instance, baseName of 'one/two/three', maps to
//'one/two/three.js', but we want the directory, 'one/two' for
//this normalization.
normalizedBaseParts = baseParts.slice(0, baseParts.length - 1);
name = name.split('/');
lastIndex = name.length - 1;
// If wanting node ID compatibility, strip .js from end
// of IDs. Have to do this here, and not in nameToUrl
// because node allows either .js or non .js to map
// to same file.
if (config.nodeIdCompat && jsSuffixRegExp.test(name[lastIndex])) {
name[lastIndex] = name[lastIndex].replace(jsSuffixRegExp, '');
}
name = normalizedBaseParts.concat(name.split('/'));
name = normalizedBaseParts.concat(name);
trimDots(name);
//Some use of packages may use a . path to reference the
//'main' module name, so normalize for that.
pkgConfig = getOwn(config.pkgs, (pkgName = name[0]));
name = name.join('/');
if (pkgConfig && name === pkgName + '/' + pkgConfig.main) {
name = pkgName;
}
} else if (name.indexOf('./') === 0) {
// No baseName, so this is ID is resolved relative
// to baseUrl, pull off the leading dot.
@ -304,7 +310,7 @@ var requirejs, require, define;
if (applyMap && map && (baseParts || starMap)) {
nameParts = name.split('/');
for (i = nameParts.length; i > 0; i -= 1) {
outerLoop: for (i = nameParts.length; i > 0; i -= 1) {
nameSegment = nameParts.slice(0, i).join('/');
if (baseParts) {
@ -321,16 +327,12 @@ var requirejs, require, define;
//Match, update name to the new value.
foundMap = mapValue;
foundI = i;
break;
break outerLoop;
}
}
}
}
if (foundMap) {
break;
}
//Check for a star map match, but just hold on to it,
//if there is a shorter segment match later in a matching
//config, then favor over this star map.
@ -351,7 +353,11 @@ var requirejs, require, define;
}
}
return name;
// If the name points to a package's name, use
// the package main instead.
pkgMain = getOwn(config.pkgs, name);
return pkgMain ? pkgMain : name;
}
function removeScript(name) {
@ -369,12 +375,17 @@ var requirejs, require, define;
function hasPathFallback(id) {
var pathConfig = getOwn(config.paths, id);
if (pathConfig && isArray(pathConfig) && pathConfig.length > 1) {
removeScript(id);
//Pop off the first array value, since it failed, and
//retry
pathConfig.shift();
context.require.undef(id);
context.require([id]);
//Custom require that does not do map translation, since
//ID is "absolute", already mapped/resolved.
context.makeRequire(null, {
skipMap: true
})([id]);
return true;
}
}
@ -500,7 +511,12 @@ var requirejs, require, define;
fn(defined[id]);
}
} else {
getModule(depMap).on(name, fn);
mod = getModule(depMap);
if (mod.error && name === 'error') {
fn(mod.error);
} else {
mod.on(name, fn);
}
}
}
@ -540,7 +556,7 @@ var requirejs, require, define;
//local var ref to defQueue, so cannot just reassign the one
//on context.
apsp.apply(defQueue,
[defQueue.length - 1, 0].concat(globalDefQueue));
[defQueue.length, 0].concat(globalDefQueue));
globalDefQueue = [];
}
}
@ -557,7 +573,7 @@ var requirejs, require, define;
mod.usingExports = true;
if (mod.map.isDefine) {
if (mod.exports) {
return mod.exports;
return (defined[mod.map.id] = mod.exports);
} else {
return (mod.exports = defined[mod.map.id] = {});
}
@ -571,9 +587,9 @@ var requirejs, require, define;
id: mod.map.id,
uri: mod.map.url,
config: function () {
return (config.config && getOwn(config.config, mod.map.id)) || {};
return getOwn(config.config, mod.map.id) || {};
},
exports: defined[mod.map.id]
exports: mod.exports || (mod.exports = {})
});
}
}
@ -614,7 +630,7 @@ var requirejs, require, define;
}
function checkLoaded() {
var map, modId, err, usingPathFallback,
var err, usingPathFallback,
waitInterval = config.waitSeconds * 1000,
//It is possible to disable the wait interval by using waitSeconds of 0.
expired = waitInterval && (context.startTime + waitInterval) < new Date().getTime(),
@ -632,8 +648,8 @@ var requirejs, require, define;
//Figure out the state of all the modules.
eachProp(enabledRegistry, function (mod) {
map = mod.map;
modId = map.id;
var map = mod.map,
modId = map.id;
//Skip things that are not enabled or in error state.
if (!mod.enabled) {
@ -840,8 +856,13 @@ var requirejs, require, define;
if (this.depCount < 1 && !this.defined) {
if (isFunction(factory)) {
//If there is an error listener, favor passing
//to that instead of throwing an error.
if (this.events.error) {
//to that instead of throwing an error. However,
//only do it for define()'d modules. require
//errbacks should not be called for failures in
//their callbacks (#699). However if a global
//onError is set, use that.
if ((this.events.error && this.map.isDefine) ||
req.onError !== defaultOnError) {
try {
exports = context.execCb(id, factory, depExports, exports);
} catch (e) {
@ -851,17 +872,14 @@ var requirejs, require, define;
exports = context.execCb(id, factory, depExports, exports);
}
if (this.map.isDefine) {
//If setting exports via 'module' is in play,
//favor that over return value and exports. After that,
//favor a non-undefined return value over exports use.
// Favor return value over exports. If node/cjs in play,
// then will not have a return value anyway. Favor
// module.exports assignment over exports object.
if (this.map.isDefine && exports === undefined) {
cjsModule = this.module;
if (cjsModule &&
cjsModule.exports !== undefined &&
//Make sure it is not already the exports value
cjsModule.exports !== this.exports) {
if (cjsModule) {
exports = cjsModule.exports;
} else if (exports === undefined && this.usingExports) {
} else if (this.usingExports) {
//exports already set the defined value.
exports = this.exports;
}
@ -869,8 +887,8 @@ var requirejs, require, define;
if (err) {
err.requireMap = this.map;
err.requireModules = [this.map.id];
err.requireType = 'define';
err.requireModules = this.map.isDefine ? [this.map.id] : null;
err.requireType = this.map.isDefine ? 'define' : 'require';
return onError((this.error = err));
}
@ -921,6 +939,7 @@ var requirejs, require, define;
on(pluginMap, 'defined', bind(this, function (plugin) {
var load, normalizedMap, normalizedMod,
bundleId = getOwn(bundlesMap, this.map.id),
name = this.map.name,
parentName = this.map.parentMap ? this.map.parentMap.name : null,
localRequire = context.makeRequire(map.parentMap, {
@ -966,6 +985,14 @@ var requirejs, require, define;
return;
}
//If a paths config, then just load that file instead to
//resolve the plugin, as it is built into that paths layer.
if (bundleId) {
this.map.url = context.nameToUrl(bundleId);
this.load();
return;
}
load = bind(this, function (value) {
this.init([], function () { return value; }, null, {
enabled: true
@ -1093,7 +1120,7 @@ var requirejs, require, define;
}));
if (this.errback) {
on(depMap, 'error', this.errback);
on(depMap, 'error', bind(this, this.errback));
}
}
@ -1230,31 +1257,38 @@ var requirejs, require, define;
}
}
//Save off the paths and packages since they require special processing,
//Save off the paths since they require special processing,
//they are additive.
var pkgs = config.pkgs,
shim = config.shim,
var shim = config.shim,
objs = {
paths: true,
bundles: true,
config: true,
map: true
};
eachProp(cfg, function (value, prop) {
if (objs[prop]) {
if (prop === 'map') {
if (!config.map) {
config.map = {};
}
mixin(config[prop], value, true, true);
} else {
mixin(config[prop], value, true);
if (!config[prop]) {
config[prop] = {};
}
mixin(config[prop], value, true, true);
} else {
config[prop] = value;
}
});
//Reverse map the bundles
if (cfg.bundles) {
eachProp(cfg.bundles, function (value, prop) {
each(value, function (v) {
if (v !== prop) {
bundlesMap[v] = prop;
}
});
});
}
//Merge shim
if (cfg.shim) {
eachProp(cfg.shim, function (value, id) {
@ -1275,29 +1309,25 @@ var requirejs, require, define;
//Adjust packages if necessary.
if (cfg.packages) {
each(cfg.packages, function (pkgObj) {
var location;
var location, name;
pkgObj = typeof pkgObj === 'string' ? { name: pkgObj } : pkgObj;
name = pkgObj.name;
location = pkgObj.location;
if (location) {
config.paths[name] = pkgObj.location;
}
//Create a brand new object on pkgs, since currentPackages can
//be passed in again, and config.pkgs is the internal transformed
//state for all package configs.
pkgs[pkgObj.name] = {
name: pkgObj.name,
location: location || pkgObj.name,
//Remove leading dot in main, so main paths are normalized,
//and remove any trailing .js, since different package
//envs have different conventions: some use a module name,
//some use a file name.
main: (pkgObj.main || 'main')
.replace(currDirRegExp, '')
.replace(jsSuffixRegExp, '')
};
//Save pointer to main module ID for pkg name.
//Remove leading dot in main, so main paths are normalized,
//and remove any trailing .js, since different package
//envs have different conventions: some use a module name,
//some use a file name.
config.pkgs[name] = pkgObj.name + '/' + (pkgObj.main || 'main')
.replace(currDirRegExp, '')
.replace(jsSuffixRegExp, '');
});
//Done with modifications, assing packages back to context config
config.pkgs = pkgs;
}
//If there are any "waiting to execute" modules in the registry,
@ -1444,10 +1474,21 @@ var requirejs, require, define;
var map = makeModuleMap(id, relMap, true),
mod = getOwn(registry, id);
removeScript(id);
delete defined[id];
delete urlFetched[map.url];
delete undefEvents[id];
//Clean queued defines too. Go backwards
//in array so that the splices do not
//mess up the iteration.
eachReverse(defQueue, function(args, i) {
if(args[0] === id) {
defQueue.splice(i, 1);
}
});
if (mod) {
//Hold on to listeners in case the
//module will be attempted to be reloaded
@ -1467,7 +1508,7 @@ var requirejs, require, define;
/**
* Called to enable a module if it is still in the registry
* awaiting enablement. A second arg, parent, the parent module,
* is passed in for context, when this method is overriden by
* is passed in for context, when this method is overridden by
* the optimizer. Not shown here to keep code compact.
*/
enable: function (depMap) {
@ -1541,8 +1582,19 @@ var requirejs, require, define;
* internal API, not a public one. Use toUrl for the public API.
*/
nameToUrl: function (moduleName, ext, skipExt) {
var paths, pkgs, pkg, pkgPath, syms, i, parentModule, url,
parentPath;
var paths, syms, i, parentModule, url,
parentPath, bundleId,
pkgMain = getOwn(config.pkgs, moduleName);
if (pkgMain) {
moduleName = pkgMain;
}
bundleId = getOwn(bundlesMap, moduleName);
if (bundleId) {
return context.nameToUrl(bundleId, ext, skipExt);
}
//If a colon is in the URL, it indicates a protocol is used and it is just
//an URL to a file, or if it starts with a slash, contains a query arg (i.e. ?)
@ -1556,7 +1608,6 @@ var requirejs, require, define;
} else {
//A module that needs to be converted to a path.
paths = config.paths;
pkgs = config.pkgs;
syms = moduleName.split('/');
//For each module name segment, see if there is a path
@ -1564,7 +1615,7 @@ var requirejs, require, define;
//and work up from it.
for (i = syms.length; i > 0; i -= 1) {
parentModule = syms.slice(0, i).join('/');
pkg = getOwn(pkgs, parentModule);
parentPath = getOwn(paths, parentModule);
if (parentPath) {
//If an array, it means there are a few choices,
@ -1574,22 +1625,12 @@ var requirejs, require, define;
}
syms.splice(0, i, parentPath);
break;
} else if (pkg) {
//If module name is just the package name, then looking
//for the main module.
if (moduleName === pkg.name) {
pkgPath = pkg.location + '/' + pkg.main;
} else {
pkgPath = pkg.location;
}
syms.splice(0, i, pkgPath);
break;
}
}
//Join the path parts together, then figure out if baseUrl is needed.
url = syms.join('/');
url += (ext || (/\?/.test(url) || skipExt ? '' : '.js'));
url += (ext || (/^data\:|\?/.test(url) || skipExt ? '' : '.js'));
url = (url.charAt(0) === '/' || url.match(/^[\w\+\.\-]+:/) ? '' : config.baseUrl) + url;
}
@ -1605,7 +1646,7 @@ var requirejs, require, define;
},
/**
* Executes a module callack function. Broken out as a separate function
* Executes a module callback function. Broken out as a separate function
* solely to allow the build system to sequence the files in the built
* layer in the right sequence.
*
@ -1643,7 +1684,7 @@ var requirejs, require, define;
onScriptError: function (evt) {
var data = getScriptData(evt);
if (!hasPathFallback(data.id)) {
return onError(makeError('scripterror', 'Script error', evt, [data.id]));
return onError(makeError('scripterror', 'Script error for: ' + data.id, evt, [data.id]));
}
}
};
@ -1772,8 +1813,19 @@ var requirejs, require, define;
* function. Intercept/override it if you want custom error handling.
* @param {Error} err the error object.
*/
req.onError = function (err) {
throw err;
req.onError = defaultOnError;
/**
* Creates the node for the load command. Only used in browser envs.
*/
req.createNode = function (config, moduleName, url) {
var node = config.xhtml ?
document.createElementNS('http://www.w3.org/1999/xhtml', 'html:script') :
document.createElement('script');
node.type = config.scriptType || 'text/javascript';
node.charset = 'utf-8';
node.async = true;
return node;
};
/**
@ -1790,12 +1842,7 @@ var requirejs, require, define;
node;
if (isBrowser) {
//In the browser so use a script tag
node = config.xhtml ?
document.createElementNS('http://www.w3.org/1999/xhtml', 'html:script') :
document.createElement('script');
node.type = config.scriptType || 'text/javascript';
node.charset = 'utf-8';
node.async = true;
node = req.createNode(config, moduleName, url);
node.setAttribute('data-requirecontext', context.contextName);
node.setAttribute('data-requiremodule', moduleName);
@ -1892,7 +1939,7 @@ var requirejs, require, define;
}
//Look for a data-main script attribute, which could also adjust the baseUrl.
if (isBrowser) {
if (isBrowser && !cfg.skipDataMain) {
//Figure out baseUrl. Get it from the script tag with require.js in it.
eachReverse(scripts(), function (script) {
//Set the 'head' where we can append children by
@ -1906,24 +1953,31 @@ var requirejs, require, define;
//baseUrl, if it is not already set.
dataMain = script.getAttribute('data-main');
if (dataMain) {
//Preserve dataMain in case it is a path (i.e. contains '?')
mainScript = dataMain;
//Set final baseUrl if there is not already an explicit one.
if (!cfg.baseUrl) {
//Pull off the directory of data-main for use as the
//baseUrl.
src = dataMain.split('/');
src = mainScript.split('/');
mainScript = src.pop();
subPath = src.length ? src.join('/') + '/' : './';
cfg.baseUrl = subPath;
dataMain = mainScript;
}
//Strip off any trailing .js since dataMain is now
//Strip off any trailing .js since mainScript is now
//like a module name.
dataMain = dataMain.replace(jsSuffixRegExp, '');
mainScript = mainScript.replace(jsSuffixRegExp, '');
//If mainScript is still a path, fall back to dataMain
if (req.jsExtRegExp.test(mainScript)) {
mainScript = dataMain;
}
//Put the data-main script in the files to load.
cfg.deps = cfg.deps ? cfg.deps.concat(dataMain) : [dataMain];
cfg.deps = cfg.deps ? cfg.deps.concat(mainScript) : [mainScript];
return true;
}

View file

@ -16,9 +16,8 @@ body {
color: white;
}
#logo {
padding: 15px;
margin-left: 70px;
#c9-logo, #ace-logo {
padding: 0;
border: none;
}
@ -47,4 +46,10 @@ body {
position: absolute;
right: 0;
border-left: 1px solid;
}
}
/* .ace_text-input {
z-index: 10!important;
opacity: 1!important;
background: rgb(84, 0, 255)!important;
}*/

View file

@ -32,25 +32,26 @@ define(function(require, exports, module) {
"use strict";
var dom = require("ace/lib/dom");
var oop = require("ace/lib/oop");
var event = require("ace/lib/event");
var Range = require("ace/range").Range;
var Tooltip = require("ace/tooltip").Tooltip;
var tooltipNode;
var TokenTooltip = function(editor) {
function TokenTooltip (editor) {
if (editor.tokenTooltip)
return;
editor.tokenTooltip = this;
Tooltip.call(this, editor.container);
editor.tokenTooltip = this;
this.editor = editor;
editor.tooltip = tooltipNode || this.$init();
this.update = this.update.bind(this);
this.onMouseMove = this.onMouseMove.bind(this);
this.onMouseOut = this.onMouseOut.bind(this);
event.addListener(editor.renderer.scroller, "mousemove", this.onMouseMove);
event.addListener(editor.renderer.content, "mouseout", this.onMouseOut);
};
}
oop.inherits(TokenTooltip, Tooltip);
(function(){
this.token = {};
@ -63,8 +64,8 @@ var TokenTooltip = function(editor) {
if (this.lastT - (r.timeStamp || 0) > 1000) {
r.rect = null;
r.timeStamp = this.lastT;
this.maxHeight = innerHeight;
this.maxWidth = innerWidth;
this.maxHeight = window.innerHeight;
this.maxWidth = window.innerWidth;
}
var canvasPos = r.rect || (r.rect = r.scroller.getBoundingClientRect());
@ -86,15 +87,10 @@ var TokenTooltip = function(editor) {
}
if (!token) {
session.removeMarker(this.marker);
tooltipNode.style.display = "none";
this.isOpen = false;
this.hide();
return;
}
if (!this.isOpen) {
tooltipNode.style.display = "";
this.isOpen = true;
}
var tokenText = token.type;
if (token.state)
tokenText += "|" + token.state;
@ -102,15 +98,15 @@ var TokenTooltip = function(editor) {
tokenText += "\n merge";
if (token.stateTransitions)
tokenText += "\n " + token.stateTransitions.join("\n ");
if (this.tokenText != tokenText) {
tooltipNode.textContent = tokenText;
this.tooltipWidth = tooltipNode.offsetWidth;
this.tooltipHeight = tooltipNode.offsetHeight;
this.setText(tokenText);
this.width = this.getWidth();
this.height = this.getHeight();
this.tokenText = tokenText;
}
this.updateTooltipPosition(this.x, this.y);
this.show(null, this.x, this.y);
this.token = token;
session.removeMarker(this.marker);
@ -123,56 +119,34 @@ var TokenTooltip = function(editor) {
this.y = e.clientY;
if (this.isOpen) {
this.lastT = e.timeStamp;
this.updateTooltipPosition(this.x, this.y);
this.setPosition(this.x, this.y);
}
if (!this.$timer)
this.$timer = setTimeout(this.update, 100);
};
this.onMouseOut = function(e) {
var t = e && e.relatedTarget;
var ct = e && e.currentTarget;
while(t && (t = t.parentNode)) {
if (t == ct)
return;
}
tooltipNode.style.display = "none";
if (e && e.currentTarget.contains(e.relatedTarget))
return;
this.hide();
this.editor.session.removeMarker(this.marker);
this.$timer = clearTimeout(this.$timer);
this.isOpen = false;
};
this.updateTooltipPosition = function(x, y) {
var st = tooltipNode.style;
if (x + 10 + this.tooltipWidth > this.maxWidth)
x = innerWidth - this.tooltipWidth - 10;
if (y > innerHeight * 0.75 || y + 20 + this.tooltipHeight > this.maxHeight)
y = y - this.tooltipHeight - 30;
st.left = x + 10 + "px";
st.top = y + 20 + "px";
};
this.$init = function() {
tooltipNode = document.documentElement.appendChild(dom.createElement("div"));
var st = tooltipNode.style;
st.position = "fixed";
st.display = "none";
st.background = "lightyellow";
st.borderRadius = "";
st.border = "1px solid gray";
st.padding = "1px";
st.zIndex = 1000;
st.fontFamily = "monospace";
st.whiteSpace = "pre-line";
return tooltipNode;
this.setPosition = function(x, y) {
if (x + 10 + this.width > this.maxWidth)
x = window.innerWidth - this.width - 10;
if (y > window.innerHeight * 0.75 || y + 20 + this.height > this.maxHeight)
y = y - this.height - 30;
Tooltip.prototype.setPosition.call(this, x + 10, y + 20);
};
this.destroy = function() {
this.onMouseOut();
event.removeListener(this.editor.renderer.scroller, "mousemove", this.onMouseMove);
event.removeListener(this.editor.renderer.content, "mouseout", this.onMouseOut);
delete this.editor.tokenTooltip;
delete this.editor.tokenTooltip;
};
}).call(TokenTooltip.prototype);
@ -180,4 +154,3 @@ var TokenTooltip = function(editor) {
exports.TokenTooltip = TokenTooltip;
});

View file

@ -42,7 +42,7 @@ var MultiSelect = require("ace/multi_select").MultiSelect;
exports.createEditor = function(el) {
return new Editor(new Renderer(el));
}
};
exports.createSplitEditor = function(el) {
if (typeof(el) == "string")
@ -62,9 +62,6 @@ exports.createSplitEditor = function(el) {
split.editor1 = split[1] = new Editor(new Renderer(e1));
split.splitter = s;
MultiSelect(split.editor0);
MultiSelect(split.editor1);
s.ratio = 0.5;
split.resize = function resize(){
@ -108,8 +105,8 @@ exports.createSplitEditor = function(el) {
};
var onResizeInterval = function() {
s.ratio = (x - rect.left) / rect.width
split.resize()
s.ratio = (x - rect.left) / rect.width;
split.resize();
};
event.capture(s, onMouseMove, onResizeEnd);
@ -221,7 +218,7 @@ function optgroup(values) {
return values.map(function(item) {
if (typeof item == "string")
item = {name: item, caption: item};
return elt("option", {value: item.name}, item.caption || item.desc);
return elt("option", {value: item.value || item.name}, item.caption || item.desc);
});
}

View file

@ -23,26 +23,29 @@
<pre id="editor"></pre>
<script src="../build/src-noconflict/ace.js"></script>
<script src="../build/src-noconflict/ext-modelist.js"></script>
<script src="kitchen-sink/require.js"></script>
<script>
// setup paths
require.config({paths: { "ace" : "../lib/ace"}});
// load ace and extensions
require(["ace/ace", "ace/ext/modelist"], function(ace) {
var editor = ace.edit("editor");
editor.setTheme("ace/theme/twilight");
(function () {
var modelist = ace.require('ace/ext/modelist');
var modelist = ace.require("ace/ext/modelist");
// the file path could come from an xmlhttp request, a drop event,
// or any other scriptable file loading process.
// Extensions could consume the modelist and use it to dynamically
// set the editor mode. Webmasters could use it in their scripts
// for site specific purposes as well.
var filePath = 'blahblah/weee/some.js';
var filePath = "blahblah/weee/some.js";
var mode = modelist.getModeForPath(filePath).mode;
console.log(mode);
editor.session.setMode(mode);
}());
})
</script>
<script src="./demo_helper.js"></script>
<script src="./show_own_source.js"></script>
</body>
</html>

20
demo/r.js/build.js Normal file
View file

@ -0,0 +1,20 @@
({
optimize: "none",
preserveLicenseComments: false,
name: "node_modules/almond/almond",
baseUrl: "../../",
paths: {
ace : "lib/ace",
demo: "demo/kitchen-sink"
},
packages: [
],
include: [
"ace/ace"
],
exclude: [
],
out: "./packed.js",
useStrict: true,
wrap: false
})

36
demo/r.js/editor.html Normal file
View file

@ -0,0 +1,36 @@
<!DOCTYPE html>
<html>
<head>
<title>Editor</title>
<link rel="stylesheet" href="../kitchen-sink/styles.css" type="text/css" media="screen" charset="utf-8">
</head>
<body>
<div id="optionsPanel" style="position:absolute;height:100%;width:260px">
<a href="http://c9.io" title="Cloud9 IDE | Your code anywhere, anytime">
<img id="c9-logo" src="../kitchen-sink/logo.png" style="width: 172px;margin: -9px 30px -12px 51px;">
</a>
</div>
<pre id="editor-container">
<div style="color:black; padding: 10px">
demo showing Ace usage with r.js:
install r.js and almond
and run `<code>r.js -o demo/r.js/build.js</code>`
note that you also need ace/build/src to lazy load modes and themes
require("ace/config").set("basePath", "../../build/src");
require("ace/config").set("packaged", true);
<div>
</pre>
<script src="./packed.js" data-ace-base="src" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript" charset="utf-8">
require("ace/config").set("basePath", "../../build/src")
require("ace/config").set("packaged", true)
var editor = require("ace/ace").edit("editor-container");
editor.session.setMode("ace/mode/javascript");
// editor.session.setValue("var editor = Ace!")
</script>
</body>
</html>

View file

@ -29,14 +29,20 @@
}</pre>
<script src="../demo/kitchen-sink/require.js"></script>
<script src="../build/src/ace.js" charset="utf-8"></script>
<script>
var editor = ace.edit("editor");
editor.setTheme("ace/theme/twilight");
editor.session.setMode("ace/mode/javascript");
require(["ace/requirejs/text!src/ace"], function(e){
editor.setValue(e);
})
require.config({paths: {ace: "../build/src"}})
define('testace', ['ace/ace'],
function(ace, langtools) {
console.log("This is the testace module");
var editor = ace.edit("editor");
editor.setTheme("ace/theme/twilight");
editor.session.setMode("ace/mode/javascript");
require(["ace/requirejs/text!src/ace"], function(e){
editor.setValue(e);
})
}
);
require(['testace'])
</script>
</body>

View file

@ -5,19 +5,18 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>Editor</title>
<style type="text/css" media="screen">
.ace_editor {
position: relative !important;
border: 1px solid lightgray;
margin: auto;
height: 200px;
width: 80%;
}
.ace_editor {
position: relative !important;
border: 1px solid lightgray;
margin: auto;
height: 200px;
width: 80%;
}
.ace_editor.fullScreen {
height: auto;
width: auto;
border: 0;
height: auto;
width: auto;
border: 0;
margin: 0;
position: fixed !important;
top: 0;
@ -25,17 +24,16 @@
left: 0;
right: 0;
z-index: 10;
background: white;
}
.fullScreen {
overflow: hidden
}
.fullScreen {
overflow: hidden
}
.scrollmargin {
height: 500px;
.scrollmargin {
height: 500px;
text-align: center;
}
}
.large-button {
color: lightblue;
@ -56,7 +54,7 @@
<body>
<div class="scrollmargin">
<span onclick="scroll()" class="large-button">
scroll down &dArr;
scroll down &dArr;
</span>
</div>
<pre id="editor">function foo(items) {
@ -76,28 +74,35 @@
</div>
<script src="../build/src/ace.js"></script>
<script src="kitchen-sink/require.js"></script>
<script>
require.config({paths: { "ace" : "../lib/ace"}});
require(["ace/ace", "ace/ext/themelist"], function(ace) {
var $ = document.getElementById.bind(document);
var dom = require("ace/lib/dom");
//add command to all new editor instaces
require("ace/commands/default_commands").commands.push({
name: "Toggle Fullscreen",
bindKey: "F11",
exec: function(editor) {
dom.toggleCssClass(document.body, "fullScreen")
dom.toggleCssClass(editor.container, "fullScreen")
editor.setAutoScrollEditorIntoView()
editor.resize()
}
name: "Toggle Fullscreen",
bindKey: "F11",
exec: function(editor) {
var fullScreen = dom.toggleCssClass(document.body, "fullScreen")
dom.setCssClass(editor.container, "fullScreen", fullScreen)
editor.setAutoScrollEditorIntoView(!fullScreen)
editor.resize()
}
})
// create first editor
var editor = ace.edit("editor");
editor.setTheme("ace/theme/twilight");
editor.session.setMode("ace/mode/javascript");
editor.setAutoScrollEditorIntoView();
editor.renderer.setScrollMargin(10, 10);
editor.setOptions({
// "scrollPastEnd": 0.8,
autoScrollEditorIntoView: true
});
var count = 1;
function add() {
@ -110,12 +115,13 @@ function add() {
oldEl.parentNode.insertBefore(el, pad.nextSibling)
count++
var theme = "ace/theme/" + themes[Math.floor(themes.length * Math.random() - 1e-5)]
var theme = themes[Math.floor(themes.length * Math.random() - 1e-5)]
editor = ace.edit(el)
editor.setTheme(theme)
editor.session.setMode("ace/mode/javascript")
editor.setAutoScrollEditorIntoView()
editor.setOptions({
mode: "ace/mode/javascript",
theme: theme,
autoScrollEditorIntoView: true
})
editor.setValue([
"this is editor number: ", count, "\n",
@ -126,7 +132,6 @@ function add() {
scroll()
}
function scroll(speed) {
var top = editor.container.getBoundingClientRect().top
speed = speed || 10
@ -139,14 +144,11 @@ function scroll(speed) {
}
}
var themes = {
bright: [ "chrome", "clouds", "crimson_editor", "dawn", "dreamweaver", "eclipse", "github",
"solarized_light", "textmate", "tomorrow"],
dark: [ "clouds_midnight", "cobalt", "idle_fingers", "kr_theme", "merbivore", "merbivore_soft",
"mono_industrial", "monokai", "pastel_on_dark", "solarized_dark", "terminal", "tomorrow_night",
"tomorrow_night_blue", "tomorrow_night_bright", "tomorrow_night_eighties", "twilight", "vibrant_ink"]
}
themes = [].concat(themes.bright, themes.dark);
var themes = require("ace/ext/themelist").themes.map(function(t){return t.theme});
window.add = add;
window.scroll = scroll;
});
</script>
</body>

View file

@ -23,9 +23,12 @@
<pre id="editor"></pre>
<script src="../build/src-noconflict/ace.js"></script>
<script src="../build/src-noconflict/ext-settings_menu.js"></script>
<script src="kitchen-sink/require.js"></script>
<script>
// setup paths
require.config({paths: { "ace" : "../lib/ace"}});
// load ace and extensions
require(["ace/ace", "ace/ext/settings_menu"], function(ace) {
var editor = ace.edit("editor");
ace.require('ace/ext/settings_menu').init(editor);
editor.setTheme("ace/theme/twilight");
@ -38,8 +41,9 @@
},
readOnly: true
}]);
})
</script>
<script src="./demo_helper.js"></script>
<script src="./show_own_source.js"></script>
</body>
</html>

16
demo/show_own_source.js Normal file
View file

@ -0,0 +1,16 @@
if (typeof ace == "undefined" && typeof require == "undefined") {
document.body.innerHTML = "<p style='padding: 20px 50px;'>couldn't find ace.js file, <br>"
+ "to build it run <code>node Makefile.dryice.js full<code>"
} else if (typeof ace == "undefined" && typeof require != "undefined") {
require(["ace/ace"], setValue)
} else {
require = ace.require;
setValue()
}
function setValue() {
require("ace/lib/net").get(document.baseURI, function(t){
var el = document.getElementById("editor");
el.env.editor.setValue(t, 1);
})
}

View file

@ -0,0 +1,83 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Static Code highlighter using Ace</title>
<meta name="author" content="Matthew Kastor">
<style type="text/css">
.code {
width: 50%;
white-space: pre-wrap;
border: solid lightgrey 1px
}
</style>
</head>
<body>
<h2>Client Side Syntax Highlighting</h2>
<p>Syntax highlighting using Ace language modes and themes.</p>
<div class="code" ace-mode="ace/mode/css" ace-theme="ace/theme/chrome" ace-gutter="true">
.code {
width: 50%;
white-space: pre-wrap;
border: solid lightgrey 1px
}
</div>
<pre class="code" ace-mode="ace/mode/javascript" ace-theme="ace/theme/twilight">
function wobble (flam) {
return flam.wobbled = true;
}
</pre>
<div class="code" ace-mode="ace/mode/lua" ace-theme="ace/theme/chrome" ace-gutter="true" style="width: 30em;">
--[[--
num_args takes in 5.1 byte code and extracts the number of arguments from its function header.
--]]--
function int(t)
return t:byte(1) + t:byte(2) * 0x100 + t:byte(3) * 0x10000 + t:byte(4) * 0x1000000
end
function num_args(func)
local dump = string.dump(func)
local offset, cursor = int(dump:sub(13)), offset + 26
--Get the params and var flag (whether there's a ... in the param)
return dump:sub(cursor):byte(), dump:sub(cursor+1):byte()
end
</div>
<script src="kitchen-sink/require.js"></script>
<script>
require.config({paths: { "ace" : "../lib/ace"}});
require(["ace/ace", "ace/ext/static_highlight"], function(ace) {
var highlight = ace.require("ace/ext/static_highlight")
var dom = ace.require("ace/lib/dom")
function qsa(sel) {
return Array.apply(null, document.querySelectorAll(sel));
}
qsa(".code").forEach(function (codeEl) {
highlight(codeEl, {
mode: codeEl.getAttribute("ace-mode"),
theme: codeEl.getAttribute("ace-theme"),
startLineNumber: 1,
showGutter: codeEl.getAttribute("ace-gutter"),
trim: true
}, function (highlighted) {
});
});
})
</script>
</body>
</html>

View file

@ -1,71 +0,0 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Static Code highlighter using Ace</title>
<meta name="author" content="Matthew Kastor">
<style type="text/css">
.code {
width: 50%;
position: relative;
white-space: pre-wrap;
}
</style>
</head>
<body>
<h2>Client Side Syntax Highlighting</h2>
<p>Syntax highlighting using Ace language modes and themes.</p>
<div class="code" ace-mode="ace/mode/css" ace-theme="ace/theme/chrome">
.code {
width: 50%;
position: relative;
white-space: pre-wrap;
}
</div>
<pre class="code" ace-mode="ace/mode/javascript" ace-theme="ace/theme/twilight">
function wobble (flam) {
return flam.wobbled = true;
}
// the scrollbars are from overflow auto on .ace_editor.
</pre>
<script src="../../build/src-noconflict/ace.js"></script>
<script src="../../build/src-noconflict/ext-static_highlight.js"></script>
<script>
var highlighter = ace.require("ace/ext/static_highlight")
var dom = ace.require("ace/lib/dom")
function qsa(sel) {
return [].slice.call(document.querySelectorAll(sel));
}
qsa(".code").forEach(function (codeEl) {
var cs = getComputedStyle(codeEl);
codeEl.style.cssText = codeEl.style.cssText +
'width: ' + cs.width + ';' +
'height: ' + cs.height + ';';
var mode = codeEl.getAttribute('ace-mode');
var theme = codeEl.getAttribute('ace-theme');
var data = codeEl.textContent.trim();
highlighter.render(data, mode, theme, 1, false, function (highlighted) {
dom.importCssString(highlighted.css, "ace_highlight");
dom.importCssString('.ace_editor { overflow: auto; ' +
'position:absolute; top:0; bottom:0; right:0; left:0; }' +
'.ace_gutter { position: relative; }',
'atropa_hial');
codeEl.innerHTML = highlighted.html;
});
});
</script>
</body>
</html>

View file

@ -6,11 +6,9 @@
// include ace search path and modules
require("amd-loader");
// load jsdom, which is required by Ace
require("../../lib/ace/test/mockdom");
var http = require("http");
var fs = require("fs");
var resolve = require("path").resolve;
// load the highlighter and the desired mode and theme
var highlighter = require("../../lib/ace/ext/static_highlight");
@ -20,15 +18,24 @@ var theme = require("../../lib/ace/theme/twilight");
var port = process.env.PORT || 2222;
http.createServer(function(req, res) {
var url = req.url;
var path = /[^#?\x00]*/.exec(url)[0];
var root = resolve(__dirname + "/../../").replace(/\\/g, "/");
path = resolve(root + "/" + path).replace(/\\/g, "/");
if (path.indexOf(root + "/") != 0)
path = __filename;
res.writeHead(200, {"Content-Type": "text/html; charset=utf-8"});
fs.readFile(__filename, "utf8", function(err, data) {
fs.readFile(path, "utf8", function(err, data) {
if (err) data = err.message;
var highlighted = highlighter.render(data, new JavaScriptMode(), theme);
res.end('<html><body>\n\
<style type="text/css" media="screen">\n\
:css:\n\
</style>\n\
:html:\n\
</body></html>'.replace(":css:", highlighted.css).replace(":html:", highlighted.html));
res.end(
'<html><body>\n' +
'<style type="text/css" media="screen">\n' +
highlighted.css +
'</style>\n' +
highlighted.html +
'</body></html>'
);
});
}).listen(port);

View file

@ -41,17 +41,21 @@
<pre id="editor"></pre>
<div id="statusBar">ace rocks!</div>
<script src="../build/src-noconflict/ace.js"></script>
<script src="../build/src-noconflict/ext-statusbar.js"></script>
<script src="kitchen-sink/require.js"></script>
<script>
// setup paths
require.config({paths: { "ace" : "../lib/ace"}});
// load ace and extensions
require(["ace/ace", "ace/ext/statusbar"], function(ace) {
var editor = ace.edit("editor");
var StatusBar = ace.require('ace/ext/statusbar').StatusBar;
var StatusBar = ace.require("ace/ext/statusbar").StatusBar;
// create a simple selection status indicator
var statusBar = new StatusBar(editor, document.getElementById('statusBar'));
var statusBar = new StatusBar(editor, document.getElementById("statusBar"));
editor.setTheme("ace/theme/dawn");
editor.session.setMode("ace/mode/html");
});
</script>
<script src="./demo_helper.js"></script>
<script src="./show_own_source.js"></script>
</body>
</html>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.6 KiB

Some files were not shown because too many files have changed in this diff Show more