Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/eleanor-clifford/vim-qalc
Simple integration with qalc for vim
https://github.com/eleanor-clifford/vim-qalc
Last synced: 5 days ago
JSON representation
Simple integration with qalc for vim
- Host: GitHub
- URL: https://github.com/eleanor-clifford/vim-qalc
- Owner: eleanor-clifford
- License: bsd-3-clause
- Created: 2021-03-11T22:28:25.000Z (almost 4 years ago)
- Default Branch: master
- Last Pushed: 2022-02-15T00:57:57.000Z (almost 3 years ago)
- Last Synced: 2024-11-08T23:23:48.959Z (about 2 months ago)
- Language: Vim script
- Homepage:
- Size: 358 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
| :exclamation: | This is a mirror of [https://git.sr.ht/~tim-clifford/vim-qalc](https://git.sr.ht/~tim-clifford/vim-qalc). Please refrain from using GitHub's issue and PR system. |
|----------------|:-------------------------------------------------------------------------------------------------------------------------------------------------------|# vim-qalc
Simple integration with `qalc` for vim, to make calculations easier
![Demo](demo.gif)
## Installation
Use your favourite plugin manager. For example with
[Vundle.vim](https://github.com/VundleVim/Vundle.vim):
```vimscript
Plugin 'tim-clifford/vim-qalc'
```
# Dependencies- libqalculate
Optional:
- [skywind3000/asyncrun.vim](https://github.com/skywind3000/asyncrun.vim) to
enable evaluating an expression into a quickfix window# Usage
You can evaluate expressions in a few ways. Here are the default mappings
(disabled with `let g:qalc_mappings = 0`). Note that the terminal and quickfix
options only work with vim (not neovim) at the moment.```vimscript
" Run into a quickfix window (requires AsyncRun)
vnoremap xq :call qalc#ToQuickfix()
nnoremap xq viW:call qalc#ToQuickfix()" Evaluate and put it in the active register
vnoremap xr :call qalc#ToRegister(v:register)
nnoremap xr viW:call qalc#ToRegister(v:register)" Evaluate and overwrite
vnoremap x :call qalc#Substitute()
nnoremap x viW:call qalc#Substitute()" Evaluate and put it in the " register
vnoremap xx :call qalc#ToRegister(v:register)
nnoremap xx viW"":call qalc#ToRegister(v:register)" Open qalc in a terminal window
noremap xt :term ++close qalc
```