Commits

Anonymous committed 77e2dda Merge

Merged with default.

Comments (0)

Files changed (2)

+Uberselection
+=============
+
+Description_
+Examples_
+`Four ways to specify commands`_
+Tokens_
+
+Description
+***********
+
+Makes complex selections and replacements in a buffer via text commands.
+Inspired in Vim's ex mode.
+
+Examples
+********
+
+10,20V/this/
+
+Select lines containing "this" between lines 10 and 20 (inclusive).
+
+.,.+20-V/this/
+
+Select lines NOT containing "this" from the current line to 20 lines down from
+it.
+
+%s/this/that/
+
+Replace "this" with "that" in the whole file.
+
+Four ways to specify commands
+*****************************
+
+1. <SUBLIME COMMAND>[ <ARG>]
+2. <LINE REF>[,<LINE REF>]
+3. <BUFFER COMMAND>[;<BUFFER COMMAND>]*
+4. <LINE REF><BUFFER COMMAND>[;<BUFFER COMMAND>]*
+
+All tokens are explained in the following sections
+
+Tokens
+******
+
+Sublime commands
+----------------
+
+w
+    Not implemented.
+ls
+    Show list of opened views.
+e
+    Show list of files in current directory.
+
+Line reference
+--------------
+
+Designates lines or ranges of lines in the active view.
+
+[0-9]*
+    Designates line by number.
+.
+    Desigates the current line (first cursor in selection).
+$
+    Designates the last line in the view.
+%
+    Designates all lines in the view.
+
+You can also specify offsets with `[+-][0-9]*`.
+
+In order to designate a range, use two comma separated line references.
+
+Buffer commands
+---------------
+
+Select lines and perform replacements in the view.
+
+V/<arg>/<flags>
+    Selects all lines containing `<arg>`. Case insensitive by default. Use the
+    flag `c` to make a case-sensitive search.
+
+-V/<arg>/<flags>
+    Same as above, but excludes the lines matching `<arg>`.
+
+s/<what>/<with>/
+    Replaces all instances of `<what>` with `<with>`.
+
+You can chain commands by separating them with a semicolon (`;`).

readme.txt

-TODO: rewrite in reST
-
-README
-
-Examples:
-
-10,20V/this/
-
-Select lines containing "this" between lines 10 and 20 (inclusive).
-
-10,20V/this/i
-
-Same performing case insensitive search.
-
-10,20-V/this/
-
-Exclude lines containing "this".
-
-Range anchors/operators:
-
-% => all lines in the active view
-. => current line in the active view.
-$ => last line in the active view.
-/what/ => next line containing "what"
-?what? => previous line containing "what"
-
-It is also possible to specify offsets.
-
-Examples:
-
-%V// => select all lines in the active view.
-.+10V// => select tenth line down from the current selection (first cursor)
-.-10V// => selection tenth line up from the current selection (frist cursor)
-?^BIO HAZARD WARNING$?+1,/^END OF WARNING$/-1V// => select every line comprised between the marks (excluding the marks' lines)
-.,$ => select all lines from current selection (first cursor) up to the end of the file (inclusive)
-
-Transformation operators
-
-V/what/ => add lines to selection if line matches what
--V/what/ => remove lines from selection if line matches what
-s/what/repl/ => replace what with repl in every selected line
-
-Transformation operators can be chained:
-
-49,/Mobile/V/Windows/;-V/7/;s/Windows/WINDOZE/
-
-Try the above here (place the cursor under this line, otherwise "Mobile" will match early):
-
-    Windows 3.1
-    Windows 98SE
-    Wine: Windows on Linux
-    Wine: Windows 7 on Linux
-    Ubuntu
-    Windows 98
-    Windows 7
-    Windows ME
-    BSD
-    Windows 7 Standard
-    Windows Mobile