https://github.com/qchateau/clang-format-clipboard
clang-format your clipboard
https://github.com/qchateau/clang-format-clipboard
Last synced: 20 days ago
JSON representation
clang-format your clipboard
- Host: GitHub
- URL: https://github.com/qchateau/clang-format-clipboard
- Owner: qchateau
- License: mit
- Created: 2020-09-07T18:12:12.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2020-09-21T07:45:00.000Z (over 4 years ago)
- Last Synced: 2025-02-12T11:14:19.945Z (2 months ago)
- Language: Go
- Size: 3.91 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# clang-format-clipboard
clang-format-clipboard will run clang-format on your clipboard, optionally
keeping the indentation and leading newlines.This in intended to format code in editors that do not support it:
copy your code, format the clipboard, paste it back.## Build and install it
```bash
go get .
go build .
sudo cp clang-format-clipboard /usr/local/bin
```You may also require to install a clipboard interface such as xclip
## Use in your DE
Configure a new shortcut in your DE.
Put a `.clang-format` file where your DE calls the executable. On Ubuntu 18.04, putting it in your home folder seems to work.