sponsor Vim development Vim logo Vim Book Ad

Pickachu : Color, date, and file picker for Vim using Zenity

 script karma  Rating 0/0, Downloaded by 683  Comments, bugs, improvements  Vim wiki

created by
Doug Beney
 
script type
utility
 
description
Pickachu
---

## Demo

[Watch the GIF](https://gfycat.com/AccomplishedTintedJoey)

## Usage

### Commands

```
:Pick
```

or...

```
:Pick [app] [optional: format]
```

**Note:** The full command of `:Pick` is `:Pickachu`. Use whatever feels more intuitive for you.

**Note:** By default, `app` is set to `color` and `format` has different defaults depending on what app you choose. See more about defaults and how to change them in the [Configuration](#configuration) section

**Availible Apps**:

- **color** - The color-picker utility. Default format = `hex`.
- **date** - The date-picker utility. Default format is `%m/%d/%Y`. More about formatting is discussed in the [Configuration](#configuration) section.
- **file** - The file-picker utility. There are no format options for this utility.

### Keyboard shortcuts

By default, there are no keyboard mappings to avoid conflicts with mappings you currently use.

However, here are some ideas:

**Mapping the default color picker to `alt+c`:**

```
map <A-c> :Pickachu<CR>
```

**Mapping the file chooser to `alt+f`:**

```
map <A-c> :Pickachu file<CR>
```

**Mapping the date chooser to `alt+d`:**

```
map <A-d> :Pickachu date<CR>
```

## Configuration

### Global Variables

#### Default Color Format

`let g:pickachu_default_color_format = "hex"`

**Availible color formats are:**

- hex
- rgb
- rgba

#### Default Date Format:

`let g:pickachu_default_date_format = "%m/%d/%Y"`

Date formatting is done through [Python datetime](https://docs.python.org/2/library/datetime.html).

### KDE / Qt5 / Qarma support

If you are a KDE and/or would rather use Qt5's color picker, install `qarma`.

After doing so, add the following line to your configuration:

`let g:pickachu_default_command = "qarma"`
 
install details
**Notes**:
- You must have a Vim installation with Python3 support. If you're using NeoVim, you can simply type `pip3 install neovim`.
- You must have Zenity installed on your computer. On most Linux operating systems, this is already installed.
- If you're on a Mac, there may still be hope. [Here is a guide on installing Zenity with Homebrew on Mac](https://brewinstall.org/install-zenity-on-mac-with-brew/)

### Plug

Add this line to your plugin loop:

```
Plug 'DougBeney/pickachu'
```

### Pathogen

```
git clone https://github.com/DougBeney/pickachu.git ~/.vim/bundle/nerdtree
```

### Apt-Vim

```
apt-vim install -y https://github.com/DougBeney/pickachu.git
```
 

rate this script Life Changing Helpful Unfulfilling 
script versions (upload new version)

Click on the package to download.

package script version date Vim version user release notes
pickachu-master.zip 0.0.1 2018-01-18 7.0 Doug Beney Initial upload
ip used for rating: 216.73.216.46

Questions about Vim should go to the maillist. Help Uganda.     Vim at Github