Skip to content

Commit e616ef1

Browse files
committed
Update readme
1 parent c44a1be commit e616ef1

File tree

1 file changed

+31
-13
lines changed

1 file changed

+31
-13
lines changed

readme.md

+31-13
Original file line numberDiff line numberDiff line change
@@ -23,22 +23,40 @@ Accepts a range and is usable in Visual mode.
2323

2424
Ex.
2525

26-
plugin.commandSync('Cmd', {
27-
range: '',
28-
nargs: '*',
29-
}, function( nvim, args, range, cb ) {
30-
try {
31-
incrementCalls()
32-
nvim.setCurrentLine(
33-
fmt('Command: Called', numCalls, 'times, args:', args, 'range:', range),
34-
cb )
35-
} catch ( err ) {
36-
cb( err )
37-
}
38-
})
26+
```js
27+
plugin.commandSync('Cmd', {
28+
range: '',
29+
nargs: '*',
30+
}, function( nvim, args, range, cb ) {
31+
try {
32+
incrementCalls()
33+
nvim.setCurrentLine(
34+
fmt('Command: Called', numCalls, 'times, args:', args, 'range:', range),
35+
cb )
36+
} catch ( err ) {
37+
cb( err )
38+
}
39+
})
40+
```
3941

4042
Running `:Format` while run jscs in fix mode on the whole file and replace the current buffer with the result.
4143

44+
```js
45+
plugin.commandSync('Cmd', {
46+
range: '',
47+
nargs: '*',
48+
}, function (nvim, args, range, cb) {
49+
try {
50+
incrementCalls();
51+
nvim.setCurrentLine(
52+
fmt('Command: Called', numCalls, 'times, args:', args, 'range:', range),
53+
cb);
54+
} catch (err) {
55+
cb(err);
56+
}
57+
});
58+
```
59+
4260
### Configuration
4361

4462
The default configuration uses airbnb styleguide, you can change the configuration used by jscs with:

0 commit comments

Comments
 (0)