Skip to content

vim-utilities/dict

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

1 Commit
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Dict

Wrapper for DICT Protocol Client

Byte size of Dict Open Issues Open Pull Requests Latest commits License



Requirements

This repository requires the Vim text editor to be installed the source code is available on GitHub -- vim/vim, and most GNU Linux package managers are able to install Vim directly, eg...

  • Arch based Operating Systems
    sudo packman -Syy
    sudo packman -S vim dictd
    yay -S dict-gcide

    Note; if dict-gcide pops 404 errors about deb file not found, then consider trying the fork hosted on GitHub at S0AndS0/aur-dict-gcide

  • Debian derived Distributions
    sudo apt-get update
    sudo apt-get install vim dictd dict-gcide

Development dependencies

  • Vim Doc for help from doc-comments
    git clone https://github.com/vim-utilities/vimdoc
    pushd vimdoc
    python setup.py config
    python setup.py build
    pipx install .
    popd

    Execute with vimdoc .

    Note; until certain bugs are fixed upstream it is necessary to use the patched version of vimdoc which handles longer lines, and Vim 8 parameters a bit more correctly.

  • Vader for testing code
    call plug#begin('~/.vim/plugged')
      Plug 'junegunn/vader.vim'
    call plug#end()

    Execute with scripts/vader-run-tests.sh --cicd --test units


Quick Start

Use your preferred plugin manager, such as Plug;

call plug#begin('~/.vim/plugged')
  Plug 'vim-utilities/dict'
call plug#end()

Check :help dict for details on configuration and available functions.


Usage

Add something similar to the following to your ~/.vimrc file;

""
" Wrapper for `dict#popup#Definition` that accepts a value to be passed or
" uses current word under cursor as value
function! DictWordPopup(...) abort
  if len(a:000)
    let l:value = a:000[0]
  else
    let l:value = expand('<cWORD>')
  endif

  if !len(l:value)
    return
  endif

  let l:data = dict#get#Definition(l:value)

  return dict#popup#Definition(l:data)
endfunction

""
" Registers Normal mode leader sequences
function! s:Register_Leader()
  nnoremap <Leader>wd :call DictWordPopup()<cr>
endfunction

""
" Registers Ex mode commands
function! s:Register_Commands() abort
  command! -nargs=* Dict call DictWordPopup(<f-args>)
endfunction


""
" Call registration functions for specific file types
autocmd FileType markdown call s:Register_Leader()
autocmd FileType markdown call s:Register_Commands()

Notes

This repository may not be feature complete and/or fully functional, Pull Requests that add features or fix bugs are certainly welcomed.


Contributing

Options for contributing to vim-utilities/dict


Forking

Start making a Fork of this repository to an account that you have write permissions for.

cd ~/git/hub/vim-utilities/dict

git remote add fork [email protected]:<NAME>/dict.git
  • Commit your changes and push to your fork, eg. to fix an issue...
cd ~/git/hub/vim-utilities/dict


git commit -F- <<'EOF'
:bug: Fixes #42 Issue


**Edits**


- `<SCRIPT-NAME>` script, fixes some bug reported in issue
EOF


git push fork main

Note, the -u option may be used to set fork as the default remote, eg. git push -u fork main however, this will also default the fork remote for pulling from too! Meaning that pulling updates from origin must be done explicitly, eg. git pull origin main

  • Then on GitHub submit a Pull Request through the Web-UI, the URL syntax is https://github.com/<NAME>/<REPO>/pull/new/<BRANCH>

Note; to decrease the chances of your Pull Request needing modifications before being accepted, please check the dot-github repository for detailed contributing guidelines.


Sponsor

Thanks for even considering it!

Via Liberapay you may sponsor__shields_io__liberapay on a repeating basis.

Regardless of if you're able to financially support projects such as dict that vim-utilities maintains, please consider sharing projects that are useful with others, because one of the goals of maintaining Open Source repositories is to provide value to the community.


Attribution


License

This project is licensed based on use-case

Commercial and/or proprietary use

If a project is either commercial or (||) proprietary, then please contact the author for pricing and licensing options to make use of code and/or features from this repository.


Non-commercial and FOSS use

If a project is both non-commercial and (&&) published with a license compatible with AGPL-3.0, then it may utilize code from this repository under the following terms.

Wrapper for DICT Protocol Client
Copyright (C) 2025 vim-utilities

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published
by the Free Software Foundation, version 3 of the License.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU Affero General Public License for more details.

You should have received a copy of the GNU Affero General Public License
along with this program.  If not, see <https://www.gnu.org/licenses/>.

For further details review full length version of AGPL-3.0 License.

About

Wrapper for DICT Protocol Client

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

Packages

No packages published