You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -444,7 +444,7 @@ definitions with their patterns and replacements, look at the file
444
444
<% foo = { one: 'two' } %>
445
445
```
446
446
447
-
### Haml
447
+
### Haml/Slim
448
448
449
449
* If-clauses:
450
450
```haml
@@ -510,19 +510,19 @@ Object* foo = bar->baz;
510
510
constfoo='${bar}/baz'
511
511
```
512
512
513
-
### CoffeeScript arrows
513
+
### CoffeeScript
514
514
515
-
```coffeescript
516
-
functionCall (foo) ->
517
-
functionCall (foo) =>
518
-
```
519
-
520
-
### CoffeeScript dictionary shorthands
515
+
* Arrows:
516
+
```coffeescript
517
+
functionCall (foo) ->
518
+
functionCall (foo) =>
519
+
```
521
520
522
-
```coffeescript
523
-
foo= {one, two}
524
-
foo= {one: one, two}
525
-
```
521
+
* Dictionary shorthand:
522
+
```coffeescript
523
+
foo= {one, two}
524
+
foo= {one: one, two}
525
+
```
526
526
527
527
### Clojure
528
528
@@ -583,39 +583,56 @@ foo = {one: one, two}
583
583
584
584
### Elixir
585
585
586
-
Charlist -> Binary -> Atom
586
+
* Charlist -> Binary -> Atom
587
+
```elixir
588
+
foo ='bar'
589
+
foo ="bar"
590
+
foo =:bar
591
+
```
587
592
588
-
```elixir
589
-
foo ='bar'
590
-
foo ="bar"
591
-
foo =:bar
592
-
```
593
+
* List shorthands
594
+
```elixir
595
+
["one", "two", "three"]
596
+
~w(one two three)
593
597
594
-
Elixir list shorthands
598
+
[:one, :two, :three]
599
+
~w(one two three)a
600
+
```
595
601
596
-
```elixir
597
-
["one", "two", "three"]
598
-
~w(one two three)
602
+
### Rust
599
603
600
-
[:one, :two, :three]
601
-
~w(one two three)a
602
-
```
604
+
* Void typecheck:
605
+
```rust
606
+
letvalue=complicated_expression();
607
+
letvalue: () =complicated_expression();
608
+
```
603
609
604
-
Capitalized boolean constants :
610
+
* Turbofish:
611
+
```rust
612
+
letvalue=iterator.collect();
613
+
letvalue=iterator.collect::<Todo>();
614
+
```
605
615
606
-
```elixir
607
-
flag =True
608
-
flag =False
609
-
```
616
+
The type inserted is a placeholder, but it should be relatively easy to jump to it and edit it with a `cw`. In the future, this might be improved.
610
617
611
-
### Rust
618
+
* String type:
619
+
```rust
620
+
lethello="Hello, World";
621
+
lethello=r"Hello, World";
622
+
lethello=r#"Hello, World"#;
623
+
```
612
624
613
-
Void typecheck
625
+
* Option `is_some`/`is_none`:
626
+
```rust
627
+
list.get(1).is_some()
628
+
list.get(1).is_none()
629
+
```
614
630
615
-
```rust
616
-
letvalue=complicated_expression();
617
-
letvalue: () =complicated_expression();
618
-
```
631
+
* Equality assertion
632
+
```rust
633
+
assert_eq!(foo, bar);
634
+
assert_ne!(foo, bar);
635
+
```
619
636
620
637
### TOML
621
638
@@ -635,6 +652,57 @@ Task items
635
652
- [x] Task 1
636
653
```
637
654
655
+
### Python
656
+
657
+
* Dict access:
658
+
659
+
```python
660
+
spam['eggs']
661
+
spam.get('eggs')
662
+
```
663
+
664
+
* String style:
665
+
666
+
```python
667
+
'Ham'
668
+
"Ham"
669
+
f"Ham"
670
+
```
671
+
672
+
* Dictionary style:
673
+
674
+
```python
675
+
{'foo': 'bar', 'bar': 'baz'}
676
+
dict(foo='bar', bar='baz')
677
+
```
678
+
679
+
Note that this will only work for simple dictionaries. Nesting and more complicated expressions break this, because it uses a single regex. A future dedicated implementation using my "sideways" plugin might work better here.
Note that this will only work for simple dictionaries. Nesting and more complicated expressions break this, because it uses a single regex. A future dedicated implementation using my "sideways" plugin might work better here.
813
+
817
814
Jinja ~
818
815
819
816
Tag type (g:switch_builtins.jinja_tag_type)
@@ -822,7 +819,19 @@ Tag type (g:switch_builtins.jinja_tag_type)
0 commit comments