[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/inf-ruby f062b7eb0b 075/265: Merge remote-tracking branch
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/inf-ruby f062b7eb0b 075/265: Merge remote-tracking branch 'bbatsov/readme' |
Date: |
Sat, 9 Jul 2022 21:59:15 -0400 (EDT) |
branch: elpa/inf-ruby
commit f062b7eb0bb09e2d38288a42bb9b207b61324ac3
Merge: 87a5fd3038 9f0cea55f0
Author: Dmitry Gutov <dgutov@yandex.ru>
Commit: Dmitry Gutov <dgutov@yandex.ru>
Merge remote-tracking branch 'bbatsov/readme'
---
README.md | 135 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 135 insertions(+)
diff --git a/README.md b/README.md
new file mode 100644
index 0000000000..2ad32430cd
--- /dev/null
+++ b/README.md
@@ -0,0 +1,135 @@
+`inf-ruby.el` provides a REPL buffer connected to an IRB subprocess.
+
+## Installation
+
+### Via package.el
+
+`package.el` is the built-in package manager in Emacs 24+. On Emacs 23
+you will need to get [package.el](http://bit.ly/pkg-el23) yourself if you wish
to use it.
+
+`inf-ruby` is available on both major `package.el` community
+maintained repos -
+[Marmalade](http://marmalade-repo.org/packages/inf-ruby) and
+[MELPA](http://melpa.milkbox.net).
+
+If you're not already using Marmalade, add this to your
+`~/.emacs.d/init.el` (or equivalent) and load it with <kbd>M-x
eval-buffer</kbd>.
+
+```lisp
+(require 'package)
+(add-to-list 'package-archives
+ '("marmalade" . "http://marmalade-repo.org/packages/"))
+(package-initialize)
+```
+
+For MELPA the code you need to add is:
+
+```lisp
+(require 'package)
+(add-to-list 'package-archives
+ '("melpa" . "http://melpa.milkbox.net/packages/") t)
+(package-initialize)
+```
+
+And then you can install `inf-ruby` with the following command:
+
+<kbd>M-x package-install [RET] inf-ruby [RET]</kbd>
+
+or by adding this bit of Emacs Lisp code to your Emacs initialization
file(`.emacs` or `init.el`):
+
+```lisp
+(unless (package-installed-p 'inf-ruby)
+ (package-install 'inf-ruby))
+```
+
+If the installation doesn't work try refreshing the package list:
+
+<kbd>M-x package-refresh-contents [RET]</kbd>
+
+### Via el-get
+
+[el-get](https://github.com/dimitri/el-get) is another popular package manager
for Emacs.
+If you're an el-get user just do <kbd>M-x el-get-install</kbd>.
+
+### Manual
+
+If you're installing manually, you'll need to:
+
+* drop the `inf-ruby.el` file somewhere on your load path (perhaps
`~/.emacs.d/vendor`)
+* Add the following lines to your `.emacs` (or `init.el`) file:
+
+```lisp
+(autoload 'inf-ruby "inf-ruby" "Run an inferior Ruby process" t)
+(add-hook 'ruby-mode-hook 'inf-ruby-minor-mode)
+```
+
+Or, for [enh-ruby-mode](https://github.com/zenspider/enhanced-ruby-mode):
+
+```lisp
+(add-hook 'enh-ruby-mode-hook 'inf-ruby-minor-mode)
+```
+
+Installation via `package.el` interface does the above for you
+automatically.
+
+Additionally, consider adding
+
+```lisp
+(add-hook 'after-init-hook 'inf-ruby-switch-setup)
+```
+
+to your init file to easily switch from common Ruby compilation
+modes to interact with a debugger.
+
+### Emacs Prelude
+
+`inf-ruby` comes bundled in
+[Emacs Prelude](https://github.com/bbatsov/prelude). If you're a
+Prelude user you can start using it right away.
+
+## Usage
+
+A Ruby process can be fired up with <kbd>M-x inf-ruby</kbd>.
+
+Customization: When entered, this mode runs `comint-mode-hook` and
+`inf-ruby-mode-hook` (in that order).
+
+You can send text to the inferior ruby process from other buffers containing
+Ruby source.
+
+* `ruby-switch-to-inf` switches the current buffer to the ruby process buffer.
+* `ruby-send-definition` sends the current definition to the ruby process.
+* `ruby-send-region` sends the current region to the ruby process.
+* `ruby-send-definition-and-go' and `ruby-send-region-and-go` switch to the
ruby process buffer after sending their text.
+
+Commands:
+
+* Return after the end of the process' output sends the text from the
+end of process to point.
+* Return before the end of the process' output copies the sexp ending at point
+to the end of the process' output, and sends it.
+* Delete converts tabs to spaces as it moves back.
+* Tab indents for ruby; with argument, shifts rest
+of expression rigidly with the current line.
+* <kbd>C-M-q</kbd> does <kbd>Tab</kbd> on each line starting within following
expression.
+* Paragraphs are separated only by blank lines. `#`start comments.
+* If you accidentally suspend your process, use
+`comint-continue-subjob` to continue it.
+
+### Keymap
+
+Here's a list of the keybindings defined by `inf-ruby-minor-mode`.
+
+Keyboard shortcut | Command
+-------------------------------------|-------------------------------
+<kbd>C-M-x</kbd> | ruby-send-definition
+<kbd>C-x C-e</kbd> | ruby-send-last-sexp
+<kbd>C-c C-b</kbd> | ruby-send-block
+<kbd>C-c M-b</kbd> | ruby-send-block-and-go
+<kbd>C-c C-x</kbd> | ruby-send-definition
+<kbd>C-c M-x</kbd> | ruby-send-definition-and-go
+<kbd>C-c C-r</kbd> | ruby-send-region
+<kbd>C-c M-r</kbd> | ruby-send-region-and-go
+<kbd>C-c C-z</kdb> | ruby-switch-to-inf
+<kbd>C-c C-l</kbd> | ruby-load-file
+<kbd>C-c C-s</kbd> | inf-ruby
- [nongnu] elpa/inf-ruby 12f7f0750c 159/265: Automatically returning to the previous compilation mode after typing, (continued)
- [nongnu] elpa/inf-ruby 12f7f0750c 159/265: Automatically returning to the previous compilation mode after typing, ELPA Syncer, 2022/07/09
- [nongnu] elpa/inf-ruby df014b0717 177/265: Merge pull request #90 from codeasone/support-single-quoted-gemspec-name, ELPA Syncer, 2022/07/09
- [nongnu] elpa/inf-ruby 74ca3a7f97 191/265: in a{, new} buffer, ELPA Syncer, 2022/07/09
- [nongnu] elpa/inf-ruby 5aaa7e879c 193/265: Only launch one console per project, ELPA Syncer, 2022/07/09
- [nongnu] elpa/inf-ruby 62c1c72d8e 205/265: Add autoload, ELPA Syncer, 2022/07/09
- [nongnu] elpa/inf-ruby 86db14c315 022/265: Rename: inf-ruby-keys -> inf-ruby-setup-keybindings, ELPA Syncer, 2022/07/09
- [nongnu] elpa/inf-ruby dfc1d4f19f 033/265: Delete obsolete TODO comment, ELPA Syncer, 2022/07/09
- [nongnu] elpa/inf-ruby 6aba85ea70 042/265: inf-ruby-fix-completions-on-windows: Fix free variable compilation warning, ELPA Syncer, 2022/07/09
- [nongnu] elpa/inf-ruby 5cf94a2dd1 010/265: Fix completion string insertion so that it doesn't swallow newlines when used outside of inf-ruby buffers., ELPA Syncer, 2022/07/09
- [nongnu] elpa/inf-ruby 0f0eb184f0 088/265: Bump the version, ELPA Syncer, 2022/07/09
- [nongnu] elpa/inf-ruby f062b7eb0b 075/265: Merge remote-tracking branch 'bbatsov/readme',
ELPA Syncer <=
- [nongnu] elpa/inf-ruby 8fa68039c8 160/265: Improving inf-ruby-breakpoint-pattern and in-ruby-compilation-modes, ELPA Syncer, 2022/07/09
- [nongnu] elpa/inf-ruby 5bb2919691 155/265: Keep the buffer's restrictions, ELPA Syncer, 2022/07/09
- [nongnu] elpa/inf-ruby e18c8c3624 162/265: Considering ^D as a valid exit command, ELPA Syncer, 2022/07/09
- [nongnu] elpa/inf-ruby 4d410007a2 169/265: Fix ruby-send-definition, ELPA Syncer, 2022/07/09
- [nongnu] elpa/inf-ruby 9c4d799faf 183/265: inf-ruby-console-zeus: Add docstring, ELPA Syncer, 2022/07/09
- [nongnu] elpa/inf-ruby 700c453610 181/265: Merge pull request #91 from asok/multi, ELPA Syncer, 2022/07/09
- [nongnu] elpa/inf-ruby 54eb6bf6d6 185/265: Bump the version, ELPA Syncer, 2022/07/09
- [nongnu] elpa/inf-ruby 57710da5c8 214/265: inf-ruby-console-gem: Use '--prompt default --noreadline', ELPA Syncer, 2022/07/09
- [nongnu] elpa/inf-ruby c2bb2f7186 215/265: Add ruby-send-{buffer, line}-and-go commands, ELPA Syncer, 2022/07/09
- [nongnu] elpa/inf-ruby 6bfa7c9411 217/265: Add `ansi-color-process-output` to comint output functions, ELPA Syncer, 2022/07/09