Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/pmeinhardt/ql
Quick Look from the command-line 👀
https://github.com/pmeinhardt/ql
cli macos quicklook terminal
Last synced: about 2 months ago
JSON representation
Quick Look from the command-line 👀
- Host: GitHub
- URL: https://github.com/pmeinhardt/ql
- Owner: pmeinhardt
- License: mit
- Created: 2023-02-14T21:39:41.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-04-10T18:44:46.000Z (over 1 year ago)
- Last Synced: 2024-06-02T00:32:17.758Z (4 months ago)
- Topics: cli, macos, quicklook, terminal
- Language: Swift
- Homepage:
- Size: 427 KB
- Stars: 5
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ql
[![checks](https://github.com/pmeinhardt/ql/actions/workflows/checks.yml/badge.svg)](https://github.com/pmeinhardt/ql/actions/workflows/checks.yml)
| Allows you to preview files from the command-line | Integrates with Vim/Neovim |
| ------------------------------------------------- | ---------------------------------- |
| ![](./media/screenshot-macos.png) | ![](./media/screenshot-neovim.png) |Preview files from the command-line using macOS Quick Look.
Open a file in Quick Look from the command-line:
```shell
ql
```Yes, there is `qlmanage`. But you’d always have `[DEBUG]` staring at you.
## Building 🪛
In order to build the `ql` command, run:
```shell
make
```This requires macOS 12.0+ with `swiftc` installed.
You can copy the resulting binary anywhere you like or add the `bin/` directory to your `PATH`.
## Vim plugin 🔩
There is a Vim plugin for `ql`. If you use [vim-plug](https://github.com/junegunn/vim-plug), add this line to your Vim configuration file:
```vim
Plug 'pmeinhardt/ql', {'do': ':QuickLookCompile'}
```The plugin provides a `:QuickLook [path]` command and `` mappings. If you invoke it without a `[path]`, it will show a preview of the current buffer contents. See [`.vimrc.develop`](./.vimrc.develop) for usage examples.
You can use the plugin, even if you cannot build `ql` itself. If the `ql` binary is not found, the plugin will fall back to using `qlmanage` if available or `open`. In this case, leave out the `{'do': ':QuickLookCompile'}` part of the plugin integration above to avoid build errors when upgrading your Vim plugins.
It is probably possible to integrate other file previewers like [GNOME sushi](https://gitlab.gnome.org/GNOME/sushi). If you are up for it, I am happy about pull-requests.
## Markdown 🚲
If you want to preview Markdown files without additional Quick Look plugins, take a look at Maxdown:
https://github.com/pmeinhardt/maxdown## References
- https://developer.apple.com/documentation/quicklook
- https://developer.apple.com/documentation/quicklookui