Skip to content

Commit

Permalink
Adding screencast demos of the UltiSnip snippets.
Browse files Browse the repository at this point in the history
Change-Id: Icaba7ae63e2e26bcd85ae65eab9282dd269408fe
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2090016
Auto-Submit: Łukasz Anforowicz <lukasza@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Commit-Queue: Daniel Cheng <dcheng@chromium.org>
Cr-Commit-Position: refs/heads/master@{#748516}
  • Loading branch information
anforowicz authored and Commit Bot committed Mar 10, 2020
1 parent 9ad6f76 commit 0e2d58c
Showing 1 changed file with 37 additions and 1 deletion.
38 changes: 37 additions & 1 deletion tools/vim/UltiSnips.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,32 @@ for vim.
Below are some UltiSnips snippets that other Chromium developers will hopefully
find useful.

## C++
## Demos

### Copyright, include guard and namespace

The screencast below showcases how:

- `copyright` + `<tab>` will fill-in current year
- `#ifndef` + `<tab>` will calculate the macro name based on the path
of the current file
- `namespace` + `<tab>` + `namespace_name` + `tab` will copy the namespace
name into a comment at the end of the namespace

[![screencast](https://drive.google.com/uc?id=1aDrBQ9G3NG2lO74GXq5J_x3lukzWoZZj)]()


### Ad-hoc logging

The screenscast below showcases how:
- `<< some->expression.logme` + `<tab>` includes the expression
text in the output
- `<< stack` + `<tab>` logs the callstack

[![screencast](https://drive.google.com/uc?id=1skLOswLaXQ97HEEwxhvZO_wO-xQ5YoxW)]()


## C++ Snippets

### Copyright

Expand Down Expand Up @@ -36,6 +61,17 @@ endsnippet
```


### Namespace

```Ultisnips
snippet namespace
namespace $1 {
$0
} // namespace $1
endsnippet
```


### Ad-hoc logging

```Ultisnips
Expand Down

0 comments on commit 0e2d58c

Please sign in to comment.