@@ -23,22 +23,40 @@ Accepts a range and is usable in Visual mode.
23
23
24
24
Ex.
25
25
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
+ ```
39
41
40
42
Running ` :Format ` while run jscs in fix mode on the whole file and replace the current buffer with the result.
41
43
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
+
42
60
### Configuration
43
61
44
62
The default configuration uses airbnb styleguide, you can change the configuration used by jscs with:
0 commit comments