jeygeethanmedia-inkpen 1.2.6.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +15 -0
- data/.rspec +1 -0
- data/.ruby-version +1 -0
- data/CHANGELOG.md +175 -0
- data/Gemfile +43 -0
- data/Gemfile.lock +333 -0
- data/Guardfile +33 -0
- data/LICENSE +165 -0
- data/README.rdoc +150 -0
- data/Rakefile +31 -0
- data/app/assets/config/manifest.js +5 -0
- data/app/assets/fonts/BPmono-webfont.eot +0 -0
- data/app/assets/fonts/BPmono-webfont.svg +216 -0
- data/app/assets/fonts/BPmono-webfont.ttf +0 -0
- data/app/assets/fonts/BPmono-webfont.woff +0 -0
- data/app/assets/fonts/BPmonoBold-webfont.eot +0 -0
- data/app/assets/fonts/BPmonoBold-webfont.svg +148 -0
- data/app/assets/fonts/BPmonoBold-webfont.ttf +0 -0
- data/app/assets/fonts/BPmonoBold-webfont.woff +0 -0
- data/app/assets/fonts/BPmonoItalics-webfont.eot +0 -0
- data/app/assets/fonts/BPmonoItalics-webfont.svg +148 -0
- data/app/assets/fonts/BPmonoItalics-webfont.ttf +0 -0
- data/app/assets/fonts/BPmonoItalics-webfont.woff +0 -0
- data/app/assets/fonts/Museo300-Regular-webfont.eot +0 -0
- data/app/assets/fonts/Museo300-Regular-webfont.svg +160 -0
- data/app/assets/fonts/Museo300-Regular-webfont.ttf +0 -0
- data/app/assets/fonts/Museo300-Regular-webfont.woff +0 -0
- data/app/assets/fonts/Museo500-Regular-webfont.eot +0 -0
- data/app/assets/fonts/Museo500-Regular-webfont.svg +160 -0
- data/app/assets/fonts/Museo500-Regular-webfont.ttf +0 -0
- data/app/assets/fonts/Museo500-Regular-webfont.woff +0 -0
- data/app/assets/fonts/Ubuntu-B-webfont.eot +0 -0
- data/app/assets/fonts/Ubuntu-B-webfont.svg +232 -0
- data/app/assets/fonts/Ubuntu-B-webfont.ttf +0 -0
- data/app/assets/fonts/Ubuntu-B-webfont.woff +0 -0
- data/app/assets/fonts/Ubuntu-L-webfont 2.ttf +0 -0
- data/app/assets/fonts/Ubuntu-L-webfont.svg +147 -0
- data/app/assets/fonts/Ubuntu-L-webfont.ttf +0 -0
- data/app/assets/fonts/Ubuntu-L-webfont.woff +0 -0
- data/app/assets/fonts/Ubuntu-R-webfont.eot +0 -0
- data/app/assets/fonts/Ubuntu-R-webfont.svg +232 -0
- data/app/assets/fonts/Ubuntu-R-webfont.ttf +0 -0
- data/app/assets/fonts/Ubuntu-R-webfont.woff +0 -0
- data/app/assets/fonts/Ubuntu-RI-webfont.eot +0 -0
- data/app/assets/fonts/Ubuntu-RI-webfont.svg +232 -0
- data/app/assets/fonts/Ubuntu-RI-webfont.ttf +0 -0
- data/app/assets/fonts/Ubuntu-RI-webfont.woff +0 -0
- data/app/assets/heroes/001.jpg +0 -0
- data/app/assets/heroes/001_dark.jpg +0 -0
- data/app/assets/heroes/002.jpg +0 -0
- data/app/assets/heroes/002_dark.jpg +0 -0
- data/app/assets/heroes/003.jpg +0 -0
- data/app/assets/heroes/003_dark.jpg +0 -0
- data/app/assets/images/article-icons.png +0 -0
- data/app/assets/images/checkbox-icon.png +0 -0
- data/app/assets/images/favicon.ico +0 -0
- data/app/assets/images/footer_icon.png +0 -0
- data/app/assets/images/gplus.svg +17 -0
- data/app/assets/images/ic_action_add.png +0 -0
- data/app/assets/images/ic_action_home.png +0 -0
- data/app/assets/images/ic_arrow_left.png +0 -0
- data/app/assets/images/ic_arrow_right.png +0 -0
- data/app/assets/images/ic_googleplus.png +0 -0
- data/app/assets/images/ic_rss.png +0 -0
- data/app/assets/images/ic_rss_hover.png +0 -0
- data/app/assets/images/ic_twitter.png +0 -0
- data/app/assets/images/ic_twitter_hover.png +0 -0
- data/app/assets/images/icon_addphoto.png +0 -0
- data/app/assets/images/opoloo_feed.png +0 -0
- data/app/assets/images/signet_opoloo.png +0 -0
- data/app/assets/images/squirrelpark_signet.png +0 -0
- data/app/assets/javascripts/lines/admin/admin.js +299 -0
- data/app/assets/javascripts/lines/admin/autosize.min.js +7 -0
- data/app/assets/javascripts/lines/admin/navbar.js +51 -0
- data/app/assets/javascripts/lines/admin/pictures.js.coffee +22 -0
- data/app/assets/javascripts/lines/application.js +17 -0
- data/app/assets/javascripts/lines/articles.js.coffee +6 -0
- data/app/assets/javascripts/lines/viewer.js.coffee +3 -0
- data/app/assets/stylesheets/lines/admin/admin.scss +609 -0
- data/app/assets/stylesheets/lines/admin/variables_and_mixins.scss +36 -0
- data/app/assets/stylesheets/lines/application.scss +11 -0
- data/app/assets/stylesheets/lines/article.scss +302 -0
- data/app/assets/stylesheets/lines/fonts.scss +4 -0
- data/app/assets/stylesheets/lines/footer.scss +18 -0
- data/app/assets/stylesheets/lines/general.scss +90 -0
- data/app/assets/stylesheets/lines/lines_overrides.scss +6 -0
- data/app/assets/stylesheets/lines/media_queries.scss +41 -0
- data/app/assets/stylesheets/lines/messages.scss +29 -0
- data/app/assets/stylesheets/lines/navbar.scss +227 -0
- data/app/assets/stylesheets/lines/pagination.scss +17 -0
- data/app/assets/stylesheets/lines/pygments.css.erb +2 -0
- data/app/assets/stylesheets/lines/variables_and_mixins.scss +27 -0
- data/app/controllers/lines/admin/application_controller.rb +21 -0
- data/app/controllers/lines/admin/articles_controller.rb +176 -0
- data/app/controllers/lines/admin/authors_controller.rb +71 -0
- data/app/controllers/lines/admin/pictures_controller.rb +44 -0
- data/app/controllers/lines/application_controller.rb +18 -0
- data/app/controllers/lines/articles_controller.rb +72 -0
- data/app/controllers/lines/password_resets_controller.rb +81 -0
- data/app/controllers/lines/sessions_controller.rb +34 -0
- data/app/helpers/lines/application_helper.rb +125 -0
- data/app/mailers/lines/user_mailer.rb +11 -0
- data/app/models/lines/application_record.rb +3 -0
- data/app/models/lines/article.rb +127 -0
- data/app/models/lines/author.rb +41 -0
- data/app/models/lines/authorable.rb +8 -0
- data/app/models/lines/picture.rb +25 -0
- data/app/models/lines/user.rb +72 -0
- data/app/uploaders/document_uploader.rb +16 -0
- data/app/uploaders/hero_image_uploader.rb +31 -0
- data/app/uploaders/picture_uploader.rb +35 -0
- data/app/views/kaminari/lines/_gap.html.erb +8 -0
- data/app/views/kaminari/lines/_next_page.html.erb +11 -0
- data/app/views/kaminari/lines/_page.html.erb +12 -0
- data/app/views/kaminari/lines/_paginator.html.erb +27 -0
- data/app/views/kaminari/lines/_prev_page.html.erb +11 -0
- data/app/views/layouts/lines/_markdown_cheatsheet.html.erb +72 -0
- data/app/views/layouts/lines/admin.html.erb +45 -0
- data/app/views/layouts/lines/application.html.erb +54 -0
- data/app/views/layouts/lines/preview.html.erb +42 -0
- data/app/views/lines/admin/articles/_form.html.erb +99 -0
- data/app/views/lines/admin/articles/_picture_box.html.erb +32 -0
- data/app/views/lines/admin/articles/edit.html.erb +2 -0
- data/app/views/lines/admin/articles/index.html.erb +64 -0
- data/app/views/lines/admin/articles/new.html.erb +6 -0
- data/app/views/lines/admin/articles/show.html.erb +8 -0
- data/app/views/lines/admin/authors/_form.html.erb +25 -0
- data/app/views/lines/admin/authors/edit.html.erb +20 -0
- data/app/views/lines/admin/authors/index.html.erb +39 -0
- data/app/views/lines/admin/authors/new.html.erb +20 -0
- data/app/views/lines/admin/authors/show.html.erb +24 -0
- data/app/views/lines/admin/pictures/_form.html.erb +29 -0
- data/app/views/lines/admin/pictures/_picture.html.erb +6 -0
- data/app/views/lines/admin/pictures/create.js.erb +5 -0
- data/app/views/lines/admin/pictures/destroy.js.erb +1 -0
- data/app/views/lines/articles/_article.html.erb +45 -0
- data/app/views/lines/articles/_article_collection.html.erb +5 -0
- data/app/views/lines/articles/_article_small.html.erb +24 -0
- data/app/views/lines/articles/index.atom.builder +34 -0
- data/app/views/lines/articles/index.html.erb +15 -0
- data/app/views/lines/articles/show.html.erb +5 -0
- data/app/views/lines/password_resets/edit.html.erb +39 -0
- data/app/views/lines/password_resets/new.html.erb +14 -0
- data/app/views/lines/sessions/new.html.erb +22 -0
- data/app/views/lines/shared/_flash.html.erb +8 -0
- data/app/views/lines/shared/_footer.html.erb +9 -0
- data/app/views/lines/shared/_navigation.html.erb +18 -0
- data/app/views/lines/user_mailer/password_reset.html.erb +11 -0
- data/app/views/lines/user_mailer/password_reset.text.erb +12 -0
- data/bin/rails +12 -0
- data/certs/lines-engine.pem +21 -0
- data/config/initializers/assets.rb +1 -0
- data/config/initializers/carrierwave_test.rb +9 -0
- data/config/initializers/kaminari_config.rb +11 -0
- data/config/initializers/load_config.rb +13 -0
- data/config/lines_config.yml +63 -0
- data/config/locales/de.yml +210 -0
- data/config/locales/kaminari.de.yml +8 -0
- data/config/locales/kaminari.en.yml +8 -0
- data/config/locales/lines.de.yml +64 -0
- data/config/locales/lines.en.yml +64 -0
- data/config/routes.rb +37 -0
- data/db/migrate/20140505122014_base_migration.rb +84 -0
- data/db/migrate/20140702160602_acts_as_taggable_on_migration.acts_as_taggable_on_engine.rb +31 -0
- data/db/migrate/20140702160603_add_missing_unique_indices.acts_as_taggable_on_engine.rb +20 -0
- data/db/migrate/20140702160604_add_taggings_counter_cache_to_tags.acts_as_taggable_on_engine.rb +15 -0
- data/db/migrate/20141027143656_add_teaser_to_article.rb +5 -0
- data/db/migrate/20150421093311_add_reset_password_fields_to_users.rb +6 -0
- data/db/seeds.rb +9 -0
- data/lib/generators/lines/README +31 -0
- data/lib/generators/lines/copy_styles_generator.rb +13 -0
- data/lib/generators/lines/install_generator.rb +52 -0
- data/lib/generators/lines/templates/octorel.png +0 -0
- data/lib/lines.rb +14 -0
- data/lib/lines/engine.rb +71 -0
- data/lib/lines/version.rb +3 -0
- data/lib/tasks/lines.rake +51 -0
- data/lib/tasks/lines_tasks.rake +4 -0
- data/lines.gemspec +58 -0
- data/public/codemirror/.gitattributes +8 -0
- data/public/codemirror/.gitignore +8 -0
- data/public/codemirror/.npmignore +9 -0
- data/public/codemirror/.travis.yml +4 -0
- data/public/codemirror/AUTHORS +474 -0
- data/public/codemirror/CONTRIBUTING.md +88 -0
- data/public/codemirror/LICENSE +19 -0
- data/public/codemirror/README.md +27 -0
- data/public/codemirror/addon/comment/comment.js +183 -0
- data/public/codemirror/addon/comment/continuecomment.js +85 -0
- data/public/codemirror/addon/dialog/dialog.css +32 -0
- data/public/codemirror/addon/dialog/dialog.js +157 -0
- data/public/codemirror/addon/display/fullscreen.css +6 -0
- data/public/codemirror/addon/display/fullscreen.js +41 -0
- data/public/codemirror/addon/display/panel.js +112 -0
- data/public/codemirror/addon/display/placeholder.js +58 -0
- data/public/codemirror/addon/display/rulers.js +63 -0
- data/public/codemirror/addon/edit/closebrackets.js +185 -0
- data/public/codemirror/addon/edit/closetag.js +166 -0
- data/public/codemirror/addon/edit/continuelist.js +51 -0
- data/public/codemirror/addon/edit/matchbrackets.js +120 -0
- data/public/codemirror/addon/edit/matchtags.js +66 -0
- data/public/codemirror/addon/edit/trailingspace.js +27 -0
- data/public/codemirror/addon/fold/brace-fold.js +105 -0
- data/public/codemirror/addon/fold/comment-fold.js +57 -0
- data/public/codemirror/addon/fold/foldcode.js +149 -0
- data/public/codemirror/addon/fold/foldgutter.css +20 -0
- data/public/codemirror/addon/fold/foldgutter.js +146 -0
- data/public/codemirror/addon/fold/indent-fold.js +44 -0
- data/public/codemirror/addon/fold/markdown-fold.js +49 -0
- data/public/codemirror/addon/fold/xml-fold.js +182 -0
- data/public/codemirror/addon/hint/anyword-hint.js +41 -0
- data/public/codemirror/addon/hint/css-hint.js +60 -0
- data/public/codemirror/addon/hint/html-hint.js +348 -0
- data/public/codemirror/addon/hint/javascript-hint.js +146 -0
- data/public/codemirror/addon/hint/show-hint.css +38 -0
- data/public/codemirror/addon/hint/show-hint.js +386 -0
- data/public/codemirror/addon/hint/sql-hint.js +254 -0
- data/public/codemirror/addon/hint/xml-hint.js +110 -0
- data/public/codemirror/addon/lint/coffeescript-lint.js +41 -0
- data/public/codemirror/addon/lint/css-lint.js +35 -0
- data/public/codemirror/addon/lint/javascript-lint.js +136 -0
- data/public/codemirror/addon/lint/json-lint.js +31 -0
- data/public/codemirror/addon/lint/lint.css +73 -0
- data/public/codemirror/addon/lint/lint.js +207 -0
- data/public/codemirror/addon/lint/yaml-lint.js +28 -0
- data/public/codemirror/addon/merge/merge.css +112 -0
- data/public/codemirror/addon/merge/merge.js +775 -0
- data/public/codemirror/addon/mode/loadmode.js +64 -0
- data/public/codemirror/addon/mode/multiplex.js +123 -0
- data/public/codemirror/addon/mode/multiplex_test.js +33 -0
- data/public/codemirror/addon/mode/overlay.js +85 -0
- data/public/codemirror/addon/mode/simple.js +213 -0
- data/public/codemirror/addon/runmode/colorize.js +40 -0
- data/public/codemirror/addon/runmode/runmode-standalone.js +157 -0
- data/public/codemirror/addon/runmode/runmode.js +72 -0
- data/public/codemirror/addon/runmode/runmode.node.js +178 -0
- data/public/codemirror/addon/scroll/annotatescrollbar.js +115 -0
- data/public/codemirror/addon/scroll/scrollpastend.js +46 -0
- data/public/codemirror/addon/scroll/simplescrollbars.css +66 -0
- data/public/codemirror/addon/scroll/simplescrollbars.js +147 -0
- data/public/codemirror/addon/search/match-highlighter.js +128 -0
- data/public/codemirror/addon/search/matchesonscrollbar.css +8 -0
- data/public/codemirror/addon/search/matchesonscrollbar.js +97 -0
- data/public/codemirror/addon/search/search.js +202 -0
- data/public/codemirror/addon/search/searchcursor.js +189 -0
- data/public/codemirror/addon/selection/active-line.js +71 -0
- data/public/codemirror/addon/selection/mark-selection.js +118 -0
- data/public/codemirror/addon/selection/selection-pointer.js +98 -0
- data/public/codemirror/addon/tern/tern.css +87 -0
- data/public/codemirror/addon/tern/tern.js +699 -0
- data/public/codemirror/addon/tern/worker.js +44 -0
- data/public/codemirror/addon/wrap/hardwrap.js +139 -0
- data/public/codemirror/bin/authors.sh +6 -0
- data/public/codemirror/bin/compress +92 -0
- data/public/codemirror/bin/lint +3 -0
- data/public/codemirror/bin/release +45 -0
- data/public/codemirror/bin/source-highlight +51 -0
- data/public/codemirror/bower.json +17 -0
- data/public/codemirror/demo/activeline.html +78 -0
- data/public/codemirror/demo/anywordhint.html +79 -0
- data/public/codemirror/demo/bidi.html +74 -0
- data/public/codemirror/demo/btree.html +85 -0
- data/public/codemirror/demo/buffers.html +109 -0
- data/public/codemirror/demo/changemode.html +58 -0
- data/public/codemirror/demo/closebrackets.html +52 -0
- data/public/codemirror/demo/closetag.html +41 -0
- data/public/codemirror/demo/complete.html +79 -0
- data/public/codemirror/demo/emacs.html +75 -0
- data/public/codemirror/demo/folding.html +95 -0
- data/public/codemirror/demo/fullscreen.html +83 -0
- data/public/codemirror/demo/hardwrap.html +72 -0
- data/public/codemirror/demo/html5complete.html +56 -0
- data/public/codemirror/demo/indentwrap.html +59 -0
- data/public/codemirror/demo/lint.html +171 -0
- data/public/codemirror/demo/loadmode.html +72 -0
- data/public/codemirror/demo/marker.html +52 -0
- data/public/codemirror/demo/markselection.html +52 -0
- data/public/codemirror/demo/matchhighlighter.html +47 -0
- data/public/codemirror/demo/matchtags.html +48 -0
- data/public/codemirror/demo/merge.html +122 -0
- data/public/codemirror/demo/multiplex.html +75 -0
- data/public/codemirror/demo/mustache.html +69 -0
- data/public/codemirror/demo/panel.html +136 -0
- data/public/codemirror/demo/placeholder.html +45 -0
- data/public/codemirror/demo/preview.html +87 -0
- data/public/codemirror/demo/requirejs.html +70 -0
- data/public/codemirror/demo/resize.html +51 -0
- data/public/codemirror/demo/rulers.html +49 -0
- data/public/codemirror/demo/runmode.html +62 -0
- data/public/codemirror/demo/search.html +95 -0
- data/public/codemirror/demo/simplemode.html +186 -0
- data/public/codemirror/demo/simplescrollbars.html +82 -0
- data/public/codemirror/demo/spanaffectswrapping_shim.html +85 -0
- data/public/codemirror/demo/sublime.html +76 -0
- data/public/codemirror/demo/tern.html +133 -0
- data/public/codemirror/demo/theme.html +152 -0
- data/public/codemirror/demo/trailingspace.html +48 -0
- data/public/codemirror/demo/variableheight.html +67 -0
- data/public/codemirror/demo/vim.html +104 -0
- data/public/codemirror/demo/visibletabs.html +62 -0
- data/public/codemirror/demo/widget.html +85 -0
- data/public/codemirror/demo/xmlcomplete.html +119 -0
- data/public/codemirror/doc/activebookmark.js +57 -0
- data/public/codemirror/doc/compress.html +329 -0
- data/public/codemirror/doc/docs.css +271 -0
- data/public/codemirror/doc/internals.html +503 -0
- data/public/codemirror/doc/logo.png +0 -0
- data/public/codemirror/doc/logo.svg +181 -0
- data/public/codemirror/doc/manual.html +3327 -0
- data/public/codemirror/doc/realworld.html +174 -0
- data/public/codemirror/doc/releases.html +1116 -0
- data/public/codemirror/doc/reporting.html +61 -0
- data/public/codemirror/doc/upgrade_v2.2.html +96 -0
- data/public/codemirror/doc/upgrade_v3.html +230 -0
- data/public/codemirror/doc/upgrade_v4.html +144 -0
- data/public/codemirror/doc/yinyang.png +0 -0
- data/public/codemirror/index.html +199 -0
- data/public/codemirror/keymap/emacs.js +412 -0
- data/public/codemirror/keymap/sublime.js +555 -0
- data/public/codemirror/keymap/vim.js +5060 -0
- data/public/codemirror/lib/codemirror.css +332 -0
- data/public/codemirror/lib/codemirror.js +8788 -0
- data/public/codemirror/mode/apl/apl.js +174 -0
- data/public/codemirror/mode/apl/index.html +72 -0
- data/public/codemirror/mode/asciiarmor/asciiarmor.js +73 -0
- data/public/codemirror/mode/asciiarmor/index.html +46 -0
- data/public/codemirror/mode/asn.1/asn.1.js +204 -0
- data/public/codemirror/mode/asn.1/index.html +78 -0
- data/public/codemirror/mode/asterisk/asterisk.js +196 -0
- data/public/codemirror/mode/asterisk/index.html +154 -0
- data/public/codemirror/mode/brainfuck/brainfuck.js +85 -0
- data/public/codemirror/mode/brainfuck/index.html +85 -0
- data/public/codemirror/mode/clike/clike.js +604 -0
- data/public/codemirror/mode/clike/index.html +252 -0
- data/public/codemirror/mode/clike/scala.html +767 -0
- data/public/codemirror/mode/clike/test.js +33 -0
- data/public/codemirror/mode/clojure/clojure.js +244 -0
- data/public/codemirror/mode/clojure/index.html +88 -0
- data/public/codemirror/mode/cmake/cmake.js +97 -0
- data/public/codemirror/mode/cmake/index.html +129 -0
- data/public/codemirror/mode/cobol/cobol.js +255 -0
- data/public/codemirror/mode/cobol/index.html +210 -0
- data/public/codemirror/mode/coffeescript/coffeescript.js +369 -0
- data/public/codemirror/mode/coffeescript/index.html +740 -0
- data/public/codemirror/mode/commonlisp/commonlisp.js +123 -0
- data/public/codemirror/mode/commonlisp/index.html +177 -0
- data/public/codemirror/mode/css/css.js +756 -0
- data/public/codemirror/mode/css/index.html +75 -0
- data/public/codemirror/mode/css/less.html +152 -0
- data/public/codemirror/mode/css/less_test.js +54 -0
- data/public/codemirror/mode/css/scss.html +157 -0
- data/public/codemirror/mode/css/scss_test.js +110 -0
- data/public/codemirror/mode/css/test.js +188 -0
- data/public/codemirror/mode/cypher/cypher.js +146 -0
- data/public/codemirror/mode/cypher/index.html +63 -0
- data/public/codemirror/mode/d/d.js +218 -0
- data/public/codemirror/mode/d/index.html +273 -0
- data/public/codemirror/mode/dart/dart.js +50 -0
- data/public/codemirror/mode/dart/index.html +71 -0
- data/public/codemirror/mode/diff/diff.js +47 -0
- data/public/codemirror/mode/diff/index.html +117 -0
- data/public/codemirror/mode/django/django.js +350 -0
- data/public/codemirror/mode/django/index.html +73 -0
- data/public/codemirror/mode/dockerfile/dockerfile.js +76 -0
- data/public/codemirror/mode/dockerfile/index.html +73 -0
- data/public/codemirror/mode/dtd/dtd.js +142 -0
- data/public/codemirror/mode/dtd/index.html +89 -0
- data/public/codemirror/mode/dylan/dylan.js +291 -0
- data/public/codemirror/mode/dylan/index.html +407 -0
- data/public/codemirror/mode/ebnf/ebnf.js +195 -0
- data/public/codemirror/mode/ebnf/index.html +102 -0
- data/public/codemirror/mode/ecl/ecl.js +206 -0
- data/public/codemirror/mode/ecl/index.html +52 -0
- data/public/codemirror/mode/eiffel/eiffel.js +160 -0
- data/public/codemirror/mode/eiffel/index.html +429 -0
- data/public/codemirror/mode/elm/elm.js +205 -0
- data/public/codemirror/mode/elm/index.html +61 -0
- data/public/codemirror/mode/erlang/erlang.js +618 -0
- data/public/codemirror/mode/erlang/index.html +76 -0
- data/public/codemirror/mode/factor/factor.js +83 -0
- data/public/codemirror/mode/factor/index.html +77 -0
- data/public/codemirror/mode/forth/forth.js +180 -0
- data/public/codemirror/mode/forth/index.html +75 -0
- data/public/codemirror/mode/fortran/fortran.js +188 -0
- data/public/codemirror/mode/fortran/index.html +81 -0
- data/public/codemirror/mode/gas/gas.js +345 -0
- data/public/codemirror/mode/gas/index.html +68 -0
- data/public/codemirror/mode/gfm/gfm.js +124 -0
- data/public/codemirror/mode/gfm/index.html +93 -0
- data/public/codemirror/mode/gfm/test.js +213 -0
- data/public/codemirror/mode/gherkin/gherkin.js +178 -0
- data/public/codemirror/mode/gherkin/index.html +48 -0
- data/public/codemirror/mode/go/go.js +185 -0
- data/public/codemirror/mode/go/index.html +85 -0
- data/public/codemirror/mode/groovy/groovy.js +230 -0
- data/public/codemirror/mode/groovy/index.html +84 -0
- data/public/codemirror/mode/haml/haml.js +159 -0
- data/public/codemirror/mode/haml/index.html +79 -0
- data/public/codemirror/mode/haml/test.js +97 -0
- data/public/codemirror/mode/handlebars/handlebars.js +53 -0
- data/public/codemirror/mode/handlebars/index.html +83 -0
- data/public/codemirror/mode/haskell/haskell.js +267 -0
- data/public/codemirror/mode/haskell/index.html +73 -0
- data/public/codemirror/mode/haxe/haxe.js +518 -0
- data/public/codemirror/mode/haxe/index.html +124 -0
- data/public/codemirror/mode/htmlembedded/htmlembedded.js +28 -0
- data/public/codemirror/mode/htmlembedded/index.html +59 -0
- data/public/codemirror/mode/htmlmixed/htmlmixed.js +121 -0
- data/public/codemirror/mode/htmlmixed/index.html +89 -0
- data/public/codemirror/mode/http/http.js +113 -0
- data/public/codemirror/mode/http/index.html +45 -0
- data/public/codemirror/mode/idl/idl.js +290 -0
- data/public/codemirror/mode/idl/index.html +64 -0
- data/public/codemirror/mode/index.html +149 -0
- data/public/codemirror/mode/jade/index.html +70 -0
- data/public/codemirror/mode/jade/jade.js +590 -0
- data/public/codemirror/mode/javascript/index.html +114 -0
- data/public/codemirror/mode/javascript/javascript.js +704 -0
- data/public/codemirror/mode/javascript/json-ld.html +72 -0
- data/public/codemirror/mode/javascript/test.js +205 -0
- data/public/codemirror/mode/javascript/typescript.html +61 -0
- data/public/codemirror/mode/jinja2/index.html +54 -0
- data/public/codemirror/mode/jinja2/jinja2.js +142 -0
- data/public/codemirror/mode/julia/index.html +195 -0
- data/public/codemirror/mode/julia/julia.js +299 -0
- data/public/codemirror/mode/kotlin/index.html +89 -0
- data/public/codemirror/mode/kotlin/kotlin.js +284 -0
- data/public/codemirror/mode/livescript/index.html +459 -0
- data/public/codemirror/mode/livescript/livescript.js +280 -0
- data/public/codemirror/mode/lua/index.html +85 -0
- data/public/codemirror/mode/lua/lua.js +159 -0
- data/public/codemirror/mode/markdown/index.html +359 -0
- data/public/codemirror/mode/markdown/markdown.js +781 -0
- data/public/codemirror/mode/markdown/test.js +792 -0
- data/public/codemirror/mode/mathematica/index.html +72 -0
- data/public/codemirror/mode/mathematica/mathematica.js +175 -0
- data/public/codemirror/mode/meta.js +190 -0
- data/public/codemirror/mode/mirc/index.html +160 -0
- data/public/codemirror/mode/mirc/mirc.js +193 -0
- data/public/codemirror/mode/mllike/index.html +179 -0
- data/public/codemirror/mode/mllike/mllike.js +205 -0
- data/public/codemirror/mode/modelica/index.html +67 -0
- data/public/codemirror/mode/modelica/modelica.js +245 -0
- data/public/codemirror/mode/mumps/index.html +85 -0
- data/public/codemirror/mode/mumps/mumps.js +148 -0
- data/public/codemirror/mode/nginx/index.html +181 -0
- data/public/codemirror/mode/nginx/nginx.js +178 -0
- data/public/codemirror/mode/ntriples/index.html +45 -0
- data/public/codemirror/mode/ntriples/ntriples.js +186 -0
- data/public/codemirror/mode/octave/index.html +83 -0
- data/public/codemirror/mode/octave/octave.js +135 -0
- data/public/codemirror/mode/pascal/index.html +61 -0
- data/public/codemirror/mode/pascal/pascal.js +109 -0
- data/public/codemirror/mode/pegjs/index.html +66 -0
- data/public/codemirror/mode/pegjs/pegjs.js +114 -0
- data/public/codemirror/mode/perl/index.html +75 -0
- data/public/codemirror/mode/perl/perl.js +837 -0
- data/public/codemirror/mode/php/index.html +64 -0
- data/public/codemirror/mode/php/php.js +230 -0
- data/public/codemirror/mode/php/test.js +154 -0
- data/public/codemirror/mode/pig/index.html +55 -0
- data/public/codemirror/mode/pig/pig.js +178 -0
- data/public/codemirror/mode/properties/index.html +53 -0
- data/public/codemirror/mode/properties/properties.js +78 -0
- data/public/codemirror/mode/puppet/index.html +121 -0
- data/public/codemirror/mode/puppet/puppet.js +220 -0
- data/public/codemirror/mode/python/index.html +198 -0
- data/public/codemirror/mode/python/python.js +358 -0
- data/public/codemirror/mode/q/index.html +144 -0
- data/public/codemirror/mode/q/q.js +139 -0
- data/public/codemirror/mode/r/index.html +85 -0
- data/public/codemirror/mode/r/r.js +162 -0
- data/public/codemirror/mode/rpm/changes/index.html +66 -0
- data/public/codemirror/mode/rpm/index.html +149 -0
- data/public/codemirror/mode/rpm/rpm.js +101 -0
- data/public/codemirror/mode/rst/index.html +535 -0
- data/public/codemirror/mode/rst/rst.js +557 -0
- data/public/codemirror/mode/ruby/index.html +183 -0
- data/public/codemirror/mode/ruby/ruby.js +285 -0
- data/public/codemirror/mode/ruby/test.js +14 -0
- data/public/codemirror/mode/rust/index.html +60 -0
- data/public/codemirror/mode/rust/rust.js +451 -0
- data/public/codemirror/mode/sass/index.html +66 -0
- data/public/codemirror/mode/sass/sass.js +414 -0
- data/public/codemirror/mode/scheme/index.html +77 -0
- data/public/codemirror/mode/scheme/scheme.js +249 -0
- data/public/codemirror/mode/shell/index.html +66 -0
- data/public/codemirror/mode/shell/shell.js +139 -0
- data/public/codemirror/mode/shell/test.js +58 -0
- data/public/codemirror/mode/sieve/index.html +93 -0
- data/public/codemirror/mode/sieve/sieve.js +193 -0
- data/public/codemirror/mode/slim/index.html +96 -0
- data/public/codemirror/mode/slim/slim.js +575 -0
- data/public/codemirror/mode/slim/test.js +96 -0
- data/public/codemirror/mode/smalltalk/index.html +68 -0
- data/public/codemirror/mode/smalltalk/smalltalk.js +168 -0
- data/public/codemirror/mode/smarty/index.html +138 -0
- data/public/codemirror/mode/smarty/smarty.js +225 -0
- data/public/codemirror/mode/solr/index.html +57 -0
- data/public/codemirror/mode/solr/solr.js +104 -0
- data/public/codemirror/mode/soy/index.html +68 -0
- data/public/codemirror/mode/soy/soy.js +198 -0
- data/public/codemirror/mode/sparql/index.html +61 -0
- data/public/codemirror/mode/sparql/sparql.js +174 -0
- data/public/codemirror/mode/spreadsheet/index.html +42 -0
- data/public/codemirror/mode/spreadsheet/spreadsheet.js +109 -0
- data/public/codemirror/mode/sql/index.html +84 -0
- data/public/codemirror/mode/sql/sql.js +391 -0
- data/public/codemirror/mode/stex/index.html +110 -0
- data/public/codemirror/mode/stex/stex.js +251 -0
- data/public/codemirror/mode/stex/test.js +123 -0
- data/public/codemirror/mode/stylus/index.html +106 -0
- data/public/codemirror/mode/stylus/stylus.js +768 -0
- data/public/codemirror/mode/swift/index.html +88 -0
- data/public/codemirror/mode/swift/swift.js +203 -0
- data/public/codemirror/mode/tcl/index.html +142 -0
- data/public/codemirror/mode/tcl/tcl.js +147 -0
- data/public/codemirror/mode/textile/index.html +191 -0
- data/public/codemirror/mode/textile/test.js +417 -0
- data/public/codemirror/mode/textile/textile.js +469 -0
- data/public/codemirror/mode/tiddlywiki/index.html +154 -0
- data/public/codemirror/mode/tiddlywiki/tiddlywiki.css +14 -0
- data/public/codemirror/mode/tiddlywiki/tiddlywiki.js +358 -0
- data/public/codemirror/mode/tiki/index.html +95 -0
- data/public/codemirror/mode/tiki/tiki.css +26 -0
- data/public/codemirror/mode/tiki/tiki.js +312 -0
- data/public/codemirror/mode/toml/index.html +73 -0
- data/public/codemirror/mode/toml/toml.js +88 -0
- data/public/codemirror/mode/tornado/index.html +63 -0
- data/public/codemirror/mode/tornado/tornado.js +68 -0
- data/public/codemirror/mode/troff/index.html +146 -0
- data/public/codemirror/mode/troff/troff.js +82 -0
- data/public/codemirror/mode/ttcn-cfg/index.html +115 -0
- data/public/codemirror/mode/ttcn-cfg/ttcn-cfg.js +214 -0
- data/public/codemirror/mode/ttcn/index.html +118 -0
- data/public/codemirror/mode/ttcn/ttcn.js +283 -0
- data/public/codemirror/mode/turtle/index.html +50 -0
- data/public/codemirror/mode/turtle/turtle.js +162 -0
- data/public/codemirror/mode/twig/index.html +45 -0
- data/public/codemirror/mode/twig/twig.js +132 -0
- data/public/codemirror/mode/vb/index.html +102 -0
- data/public/codemirror/mode/vb/vb.js +276 -0
- data/public/codemirror/mode/vbscript/index.html +55 -0
- data/public/codemirror/mode/vbscript/vbscript.js +350 -0
- data/public/codemirror/mode/velocity/index.html +118 -0
- data/public/codemirror/mode/velocity/velocity.js +201 -0
- data/public/codemirror/mode/verilog/index.html +120 -0
- data/public/codemirror/mode/verilog/test.js +273 -0
- data/public/codemirror/mode/verilog/verilog.js +537 -0
- data/public/codemirror/mode/vhdl/index.html +95 -0
- data/public/codemirror/mode/vhdl/vhdl.js +189 -0
- data/public/codemirror/mode/xml/index.html +57 -0
- data/public/codemirror/mode/xml/test.js +51 -0
- data/public/codemirror/mode/xml/xml.js +385 -0
- data/public/codemirror/mode/xquery/index.html +210 -0
- data/public/codemirror/mode/xquery/test.js +67 -0
- data/public/codemirror/mode/xquery/xquery.js +437 -0
- data/public/codemirror/mode/yaml/index.html +80 -0
- data/public/codemirror/mode/yaml/yaml.js +117 -0
- data/public/codemirror/mode/z80/index.html +53 -0
- data/public/codemirror/mode/z80/z80.js +116 -0
- data/public/codemirror/package.json +20 -0
- data/public/codemirror/test/comment_test.js +100 -0
- data/public/codemirror/test/doc_test.js +371 -0
- data/public/codemirror/test/driver.js +138 -0
- data/public/codemirror/test/emacs_test.js +147 -0
- data/public/codemirror/test/index.html +241 -0
- data/public/codemirror/test/lint.js +11 -0
- data/public/codemirror/test/mode_test.css +23 -0
- data/public/codemirror/test/mode_test.js +192 -0
- data/public/codemirror/test/multi_test.js +285 -0
- data/public/codemirror/test/phantom_driver.js +31 -0
- data/public/codemirror/test/run.js +31 -0
- data/public/codemirror/test/scroll_test.js +115 -0
- data/public/codemirror/test/search_test.js +62 -0
- data/public/codemirror/test/sql-hint-test.js +189 -0
- data/public/codemirror/test/sublime_test.js +303 -0
- data/public/codemirror/test/test.js +2142 -0
- data/public/codemirror/test/vim_test.js +3955 -0
- data/public/codemirror/theme/3024-day.css +41 -0
- data/public/codemirror/theme/3024-night.css +39 -0
- data/public/codemirror/theme/ambiance-mobile.css +5 -0
- data/public/codemirror/theme/ambiance.css +76 -0
- data/public/codemirror/theme/base16-dark.css +38 -0
- data/public/codemirror/theme/base16-light.css +38 -0
- data/public/codemirror/theme/blackboard.css +32 -0
- data/public/codemirror/theme/cobalt.css +25 -0
- data/public/codemirror/theme/colorforth.css +33 -0
- data/public/codemirror/theme/dracula.css +87 -0
- data/public/codemirror/theme/eclipse.css +23 -0
- data/public/codemirror/theme/elegant.css +13 -0
- data/public/codemirror/theme/erlang-dark.css +34 -0
- data/public/codemirror/theme/icecoder.css +42 -0
- data/public/codemirror/theme/lesser-dark.css +47 -0
- data/public/codemirror/theme/lines.css +109 -0
- data/public/codemirror/theme/liquibyte.css +95 -0
- data/public/codemirror/theme/material.css +105 -0
- data/public/codemirror/theme/mbo.css +37 -0
- data/public/codemirror/theme/mdn-like.css +46 -0
- data/public/codemirror/theme/midnight.css +47 -0
- data/public/codemirror/theme/monokai.css +35 -0
- data/public/codemirror/theme/neat.css +12 -0
- data/public/codemirror/theme/neo.css +43 -0
- data/public/codemirror/theme/night.css +28 -0
- data/public/codemirror/theme/paraiso-dark.css +38 -0
- data/public/codemirror/theme/paraiso-light.css +38 -0
- data/public/codemirror/theme/pastel-on-dark.css +53 -0
- data/public/codemirror/theme/rubyblue.css +25 -0
- data/public/codemirror/theme/seti.css +88 -0
- data/public/codemirror/theme/solarized.css +165 -0
- data/public/codemirror/theme/the-matrix.css +30 -0
- data/public/codemirror/theme/tomorrow-night-bright.css +35 -0
- data/public/codemirror/theme/tomorrow-night-eighties.css +38 -0
- data/public/codemirror/theme/ttcn.css +65 -0
- data/public/codemirror/theme/twilight.css +32 -0
- data/public/codemirror/theme/vibrant-ink.css +34 -0
- data/public/codemirror/theme/xq-dark.css +53 -0
- data/public/codemirror/theme/xq-light.css +43 -0
- data/public/codemirror/theme/yeti.css +86 -0
- data/public/codemirror/theme/zenburn.css +37 -0
- data/public/fira-mono/FiraMono-Bold.eot +0 -0
- data/public/fira-mono/FiraMono-Bold.otf +0 -0
- data/public/fira-mono/FiraMono-Bold.ttf +0 -0
- data/public/fira-mono/FiraMono-Bold.woff +0 -0
- data/public/fira-mono/FiraMono-Medium.eot +0 -0
- data/public/fira-mono/FiraMono-Medium.otf +0 -0
- data/public/fira-mono/FiraMono-Medium.ttf +0 -0
- data/public/fira-mono/FiraMono-Medium.woff +0 -0
- data/public/fira-mono/FiraMono-Regular.eot +0 -0
- data/public/fira-mono/FiraMono-Regular.otf +0 -0
- data/public/fira-mono/FiraMono-Regular.ttf +0 -0
- data/public/fira-mono/FiraMono-Regular.woff +0 -0
- data/public/fira-mono/fira-mono.css +32 -0
- data/public/heroes/lines_default_01.png +0 -0
- data/public/heroes/lines_default_02.png +0 -0
- data/public/heroes/lines_default_03.png +0 -0
- data/public/iconfont/iconfont.css +48 -0
- data/public/iconfont/iconfont.eot +0 -0
- data/public/iconfont/iconfont.svg +18 -0
- data/public/iconfont/iconfont.ttf +0 -0
- data/public/iconfont/iconfont.woff +0 -0
- data/spec/controllers/lines/admin/articles_controller-spec.rb +7 -0
- data/spec/dummy/README.rdoc +28 -0
- data/spec/dummy/Rakefile +6 -0
- data/spec/dummy/app/assets/config/manifest.js +5 -0
- data/spec/dummy/app/assets/images/.keep +0 -0
- data/spec/dummy/app/assets/javascripts/application.js +13 -0
- data/spec/dummy/app/assets/stylesheets/application.css +13 -0
- data/spec/dummy/app/controllers/application_controller.rb +5 -0
- data/spec/dummy/app/controllers/concerns/.keep +0 -0
- data/spec/dummy/app/helpers/application_helper.rb +2 -0
- data/spec/dummy/app/mailers/.keep +0 -0
- data/spec/dummy/app/models/.keep +0 -0
- data/spec/dummy/app/models/concerns/.keep +0 -0
- data/spec/dummy/app/views/layouts/application.html.erb +14 -0
- data/spec/dummy/bin/bundle +3 -0
- data/spec/dummy/bin/rails +4 -0
- data/spec/dummy/bin/rake +4 -0
- data/spec/dummy/config.ru +4 -0
- data/spec/dummy/config/application.rb +29 -0
- data/spec/dummy/config/boot.rb +5 -0
- data/spec/dummy/config/database.yml +26 -0
- data/spec/dummy/config/environment.rb +5 -0
- data/spec/dummy/config/environments/development.rb +42 -0
- data/spec/dummy/config/environments/production.rb +83 -0
- data/spec/dummy/config/environments/test.rb +44 -0
- data/spec/dummy/config/initializers/backtrace_silencers.rb +7 -0
- data/spec/dummy/config/initializers/cookies_serializer.rb +3 -0
- data/spec/dummy/config/initializers/filter_parameter_logging.rb +4 -0
- data/spec/dummy/config/initializers/inflections.rb +16 -0
- data/spec/dummy/config/initializers/mime_types.rb +4 -0
- data/spec/dummy/config/initializers/session_store.rb +3 -0
- data/spec/dummy/config/initializers/wrap_parameters.rb +14 -0
- data/spec/dummy/config/locales/en.yml +23 -0
- data/spec/dummy/config/routes.rb +3 -0
- data/spec/dummy/config/secrets.yml +22 -0
- data/spec/dummy/db/schema.rb +103 -0
- data/spec/dummy/db/seeds.rb +9 -0
- data/spec/dummy/lib/assets/.keep +0 -0
- data/spec/dummy/public/404.html +67 -0
- data/spec/dummy/public/422.html +67 -0
- data/spec/dummy/public/500.html +66 -0
- data/spec/dummy/public/favicon.ico +0 -0
- data/spec/dummy/test/mailers/previews/user_mailer_preview.rb +11 -0
- data/spec/dummy/vendor/screenshots/octorel.png +0 -0
- data/spec/factories/articles.rb +22 -0
- data/spec/factories/authors.rb +9 -0
- data/spec/factories/pictures.rb +8 -0
- data/spec/factories/users.rb +10 -0
- data/spec/features/article_spec.rb +65 -0
- data/spec/features/password_reset_spec.rb +48 -0
- data/spec/features/user_logs_in_spec.rb +28 -0
- data/spec/mailers/lines/user_mailer_spec.rb +24 -0
- data/spec/models/article_spec.rb +38 -0
- data/spec/models/lines/author_spec.rb +29 -0
- data/spec/models/lines/picture_spec.rb +25 -0
- data/spec/models/lines/user_spec.rb +18 -0
- data/spec/spec_helper.rb +57 -0
- data/spec/support/auth_macros.rb +21 -0
- data/spec/support/images/example.jpg +0 -0
- metadata +1241 -0
Binary file
|
@@ -0,0 +1,199 @@
|
|
1
|
+
<!doctype html>
|
2
|
+
|
3
|
+
<title>CodeMirror</title>
|
4
|
+
<meta charset="utf-8"/>
|
5
|
+
|
6
|
+
<link rel=stylesheet href="lib/codemirror.css">
|
7
|
+
<link rel=stylesheet href="doc/docs.css">
|
8
|
+
<script src="lib/codemirror.js"></script>
|
9
|
+
<script src="mode/xml/xml.js"></script>
|
10
|
+
<script src="mode/javascript/javascript.js"></script>
|
11
|
+
<script src="mode/css/css.js"></script>
|
12
|
+
<script src="mode/htmlmixed/htmlmixed.js"></script>
|
13
|
+
<script src="addon/edit/matchbrackets.js"></script>
|
14
|
+
|
15
|
+
<script src="doc/activebookmark.js"></script>
|
16
|
+
|
17
|
+
<style>
|
18
|
+
.CodeMirror { height: auto; border: 1px solid #ddd; }
|
19
|
+
.CodeMirror-scroll { max-height: 200px; }
|
20
|
+
.CodeMirror pre { padding-left: 7px; line-height: 1.25; }
|
21
|
+
</style>
|
22
|
+
|
23
|
+
<div id=nav>
|
24
|
+
<a href="http://codemirror.net"><h1>CodeMirror</h1><img id=logo src="doc/logo.png"></a>
|
25
|
+
|
26
|
+
<ul>
|
27
|
+
<li><a class=active data-default="true" href="#description">Home</a>
|
28
|
+
<li><a href="doc/manual.html">Manual</a>
|
29
|
+
<li><a href="https://github.com/codemirror/codemirror">Code</a>
|
30
|
+
</ul>
|
31
|
+
<ul>
|
32
|
+
<li><a href="#features">Features</a>
|
33
|
+
<li><a href="#community">Community</a>
|
34
|
+
<li><a href="#browsersupport">Browser support</a>
|
35
|
+
</ul>
|
36
|
+
</div>
|
37
|
+
|
38
|
+
<article>
|
39
|
+
|
40
|
+
<section id=description class=first>
|
41
|
+
<p><strong>CodeMirror</strong> is a versatile text editor
|
42
|
+
implemented in JavaScript for the browser. It is specialized for
|
43
|
+
editing code, and comes with a number of <a href="mode/index.html">language modes</a> and <a href="doc/manual.html#addons">addons</a>
|
44
|
+
that implement more advanced editing functionality.</p>
|
45
|
+
|
46
|
+
<p>A rich <a href="doc/manual.html#api">programming API</a> and a
|
47
|
+
CSS <a href="doc/manual.html#styling">theming</a> system are
|
48
|
+
available for customizing CodeMirror to fit your application, and
|
49
|
+
extending it with new functionality.</p>
|
50
|
+
</section>
|
51
|
+
|
52
|
+
<section id=demo>
|
53
|
+
<h2>This is CodeMirror</h2>
|
54
|
+
<form style="position: relative; margin-top: .5em;"><textarea id=demotext>
|
55
|
+
<!-- Create a simple CodeMirror instance -->
|
56
|
+
<link rel="stylesheet" href="lib/codemirror.css">
|
57
|
+
<script src="lib/codemirror.js"></script>
|
58
|
+
<script>
|
59
|
+
var editor = CodeMirror.fromTextArea(myTextarea, {
|
60
|
+
lineNumbers: true
|
61
|
+
});
|
62
|
+
</script></textarea>
|
63
|
+
<select id="demolist" onchange="document.location = this.options[this.selectedIndex].value;">
|
64
|
+
<option value="#">Other demos...</option>
|
65
|
+
<option value="demo/complete.html">Autocompletion</option>
|
66
|
+
<option value="demo/folding.html">Code folding</option>
|
67
|
+
<option value="demo/theme.html">Themes</option>
|
68
|
+
<option value="mode/htmlmixed/index.html">Mixed language modes</option>
|
69
|
+
<option value="demo/bidi.html">Bi-directional text</option>
|
70
|
+
<option value="demo/variableheight.html">Variable font sizes</option>
|
71
|
+
<option value="demo/search.html">Search interface</option>
|
72
|
+
<option value="demo/vim.html">Vim bindings</option>
|
73
|
+
<option value="demo/emacs.html">Emacs bindings</option>
|
74
|
+
<option value="demo/sublime.html">Sublime Text bindings</option>
|
75
|
+
<option value="demo/tern.html">Tern integration</option>
|
76
|
+
<option value="demo/merge.html">Merge/diff interface</option>
|
77
|
+
<option value="demo/fullscreen.html">Full-screen editor</option>
|
78
|
+
<option value="demo/simplescrollbars.html">Custom scrollbars</option>
|
79
|
+
</select></form>
|
80
|
+
<script>
|
81
|
+
var editor = CodeMirror.fromTextArea(document.getElementById("demotext"), {
|
82
|
+
lineNumbers: true,
|
83
|
+
mode: "text/html",
|
84
|
+
matchBrackets: true
|
85
|
+
});
|
86
|
+
</script>
|
87
|
+
|
88
|
+
<div class=actions>
|
89
|
+
<div class=actionspicture>
|
90
|
+
<img src="doc/yinyang.png" class=yinyang>
|
91
|
+
<div class="actionlink download">
|
92
|
+
<a href="http://codemirror.net/codemirror.zip">DOWNLOAD</a>
|
93
|
+
</div>
|
94
|
+
<div class="actionlink fund">
|
95
|
+
<a href="https://marijnhaverbeke.nl/fund/">FUND</a>
|
96
|
+
</div>
|
97
|
+
</div>
|
98
|
+
<div class=actionsleft>
|
99
|
+
Get the current version: <a href="http://codemirror.net/codemirror.zip">5.5</a>.<br>
|
100
|
+
You can see the <a href="https://github.com/codemirror/codemirror" title="Github repository">code</a> or<br>
|
101
|
+
read the <a href="doc/releases.html">release notes</a>.<br>
|
102
|
+
There is a <a href="doc/compress.html">minification helper</a>.
|
103
|
+
</div>
|
104
|
+
<div class=actionsright>
|
105
|
+
Software needs maintenance,<br>
|
106
|
+
maintainers need to subsist.<br>
|
107
|
+
Current funding status = <img src="https://marijnhaverbeke.nl/fund/status_s.png" title="Current maintainer happiness" style="vertical-align: middle; height: 16px; width: 16px"><br>
|
108
|
+
You can help <a href="https://marijnhaverbeke.nl/fund/" title="Set up a monthly contribution">per month</a> or
|
109
|
+
<a title="Donate with Paypal" href="javascript:document.getElementById('paypal').submit();">once</a>.
|
110
|
+
<form action="https://www.paypal.com/cgi-bin/webscr" method="post" id="paypal">
|
111
|
+
<input type="hidden" name="cmd" value="_s-xclick"/>
|
112
|
+
<input type="hidden" name="hosted_button_id" value="3FVHS5FGUY7CC"/>
|
113
|
+
</form>
|
114
|
+
</div>
|
115
|
+
</div>
|
116
|
+
|
117
|
+
</section>
|
118
|
+
|
119
|
+
<section id=features>
|
120
|
+
<h2>Features</h2>
|
121
|
+
<ul>
|
122
|
+
<li>Support for <a href="mode/index.html">over 100 languages</a> out of the box
|
123
|
+
<li>A powerful, <a href="mode/htmlmixed/index.html">composable</a> language mode <a href="doc/manual.html#modeapi">system</a>
|
124
|
+
<li><a href="doc/manual.html#addon_show-hint">Autocompletion</a> (<a href="demo/xmlcomplete.html">XML</a>)
|
125
|
+
<li><a href="doc/manual.html#addon_foldcode">Code folding</a>
|
126
|
+
<li><a href="doc/manual.html#option_extraKeys">Configurable</a> keybindings
|
127
|
+
<li><a href="demo/vim.html">Vim</a>, <a href="demo/emacs.html">Emacs</a>, and <a href="demo/sublime.html">Sublime Text</a> bindings
|
128
|
+
<li><a href="doc/manual.html#addon_search">Search and replace</a> interface
|
129
|
+
<li><a href="doc/manual.html#addon_matchbrackets">Bracket</a> and <a href="doc/manual.html#addon_matchtags">tag</a> matching
|
130
|
+
<li>Support for <a href="demo/buffers.html">split views</a>
|
131
|
+
<li><a href="doc/manual.html#addon_lint">Linter integration</a>
|
132
|
+
<li><a href="demo/variableheight.html">Mixing font sizes and styles</a>
|
133
|
+
<li><a href="demo/theme.html">Various themes</a>
|
134
|
+
<li>Able to <a href="demo/resize.html">resize to fit content</a>
|
135
|
+
<li><a href="doc/manual.html#mark_replacedWith">Inline</a> and <a href="doc/manual.html#addLineWidget">block</a> widgets
|
136
|
+
<li>Programmable <a href="demo/marker.html">gutters</a>
|
137
|
+
<li>Making ranges of text <a href="doc/manual.html#markText">styled, read-only, or atomic</a>
|
138
|
+
<li><a href="demo/bidi.html">Bi-directional text</a> support
|
139
|
+
<li>Many other <a href="doc/manual.html#api">methods</a> and <a href="doc/manual.html#addons">addons</a>...
|
140
|
+
</ul>
|
141
|
+
</section>
|
142
|
+
|
143
|
+
<section id=community>
|
144
|
+
<h2>Community</h2>
|
145
|
+
|
146
|
+
<p>CodeMirror is an open-source project shared under
|
147
|
+
an <a href="LICENSE">MIT license</a>. It is the editor used in the
|
148
|
+
dev tools for
|
149
|
+
both <a href="https://hacks.mozilla.org/2013/11/firefox-developer-tools-episode-27-edit-as-html-codemirror-more/">Firefox</a>
|
150
|
+
and <a href="https://developers.google.com/chrome-developer-tools/">Chrome</a>, <a href="http://www.lighttable.com/">Light
|
151
|
+
Table</a>, <a href="http://brackets.io/">Adobe
|
152
|
+
Brackets</a>, <a href="http://blog.bitbucket.org/2013/05/14/edit-your-code-in-the-cloud-with-bitbucket/">Bitbucket</a>,
|
153
|
+
and <a href="doc/realworld.html">many other projects</a>.</p>
|
154
|
+
|
155
|
+
<p>Development and bug tracking happens
|
156
|
+
on <a href="https://github.com/codemirror/CodeMirror/">github</a>
|
157
|
+
(<a href="http://marijnhaverbeke.nl/git/codemirror">alternate git
|
158
|
+
repository</a>).
|
159
|
+
Please <a href="http://codemirror.net/doc/reporting.html">read these
|
160
|
+
pointers</a> before submitting a bug. Use pull requests to submit
|
161
|
+
patches. All contributions must be released under the same MIT
|
162
|
+
license that CodeMirror uses.</p>
|
163
|
+
|
164
|
+
<p>Discussion around the project is done on
|
165
|
+
a <a href="http://discuss.codemirror.net">discussion forum</a>.
|
166
|
+
There is also
|
167
|
+
the <a href="http://groups.google.com/group/codemirror-announce">codemirror-announce</a>
|
168
|
+
list, which is only used for major announcements (such as new
|
169
|
+
versions). If needed, you can
|
170
|
+
contact <a href="mailto:marijnh@gmail.com">the maintainer</a>
|
171
|
+
directly. We aim to be an inclusive, welcoming community. To make
|
172
|
+
that explicit, we have
|
173
|
+
a <a href="http://contributor-covenant.org/version/1/1/0/">code of
|
174
|
+
conduct</a> that applies to communication around the project.</p>
|
175
|
+
|
176
|
+
<p>A list of CodeMirror-related software that is not part of the
|
177
|
+
main distribution is maintained
|
178
|
+
on <a href="https://github.com/codemirror/CodeMirror/wiki/CodeMirror-addons">our
|
179
|
+
wiki</a>. Feel free to add your project.</p>
|
180
|
+
</section>
|
181
|
+
|
182
|
+
<section id=browsersupport>
|
183
|
+
<h2>Browser support</h2>
|
184
|
+
<p>The <em>desktop</em> versions of the following browsers,
|
185
|
+
in <em>standards mode</em> (HTML5 <code><!doctype html></code>
|
186
|
+
recommended) are supported:</p>
|
187
|
+
<table style="margin-bottom: 1em">
|
188
|
+
<tr><th>Firefox</th><td>version 4 and up</td></tr>
|
189
|
+
<tr><th>Chrome</th><td>any version</td></tr>
|
190
|
+
<tr><th>Safari</th><td>version 5.2 and up</td></tr>
|
191
|
+
<tr><th style="padding-right: 1em;">Internet Explorer</th><td>version 8 and up</td></tr>
|
192
|
+
<tr><th>Opera</th><td>version 9 and up</td></tr>
|
193
|
+
</table>
|
194
|
+
<p>Support for modern mobile browsers is experimental. Recent
|
195
|
+
versions of the iOS browser and Chrome on Android should work
|
196
|
+
pretty well.</p>
|
197
|
+
</section>
|
198
|
+
|
199
|
+
</article>
|
@@ -0,0 +1,412 @@
|
|
1
|
+
// CodeMirror, copyright (c) by Marijn Haverbeke and others
|
2
|
+
// Distributed under an MIT license: http://codemirror.net/LICENSE
|
3
|
+
|
4
|
+
(function(mod) {
|
5
|
+
if (typeof exports == "object" && typeof module == "object") // CommonJS
|
6
|
+
mod(require("../lib/codemirror"));
|
7
|
+
else if (typeof define == "function" && define.amd) // AMD
|
8
|
+
define(["../lib/codemirror"], mod);
|
9
|
+
else // Plain browser env
|
10
|
+
mod(CodeMirror);
|
11
|
+
})(function(CodeMirror) {
|
12
|
+
"use strict";
|
13
|
+
|
14
|
+
var Pos = CodeMirror.Pos;
|
15
|
+
function posEq(a, b) { return a.line == b.line && a.ch == b.ch; }
|
16
|
+
|
17
|
+
// Kill 'ring'
|
18
|
+
|
19
|
+
var killRing = [];
|
20
|
+
function addToRing(str) {
|
21
|
+
killRing.push(str);
|
22
|
+
if (killRing.length > 50) killRing.shift();
|
23
|
+
}
|
24
|
+
function growRingTop(str) {
|
25
|
+
if (!killRing.length) return addToRing(str);
|
26
|
+
killRing[killRing.length - 1] += str;
|
27
|
+
}
|
28
|
+
function getFromRing(n) { return killRing[killRing.length - (n ? Math.min(n, 1) : 1)] || ""; }
|
29
|
+
function popFromRing() { if (killRing.length > 1) killRing.pop(); return getFromRing(); }
|
30
|
+
|
31
|
+
var lastKill = null;
|
32
|
+
|
33
|
+
function kill(cm, from, to, mayGrow, text) {
|
34
|
+
if (text == null) text = cm.getRange(from, to);
|
35
|
+
|
36
|
+
if (mayGrow && lastKill && lastKill.cm == cm && posEq(from, lastKill.pos) && cm.isClean(lastKill.gen))
|
37
|
+
growRingTop(text);
|
38
|
+
else
|
39
|
+
addToRing(text);
|
40
|
+
cm.replaceRange("", from, to, "+delete");
|
41
|
+
|
42
|
+
if (mayGrow) lastKill = {cm: cm, pos: from, gen: cm.changeGeneration()};
|
43
|
+
else lastKill = null;
|
44
|
+
}
|
45
|
+
|
46
|
+
// Boundaries of various units
|
47
|
+
|
48
|
+
function byChar(cm, pos, dir) {
|
49
|
+
return cm.findPosH(pos, dir, "char", true);
|
50
|
+
}
|
51
|
+
|
52
|
+
function byWord(cm, pos, dir) {
|
53
|
+
return cm.findPosH(pos, dir, "word", true);
|
54
|
+
}
|
55
|
+
|
56
|
+
function byLine(cm, pos, dir) {
|
57
|
+
return cm.findPosV(pos, dir, "line", cm.doc.sel.goalColumn);
|
58
|
+
}
|
59
|
+
|
60
|
+
function byPage(cm, pos, dir) {
|
61
|
+
return cm.findPosV(pos, dir, "page", cm.doc.sel.goalColumn);
|
62
|
+
}
|
63
|
+
|
64
|
+
function byParagraph(cm, pos, dir) {
|
65
|
+
var no = pos.line, line = cm.getLine(no);
|
66
|
+
var sawText = /\S/.test(dir < 0 ? line.slice(0, pos.ch) : line.slice(pos.ch));
|
67
|
+
var fst = cm.firstLine(), lst = cm.lastLine();
|
68
|
+
for (;;) {
|
69
|
+
no += dir;
|
70
|
+
if (no < fst || no > lst)
|
71
|
+
return cm.clipPos(Pos(no - dir, dir < 0 ? 0 : null));
|
72
|
+
line = cm.getLine(no);
|
73
|
+
var hasText = /\S/.test(line);
|
74
|
+
if (hasText) sawText = true;
|
75
|
+
else if (sawText) return Pos(no, 0);
|
76
|
+
}
|
77
|
+
}
|
78
|
+
|
79
|
+
function bySentence(cm, pos, dir) {
|
80
|
+
var line = pos.line, ch = pos.ch;
|
81
|
+
var text = cm.getLine(pos.line), sawWord = false;
|
82
|
+
for (;;) {
|
83
|
+
var next = text.charAt(ch + (dir < 0 ? -1 : 0));
|
84
|
+
if (!next) { // End/beginning of line reached
|
85
|
+
if (line == (dir < 0 ? cm.firstLine() : cm.lastLine())) return Pos(line, ch);
|
86
|
+
text = cm.getLine(line + dir);
|
87
|
+
if (!/\S/.test(text)) return Pos(line, ch);
|
88
|
+
line += dir;
|
89
|
+
ch = dir < 0 ? text.length : 0;
|
90
|
+
continue;
|
91
|
+
}
|
92
|
+
if (sawWord && /[!?.]/.test(next)) return Pos(line, ch + (dir > 0 ? 1 : 0));
|
93
|
+
if (!sawWord) sawWord = /\w/.test(next);
|
94
|
+
ch += dir;
|
95
|
+
}
|
96
|
+
}
|
97
|
+
|
98
|
+
function byExpr(cm, pos, dir) {
|
99
|
+
var wrap;
|
100
|
+
if (cm.findMatchingBracket && (wrap = cm.findMatchingBracket(pos, true))
|
101
|
+
&& wrap.match && (wrap.forward ? 1 : -1) == dir)
|
102
|
+
return dir > 0 ? Pos(wrap.to.line, wrap.to.ch + 1) : wrap.to;
|
103
|
+
|
104
|
+
for (var first = true;; first = false) {
|
105
|
+
var token = cm.getTokenAt(pos);
|
106
|
+
var after = Pos(pos.line, dir < 0 ? token.start : token.end);
|
107
|
+
if (first && dir > 0 && token.end == pos.ch || !/\w/.test(token.string)) {
|
108
|
+
var newPos = cm.findPosH(after, dir, "char");
|
109
|
+
if (posEq(after, newPos)) return pos;
|
110
|
+
else pos = newPos;
|
111
|
+
} else {
|
112
|
+
return after;
|
113
|
+
}
|
114
|
+
}
|
115
|
+
}
|
116
|
+
|
117
|
+
// Prefixes (only crudely supported)
|
118
|
+
|
119
|
+
function getPrefix(cm, precise) {
|
120
|
+
var digits = cm.state.emacsPrefix;
|
121
|
+
if (!digits) return precise ? null : 1;
|
122
|
+
clearPrefix(cm);
|
123
|
+
return digits == "-" ? -1 : Number(digits);
|
124
|
+
}
|
125
|
+
|
126
|
+
function repeated(cmd) {
|
127
|
+
var f = typeof cmd == "string" ? function(cm) { cm.execCommand(cmd); } : cmd;
|
128
|
+
return function(cm) {
|
129
|
+
var prefix = getPrefix(cm);
|
130
|
+
f(cm);
|
131
|
+
for (var i = 1; i < prefix; ++i) f(cm);
|
132
|
+
};
|
133
|
+
}
|
134
|
+
|
135
|
+
function findEnd(cm, pos, by, dir) {
|
136
|
+
var prefix = getPrefix(cm);
|
137
|
+
if (prefix < 0) { dir = -dir; prefix = -prefix; }
|
138
|
+
for (var i = 0; i < prefix; ++i) {
|
139
|
+
var newPos = by(cm, pos, dir);
|
140
|
+
if (posEq(newPos, pos)) break;
|
141
|
+
pos = newPos;
|
142
|
+
}
|
143
|
+
return pos;
|
144
|
+
}
|
145
|
+
|
146
|
+
function move(by, dir) {
|
147
|
+
var f = function(cm) {
|
148
|
+
cm.extendSelection(findEnd(cm, cm.getCursor(), by, dir));
|
149
|
+
};
|
150
|
+
f.motion = true;
|
151
|
+
return f;
|
152
|
+
}
|
153
|
+
|
154
|
+
function killTo(cm, by, dir) {
|
155
|
+
var selections = cm.listSelections(), cursor;
|
156
|
+
var i = selections.length;
|
157
|
+
while (i--) {
|
158
|
+
cursor = selections[i].head;
|
159
|
+
kill(cm, cursor, findEnd(cm, cursor, by, dir), true);
|
160
|
+
}
|
161
|
+
}
|
162
|
+
|
163
|
+
function killRegion(cm) {
|
164
|
+
if (cm.somethingSelected()) {
|
165
|
+
var selections = cm.listSelections(), selection;
|
166
|
+
var i = selections.length;
|
167
|
+
while (i--) {
|
168
|
+
selection = selections[i];
|
169
|
+
kill(cm, selection.anchor, selection.head);
|
170
|
+
}
|
171
|
+
return true;
|
172
|
+
}
|
173
|
+
}
|
174
|
+
|
175
|
+
function addPrefix(cm, digit) {
|
176
|
+
if (cm.state.emacsPrefix) {
|
177
|
+
if (digit != "-") cm.state.emacsPrefix += digit;
|
178
|
+
return;
|
179
|
+
}
|
180
|
+
// Not active yet
|
181
|
+
cm.state.emacsPrefix = digit;
|
182
|
+
cm.on("keyHandled", maybeClearPrefix);
|
183
|
+
cm.on("inputRead", maybeDuplicateInput);
|
184
|
+
}
|
185
|
+
|
186
|
+
var prefixPreservingKeys = {"Alt-G": true, "Ctrl-X": true, "Ctrl-Q": true, "Ctrl-U": true};
|
187
|
+
|
188
|
+
function maybeClearPrefix(cm, arg) {
|
189
|
+
if (!cm.state.emacsPrefixMap && !prefixPreservingKeys.hasOwnProperty(arg))
|
190
|
+
clearPrefix(cm);
|
191
|
+
}
|
192
|
+
|
193
|
+
function clearPrefix(cm) {
|
194
|
+
cm.state.emacsPrefix = null;
|
195
|
+
cm.off("keyHandled", maybeClearPrefix);
|
196
|
+
cm.off("inputRead", maybeDuplicateInput);
|
197
|
+
}
|
198
|
+
|
199
|
+
function maybeDuplicateInput(cm, event) {
|
200
|
+
var dup = getPrefix(cm);
|
201
|
+
if (dup > 1 && event.origin == "+input") {
|
202
|
+
var one = event.text.join("\n"), txt = "";
|
203
|
+
for (var i = 1; i < dup; ++i) txt += one;
|
204
|
+
cm.replaceSelection(txt);
|
205
|
+
}
|
206
|
+
}
|
207
|
+
|
208
|
+
function addPrefixMap(cm) {
|
209
|
+
cm.state.emacsPrefixMap = true;
|
210
|
+
cm.addKeyMap(prefixMap);
|
211
|
+
cm.on("keyHandled", maybeRemovePrefixMap);
|
212
|
+
cm.on("inputRead", maybeRemovePrefixMap);
|
213
|
+
}
|
214
|
+
|
215
|
+
function maybeRemovePrefixMap(cm, arg) {
|
216
|
+
if (typeof arg == "string" && (/^\d$/.test(arg) || arg == "Ctrl-U")) return;
|
217
|
+
cm.removeKeyMap(prefixMap);
|
218
|
+
cm.state.emacsPrefixMap = false;
|
219
|
+
cm.off("keyHandled", maybeRemovePrefixMap);
|
220
|
+
cm.off("inputRead", maybeRemovePrefixMap);
|
221
|
+
}
|
222
|
+
|
223
|
+
// Utilities
|
224
|
+
|
225
|
+
function setMark(cm) {
|
226
|
+
cm.setCursor(cm.getCursor());
|
227
|
+
cm.setExtending(!cm.getExtending());
|
228
|
+
cm.on("change", function() { cm.setExtending(false); });
|
229
|
+
}
|
230
|
+
|
231
|
+
function clearMark(cm) {
|
232
|
+
cm.setExtending(false);
|
233
|
+
cm.setCursor(cm.getCursor());
|
234
|
+
}
|
235
|
+
|
236
|
+
function getInput(cm, msg, f) {
|
237
|
+
if (cm.openDialog)
|
238
|
+
cm.openDialog(msg + ": <input type=\"text\" style=\"width: 10em\"/>", f, {bottom: true});
|
239
|
+
else
|
240
|
+
f(prompt(msg, ""));
|
241
|
+
}
|
242
|
+
|
243
|
+
function operateOnWord(cm, op) {
|
244
|
+
var start = cm.getCursor(), end = cm.findPosH(start, 1, "word");
|
245
|
+
cm.replaceRange(op(cm.getRange(start, end)), start, end);
|
246
|
+
cm.setCursor(end);
|
247
|
+
}
|
248
|
+
|
249
|
+
function toEnclosingExpr(cm) {
|
250
|
+
var pos = cm.getCursor(), line = pos.line, ch = pos.ch;
|
251
|
+
var stack = [];
|
252
|
+
while (line >= cm.firstLine()) {
|
253
|
+
var text = cm.getLine(line);
|
254
|
+
for (var i = ch == null ? text.length : ch; i > 0;) {
|
255
|
+
var ch = text.charAt(--i);
|
256
|
+
if (ch == ")")
|
257
|
+
stack.push("(");
|
258
|
+
else if (ch == "]")
|
259
|
+
stack.push("[");
|
260
|
+
else if (ch == "}")
|
261
|
+
stack.push("{");
|
262
|
+
else if (/[\(\{\[]/.test(ch) && (!stack.length || stack.pop() != ch))
|
263
|
+
return cm.extendSelection(Pos(line, i));
|
264
|
+
}
|
265
|
+
--line; ch = null;
|
266
|
+
}
|
267
|
+
}
|
268
|
+
|
269
|
+
function quit(cm) {
|
270
|
+
cm.execCommand("clearSearch");
|
271
|
+
clearMark(cm);
|
272
|
+
}
|
273
|
+
|
274
|
+
// Actual keymap
|
275
|
+
|
276
|
+
var keyMap = CodeMirror.keyMap.emacs = CodeMirror.normalizeKeyMap({
|
277
|
+
"Ctrl-W": function(cm) {kill(cm, cm.getCursor("start"), cm.getCursor("end"));},
|
278
|
+
"Ctrl-K": repeated(function(cm) {
|
279
|
+
var start = cm.getCursor(), end = cm.clipPos(Pos(start.line));
|
280
|
+
var text = cm.getRange(start, end);
|
281
|
+
if (!/\S/.test(text)) {
|
282
|
+
text += "\n";
|
283
|
+
end = Pos(start.line + 1, 0);
|
284
|
+
}
|
285
|
+
kill(cm, start, end, true, text);
|
286
|
+
}),
|
287
|
+
"Alt-W": function(cm) {
|
288
|
+
addToRing(cm.getSelection());
|
289
|
+
clearMark(cm);
|
290
|
+
},
|
291
|
+
"Ctrl-Y": function(cm) {
|
292
|
+
var start = cm.getCursor();
|
293
|
+
cm.replaceRange(getFromRing(getPrefix(cm)), start, start, "paste");
|
294
|
+
cm.setSelection(start, cm.getCursor());
|
295
|
+
},
|
296
|
+
"Alt-Y": function(cm) {cm.replaceSelection(popFromRing(), "around", "paste");},
|
297
|
+
|
298
|
+
"Ctrl-Space": setMark, "Ctrl-Shift-2": setMark,
|
299
|
+
|
300
|
+
"Ctrl-F": move(byChar, 1), "Ctrl-B": move(byChar, -1),
|
301
|
+
"Right": move(byChar, 1), "Left": move(byChar, -1),
|
302
|
+
"Ctrl-D": function(cm) { killTo(cm, byChar, 1); },
|
303
|
+
"Delete": function(cm) { killRegion(cm) || killTo(cm, byChar, 1); },
|
304
|
+
"Ctrl-H": function(cm) { killTo(cm, byChar, -1); },
|
305
|
+
"Backspace": function(cm) { killRegion(cm) || killTo(cm, byChar, -1); },
|
306
|
+
|
307
|
+
"Alt-F": move(byWord, 1), "Alt-B": move(byWord, -1),
|
308
|
+
"Alt-D": function(cm) { killTo(cm, byWord, 1); },
|
309
|
+
"Alt-Backspace": function(cm) { killTo(cm, byWord, -1); },
|
310
|
+
|
311
|
+
"Ctrl-N": move(byLine, 1), "Ctrl-P": move(byLine, -1),
|
312
|
+
"Down": move(byLine, 1), "Up": move(byLine, -1),
|
313
|
+
"Ctrl-A": "goLineStart", "Ctrl-E": "goLineEnd",
|
314
|
+
"End": "goLineEnd", "Home": "goLineStart",
|
315
|
+
|
316
|
+
"Alt-V": move(byPage, -1), "Ctrl-V": move(byPage, 1),
|
317
|
+
"PageUp": move(byPage, -1), "PageDown": move(byPage, 1),
|
318
|
+
|
319
|
+
"Ctrl-Up": move(byParagraph, -1), "Ctrl-Down": move(byParagraph, 1),
|
320
|
+
|
321
|
+
"Alt-A": move(bySentence, -1), "Alt-E": move(bySentence, 1),
|
322
|
+
"Alt-K": function(cm) { killTo(cm, bySentence, 1); },
|
323
|
+
|
324
|
+
"Ctrl-Alt-K": function(cm) { killTo(cm, byExpr, 1); },
|
325
|
+
"Ctrl-Alt-Backspace": function(cm) { killTo(cm, byExpr, -1); },
|
326
|
+
"Ctrl-Alt-F": move(byExpr, 1), "Ctrl-Alt-B": move(byExpr, -1),
|
327
|
+
|
328
|
+
"Shift-Ctrl-Alt-2": function(cm) {
|
329
|
+
var cursor = cm.getCursor();
|
330
|
+
cm.setSelection(findEnd(cm, cursor, byExpr, 1), cursor);
|
331
|
+
},
|
332
|
+
"Ctrl-Alt-T": function(cm) {
|
333
|
+
var leftStart = byExpr(cm, cm.getCursor(), -1), leftEnd = byExpr(cm, leftStart, 1);
|
334
|
+
var rightEnd = byExpr(cm, leftEnd, 1), rightStart = byExpr(cm, rightEnd, -1);
|
335
|
+
cm.replaceRange(cm.getRange(rightStart, rightEnd) + cm.getRange(leftEnd, rightStart) +
|
336
|
+
cm.getRange(leftStart, leftEnd), leftStart, rightEnd);
|
337
|
+
},
|
338
|
+
"Ctrl-Alt-U": repeated(toEnclosingExpr),
|
339
|
+
|
340
|
+
"Alt-Space": function(cm) {
|
341
|
+
var pos = cm.getCursor(), from = pos.ch, to = pos.ch, text = cm.getLine(pos.line);
|
342
|
+
while (from && /\s/.test(text.charAt(from - 1))) --from;
|
343
|
+
while (to < text.length && /\s/.test(text.charAt(to))) ++to;
|
344
|
+
cm.replaceRange(" ", Pos(pos.line, from), Pos(pos.line, to));
|
345
|
+
},
|
346
|
+
"Ctrl-O": repeated(function(cm) { cm.replaceSelection("\n", "start"); }),
|
347
|
+
"Ctrl-T": repeated(function(cm) {
|
348
|
+
cm.execCommand("transposeChars");
|
349
|
+
}),
|
350
|
+
|
351
|
+
"Alt-C": repeated(function(cm) {
|
352
|
+
operateOnWord(cm, function(w) {
|
353
|
+
var letter = w.search(/\w/);
|
354
|
+
if (letter == -1) return w;
|
355
|
+
return w.slice(0, letter) + w.charAt(letter).toUpperCase() + w.slice(letter + 1).toLowerCase();
|
356
|
+
});
|
357
|
+
}),
|
358
|
+
"Alt-U": repeated(function(cm) {
|
359
|
+
operateOnWord(cm, function(w) { return w.toUpperCase(); });
|
360
|
+
}),
|
361
|
+
"Alt-L": repeated(function(cm) {
|
362
|
+
operateOnWord(cm, function(w) { return w.toLowerCase(); });
|
363
|
+
}),
|
364
|
+
|
365
|
+
"Alt-;": "toggleComment",
|
366
|
+
|
367
|
+
"Ctrl-/": repeated("undo"), "Shift-Ctrl--": repeated("undo"),
|
368
|
+
"Ctrl-Z": repeated("undo"), "Cmd-Z": repeated("undo"),
|
369
|
+
"Shift-Alt-,": "goDocStart", "Shift-Alt-.": "goDocEnd",
|
370
|
+
"Ctrl-S": "findNext", "Ctrl-R": "findPrev", "Ctrl-G": quit, "Shift-Alt-5": "replace",
|
371
|
+
"Alt-/": "autocomplete",
|
372
|
+
"Ctrl-J": "newlineAndIndent", "Enter": false, "Tab": "indentAuto",
|
373
|
+
|
374
|
+
"Alt-G G": function(cm) {
|
375
|
+
var prefix = getPrefix(cm, true);
|
376
|
+
if (prefix != null && prefix > 0) return cm.setCursor(prefix - 1);
|
377
|
+
|
378
|
+
getInput(cm, "Goto line", function(str) {
|
379
|
+
var num;
|
380
|
+
if (str && !isNaN(num = Number(str)) && num == (num|0) && num > 0)
|
381
|
+
cm.setCursor(num - 1);
|
382
|
+
});
|
383
|
+
},
|
384
|
+
|
385
|
+
"Ctrl-X Tab": function(cm) {
|
386
|
+
cm.indentSelection(getPrefix(cm, true) || cm.getOption("indentUnit"));
|
387
|
+
},
|
388
|
+
"Ctrl-X Ctrl-X": function(cm) {
|
389
|
+
cm.setSelection(cm.getCursor("head"), cm.getCursor("anchor"));
|
390
|
+
},
|
391
|
+
"Ctrl-X Ctrl-S": "save",
|
392
|
+
"Ctrl-X Ctrl-W": "save",
|
393
|
+
"Ctrl-X S": "saveAll",
|
394
|
+
"Ctrl-X F": "open",
|
395
|
+
"Ctrl-X U": repeated("undo"),
|
396
|
+
"Ctrl-X K": "close",
|
397
|
+
"Ctrl-X Delete": function(cm) { kill(cm, cm.getCursor(), bySentence(cm, cm.getCursor(), 1), true); },
|
398
|
+
"Ctrl-X H": "selectAll",
|
399
|
+
|
400
|
+
"Ctrl-Q Tab": repeated("insertTab"),
|
401
|
+
"Ctrl-U": addPrefixMap
|
402
|
+
});
|
403
|
+
|
404
|
+
var prefixMap = {"Ctrl-G": clearPrefix};
|
405
|
+
function regPrefix(d) {
|
406
|
+
prefixMap[d] = function(cm) { addPrefix(cm, d); };
|
407
|
+
keyMap["Ctrl-" + d] = function(cm) { addPrefix(cm, d); };
|
408
|
+
prefixPreservingKeys["Ctrl-" + d] = true;
|
409
|
+
}
|
410
|
+
for (var i = 0; i < 10; ++i) regPrefix(String(i));
|
411
|
+
regPrefix("-");
|
412
|
+
});
|