[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/scala-mode a78716d 046/217: Update README.md
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/scala-mode a78716d 046/217: Update README.md |
Date: |
Sun, 29 Aug 2021 11:30:41 -0400 (EDT) |
branch: elpa/scala-mode
commit a78716dc9402de6ceb5c8556db7ab2f99410a3c6
Author: Heikki Vesalainen <heikkivesalainen@yahoo.com>
Commit: Heikki Vesalainen <heikkivesalainen@yahoo.com>
Update README.md
---
README.md | 55 ++++++++++++++++++++++++++++++-------------------------
1 file changed, 30 insertions(+), 25 deletions(-)
diff --git a/README.md b/README.md
index 561d8c0..392cc1c 100644
--- a/README.md
+++ b/README.md
@@ -1,6 +1,6 @@
# scala-mode2 — A new scala-mode for emacs
-This is a new scala major mode for emacs. It is a complete rewrite
+This is a new scala major mode for emacs 24. It is a complete rewrite
based on scala language specification 2.9.
The mode intends to provide the basic emacs support, including
@@ -14,19 +14,24 @@ standard emacs motions work ofcourse.
## Setting the mode up for use
-1. Download the files to a local directory, you can use the *git*
+1. Make sure you have the latest version of **GNU Emacs** installed.
+The mode has been developed on 24.2 and uses features not available
+in emacs prior to version 24.
+
+2. Download the files to a local directory, you can use the *git*
command. This will create a directory called scala-mode2.
```
> git git://github.com/hvesalai/scala-mode2.git
```
-2. Include the following in your '.emacs' file
+3. Include the following in your '.emacs' file. If you have been
+using the old scala-mode, make sure it is no longer in load-path.
```
(add-to-list 'load-path "/path/to/scala-mode2/")
(require 'scala-mode)
```
-3. That's it. Next you can start emacs and take a look at the
+4. That's it. Next you can start emacs and take a look at the
customization menu for scala-mode (use **M-x** *customize-mode* when
in scala-mode or use **M-x** *customize-variable* to customize one
variable).
@@ -39,15 +44,15 @@ customization variable *frame-background-mode* to *dark*
(use **M-x**
## Indenting modes
*Where four developers meet, there are four opinions on how code should
-be indented. Luckily scala-mode already supports 2^4 different
-ways of indenting.*
+be indented. Luckily scala-mode already supports 2^4 different ways of
+indenting.*
### Run-on lines (scala-indent:default-run-on-strategy)
The indenting engine has three modes for handling run-on lines. The
-*reluctant* (default) mode is geared toward a general style of coding
-and the *eager* for strictly functional style. A third mode called
-*operators* is between the two.
+**reluctant** (default) mode is geared toward a general style of coding
+and the **eager** for strictly functional style. A third mode called
+**operators** is between the two.
The difference between the modes is how they treat run-on lines. For
example, the *eager* mode will indent *map* in the following code
@@ -58,11 +63,11 @@ val x = List(1, 2, 3)
```
The *operators* and *eager* modes will indent the second row in the
-following code:
+following code, as the first line ends with opchar.
```
-val x = 20
- + 21
+val x = 20 +
+ 21
```
The *reluctant* mode (default) will not indent the line in either
@@ -77,10 +82,10 @@ val x = foo("bar")
val y = foo("bar")
-("zot", "kala")
+("zot", "kala") // a tuple
```
-However, in all three modes pressing tab repeatedly on a line
+However, in all three modes pressing **tab** key repeatedly on a line
will toggle between the modes.
### Value expressions (scala-indent:indent-value-expression)
@@ -118,24 +123,24 @@ lines in parameter lists will always align under and
acording to the
first parameter.
```
-val x = equals(List(1,2,3) map (x =>
- x + 1))
-
val y = List( "Alpha", "Bravo",
"Charlie" )
+
+val x = equals(List(1,2,3) map (x =>
+ x + 1))
```
-When the variable is set to *nil*, the same will be as:
+When the variable is set to *nil*, the same will be indented as:
```
-val x = equals(List(1,2,3) map (x =>
- x + 1))
-
val y = List( "Alpha", "Bravo",
"Charlie" )
+
+val x = equals(List(1,2,3) map (x =>
+ x + 1))
```
-### Forms (scala-indent:align-forms)
+### Expresison forms: if, for, try (scala-indent:align-forms)
When this variable is set to *t* (default), *if*, *for* and *try*
forms are aligned.
@@ -156,7 +161,7 @@ val xs = for (i <- 1 to 10)
yield i
```
-When the variable is set to *nil*, the same will be as:
+When the variable is set to *nil*, the same will be indented as:
```
val x = if (kala)
@@ -177,7 +182,7 @@ val xs = for (i <- 1 to 10)
## Motion
Basic emacs motion will work as expected. The *forward-sexp* and
-*backward-sexp* (**M-C-f**, **M-C-b**) motion commands will move over
+*backward-sexp* ( **M-C-f**, **M-C-b** ) motion commands will move over
reserved words, literals, ids and lists.
## Code highlighting
@@ -188,7 +193,7 @@ should work is welcomed as issues to this github project.
## Other features
- supports multi-line strings both in highlight and movement
- highlights only properly formatted string and character constants
-- fills scaladoc comments properly (**M-q**)
+- fills scaladoc comments properly ( **M-q** )
- indenting a code line removes trailing whitespace
## Future work
- [nongnu] elpa/scala-mode 3f724ed 030/217: Add the scala-indent:pad-equals setting., (continued)
- [nongnu] elpa/scala-mode 3f724ed 030/217: Add the scala-indent:pad-equals setting., ELPA Syncer, 2021/08/29
- [nongnu] elpa/scala-mode 6257e3b 033/217: Renamed bad-equals to indent-value-expression. Added info to README.md, ELPA Syncer, 2021/08/29
- [nongnu] elpa/scala-mode 4e3a24f 043/217: Updated Examples.md to reflect issues already solved, ELPA Syncer, 2021/08/29
- [nongnu] elpa/scala-mode 338ff73 060/217: Changed the indent defaults, closes #19, ELPA Syncer, 2021/08/29
- [nongnu] elpa/scala-mode 6c257f6 057/217: Enhanced support for comments and multi-line strings, including, ELPA Syncer, 2021/08/29
- [nongnu] elpa/scala-mode 68ca175 056/217: Fixes #20, the cons bug (a :: b :: Nil) as well as improving some of, ELPA Syncer, 2021/08/29
- [nongnu] elpa/scala-mode 78fff40 039/217: scala-indent:align-forms customization variable, ELPA Syncer, 2021/08/29
- [nongnu] elpa/scala-mode f61e32d 047/217: Update README.md, ELPA Syncer, 2021/08/29
- [nongnu] elpa/scala-mode 0991658 051/217: Fixes #17: string syntax, ELPA Syncer, 2021/08/29
- [nongnu] elpa/scala-mode 3174f4c 048/217: Update README.md clone to be a valid command., ELPA Syncer, 2021/08/29
- [nongnu] elpa/scala-mode a78716d 046/217: Update README.md,
ELPA Syncer <=
- [nongnu] elpa/scala-mode ac13b94 061/217: post-self-insert-hooks, ELPA Syncer, 2021/08/29
- [nongnu] elpa/scala-mode 2201b1c 092/217: Interact nicely with global-font-lock-mode., ELPA Syncer, 2021/08/29
- [nongnu] elpa/scala-mode 98d22a5 099/217: Added programming languages to README.md code, ELPA Syncer, 2021/08/29
- [nongnu] elpa/scala-mode 453c012 106/217: fixed bug in string escapes marking, ELPA Syncer, 2021/08/29
- [nongnu] elpa/scala-mode 6116127 042/217: Updated README.md, ELPA Syncer, 2021/08/29
- [nongnu] elpa/scala-mode 11a710d 044/217: Correct annotation highlighting., ELPA Syncer, 2021/08/29
- [nongnu] elpa/scala-mode 49bd528 045/217: working on README, ELPA Syncer, 2021/08/29
- [nongnu] elpa/scala-mode d357a77 038/217: New 'scala-indent:align-parameters' customization variable, ELPA Syncer, 2021/08/29
- [nongnu] elpa/scala-mode af0e387 053/217: Fixes #18: highlight escapes in strings after chars, ELPA Syncer, 2021/08/29
- [nongnu] elpa/scala-mode bc446e7 120/217: sbt support is now in sbt-mode, ELPA Syncer, 2021/08/29