{"id":21415480,"url":"https://github.com/ainame/motion-mode","last_synced_at":"2025-07-14T04:31:44.896Z","repository":{"id":7555032,"uuid":"8908271","full_name":"ainame/motion-mode","owner":"ainame","description":"motion-mode.el is a package to provide emacs' major mode for RubyMotion enviroment.","archived":false,"fork":false,"pushed_at":"2014-09-20T01:56:26.000Z","size":402,"stargazers_count":38,"open_issues_count":0,"forks_count":11,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-04-07T23:51:10.581Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ainame.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-03-20T15:54:56.000Z","updated_at":"2025-01-10T15:00:25.000Z","dependencies_parsed_at":"2022-09-01T18:30:16.895Z","dependency_job_id":null,"html_url":"https://github.com/ainame/motion-mode","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ainame/motion-mode","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ainame%2Fmotion-mode","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ainame%2Fmotion-mode/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ainame%2Fmotion-mode/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ainame%2Fmotion-mode/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ainame","download_url":"https://codeload.github.com/ainame/motion-mode/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ainame%2Fmotion-mode/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265240153,"owners_count":23732952,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-22T18:48:49.592Z","updated_at":"2025-07-14T04:31:44.631Z","avatar_url":"https://github.com/ainame.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# motion-mode\n## Description\n\nThe motion-mode provides some convenient features when you write codes in RubyMotion.\nThe features are the following:\n\n* Recognize RubyMotion projects\n  * You can open *.rb files by motion-mode in RubyMotion projects.\n* Syntax Highlight by ruby-mode\n* Code completion of defined words by [auto-complete-mode](http://github.com/auto-complete/auto-complete)\n  * You can make a dictionary with make_dict.rb which includes this repository.\n* Execution of rake tasks in Emacs\n  * You can execute all rake tasks in Emacs with prefix keybinds\n* In particular, support operation of interactive-debugger in emacs by comint-mode\n  * When you execute a rake task by motion-execute-rake, it executes 'rake' in default that is build command.\n* Syntax check by flymake-mode\n  * The flymake-mode is the default syntax - check feature in Emacs.\n  * Support it in motion-mode by macruby interpreter.\n* Document search by Dash.app\n  * Dash.app is a convenient document tool which supports RubyMotion's one.\n  * When you want search documents by keywords on emacs's cursol, you can use motion-dash-at-point.\n* Code converter to convert a part of code from Objective-C to Ruby-style sentence\n\nThe motion-mode provides some convenient commands(motion-execute-rake, motion-dash-at-point, etc...),\nbut the motion-mode dosen't provide key-binds. You can setup key-binds as you like.\n\n## Install\n\nWrite the following codes in your init.el\n\n```el\n(require 'package)\n(dolist (archive '((\"melpa\" . \"http://melpa.milkbox.net/packages/\")))\n  (add-to-list 'package-archives archive :append))\n(package-initialize)\n\n(when (null package-archive-contents)\n  (package-refresh-contents))\n\n(defvar my-packages '(motion-mode\n                      some-other-cool-mode\n                      moar-modes\n                      ...))\n\n(dolist (p my-packages)\n  (when (not (package-installed-p p))\n    (package-install p)))\n```\n\nand then:\n\n\u003ckbd\u003eM-x package-install\u003c/kbd\u003e\n\n## Usage\n\nChange to the appropriate directory:\n\n``` sh\n$ cd ~/.emacs.d/elpa/motion-mode-YYYYMMDD.233 # \u003c- the suffix will be different on your machine\n```\n\nand then:\n\n```\n$ iOS=7.1 # \u003c-- set this to your requirements\n$ HEADERS_PATH=$(xcode-select -print-path)/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS${iOS}.sdk/System/Library/Frameworks\n$ find ${HEADERS_PATH} -name \"*.h\" | xargs ruby bin/make_dict.rb\n$ cp ./motion-mode ~/.emacs.d/ac-dict\n$ emacs ~/.emacs.d/init.el\n```\n\nIf you're installing your packages manually, and **didn't** follow the\nadvice above in the **Install** section, add following settings:\n\n```el\n(add-to-list 'load-path \"~/.emacs.d/elisp/some-dir-of-your-choice/motion-mode\") # \u003c-- check this path\n(require 'motion-mode)\n```\n\nRegardless how you've installed `motion-mode`, add these settings:\n\n```el\n;; following add-hook is very important.\n(add-hook 'ruby-mode-hook 'motion-recognize-project)\n(add-to-list 'ac-modes 'motion-mode)\n(add-to-list 'ac-sources 'ac-source-dictionary)\n;; set key-binds as you like\n(define-key motion-mode-map (kbd \"C-c C-c\") 'motion-execute-rake)\n(define-key motion-mode-map (kbd \"C-c C-d\") 'motion-dash-at-point)\n```\n\n## Commands\n\nYou can set key-binds of the following commands. The motion-mode\ndoesn't provide default key bindings.\n\n* motion-execute-rake\n  * Execution of rake tasks in Emacs\n* motion-dash-at-point\n  * Document search by Dash.app\n* motion-convert-code-region\n  * Code converter to convert a part of code from Objective-C to Ruby-style sentence\n\n### Setting Example\n\n```el\n(define-key motion-mode-map (kbd \"C-c C-c\") 'motion-execute-rake)\n(define-key motion-mode-map (kbd \"C-c C-d\") (lambda () (interactive) (motion-execute-rake-command \"device\")))\n(define-key motion-mode-map (kbd \"C-c C-o\") 'motion-dash-at-point)\n(define-key motion-mode-map (kbd \"C-c C-p\") 'motion-convert-code-region)\n```\n\n## Function\n* motion-execute-rake-command TASK\n  * execute rake task of TASK\n\n## Variable\n* motion-flymake (default is t)\n  * The motion-flymake variable is the flag which your emacs opens rubymotion-source with flymake-mode or not.\n\n## See Also\n* make_dict.rb cite from [roupam/yasobjc](https://github.com/roupam/yasobjc).\n* code_conveter.rb cite from [kyamaguchi/SublimeObjC2RubyMotion](https://github.com/kyamaguchi/SublimeObjC2RubyMotion)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fainame%2Fmotion-mode","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fainame%2Fmotion-mode","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fainame%2Fmotion-mode/lists"}