Skip to content

eleanor-clifford/vim-qalc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This is a mirror of 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

Installation

Use your favourite plugin manager. For example with Vundle.vim:

Plugin 'tim-clifford/vim-qalc'

Dependencies

  • libqalculate

Optional:

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.

" Run into a quickfix window (requires AsyncRun)
vnoremap <leader>xq    :call qalc#ToQuickfix()<CR>
nnoremap <leader>xq viW:call qalc#ToQuickfix()<CR>

" Evaluate and put it in the active register
vnoremap <leader>xr    :call qalc#ToRegister(v:register)<CR>
nnoremap <leader>xr viW:call qalc#ToRegister(v:register)<CR>

" Evaluate and overwrite
vnoremap <leader>x<leader>    :call qalc#Substitute()<CR>
nnoremap <leader>x<leader> viW:call qalc#Substitute()<CR>

" Evaluate and put it in the " register
vnoremap <leader>xx      :call qalc#ToRegister(v:register)<CR>
nnoremap <leader>xx viW"":call qalc#ToRegister(v:register)<CR>

" Open qalc in a terminal window
noremap <leader>xt :term ++close qalc<CR>

About

Simple integration with qalc for vim

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published