Skip to content

Commit

Permalink
update README
Browse files Browse the repository at this point in the history
  • Loading branch information
takumatt committed May 2, 2019
1 parent 5da9e53 commit 3825149
Showing 1 changed file with 44 additions and 8 deletions.
52 changes: 44 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,19 @@
Xciel is a Xcode Extension influented by ci (di) command in Vim.
This command can delete, select and comment-out the region which the cursor is.
For example, see the following gif.
Xciel is a Xcode Extension influenced by "ci" ("di") command in Vim.

# The behavior
This command deletes, selects and comment-out the region (scope) where enclosed in brackets.

Unlike the "ci" command in Vim, the region is defined by the cursor position.

# Introduction

Xciel commands are slightly similar to "ci" command in Vim, but these commands search the region by current cursor position.

It automatically searches the parent brackets ("(){}[]") and executes a command.

## Delete

Xciel Delete command behave like the following.

As a introduction, the Delete command behave like the following.
(the cursor position is expressed as $)

1.
Expand All @@ -23,7 +32,8 @@ if x.isEasy {
}
```

As you can see, the cursor's scope is inside of the `do(what: @x)` and it deletes `what: x`.
As you can see, the cursor's scope is inside of the `do(what: @x)` and it deletes `what: x`.

By the way, if the cursor is outside of the `do()`, then

1.
Expand All @@ -44,11 +54,37 @@ if !(x.isEasy) {

Now, you can imagine the Delete command's behavior.

## Select

Select command simply selects the scope.

## Comment

Comment out command toggles lines in the scope.

NOTE: Comment out command can toggle comments in the region!

## Greedy

Each commends has greedy option.

These commands are usefull in specific situation.

### Select

This command selects the region where exntended to the first column of the start line and the last column of the end line.

### Delete

This command deletes the region as same as the Select command select.

### Comment out

This command comments the region as same sa the Select command select.

# Installation

Download from the release page and open Xciel.
Download from the release page and open Xciel.app.

Then, open System Preferences > Extensions and enable Xciel Extension.

Expand All @@ -58,4 +94,4 @@ If you cannot find Xcode Menu > Editor > Xciel Extension, please reopen Xcode.

Select Xcode Menu > Editor > Xciel Extensions.

However, I highly recommend setting keybind to the Xciel commands.
I highly recommend setting keybind to the Xciel commands though :)

0 comments on commit 3825149

Please sign in to comment.