GithubHelp home page GithubHelp logo

wolandark / vimdict Goto Github PK

View Code? Open in Web Editor NEW
3.0 1.0 0.0 39 KB

A Simple Wrapper Over The Dict CLI Utility For Vim9

License: GNU General Public License v3.0

Vim Script 100.00%
vim vim-plugin vim9-plugin vim9script

vimdict's Introduction

VimDict

A Simple Wrapper Over The Dict CLI Utility For Vim9

Dependency

  • dict
  • +vim9script
  • +popupwin

This plugin is written in vim9script and utilizes the popup feature of Vim, therefore it requires a vim 9.0+ compiled with +popupwin option.
You can check this in Vim with echo has('popupwin') and echo has('vim9script'). If Vim returns 1, then you have what this plugin needs.

Install dict on your distro:

apt install dict

pacman -S dict

Install VimDict

use your favorite plugin manager,
or:

git clone https://github.com/wolandark/vimdict.git ~/.vim/pack/plugins/start/vimdict

or for on-demand loading of the plugin:

git clone https://github.com/wolandark/vimdict.git ~/.vim/pack/plugins/opt/vimdict

for on-deman loading do:

:packadd vimdict

:Dict

Usage

Put your cursor on a word and issue :Dict, (No need to select visually or copy the word, that's just for the demo). Move the cursor to dismiss the popup or press Esc.

Configuration

You can specify colors for the popup in vimrc, othereise vimdict will use the default highlight group which creates a white on black popup.

let g:dict_popup_fgcolor = 'Black'
let g:dict_popup_bgcolor = 'White'

Optionally, define a mapping to call :Dict

nnoremap <F2> :Dict<CR>

Demo

output1

If you have suggestions, or find issues, feel free to let me know

Enjoy

vimdict's People

Contributors

wolandark avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.