meiMingle / intellij-randomness

IntelliJ plugin for inserting random numbers, strings, and UUIDs

Home Page:https://plugins.jetbrains.com/plugin/9836-randomness

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool


Randomness

Release Documentation
GitHub build status Line coverage

Rather than going to random.org or making up your own random data, you can now insert random numbers, strings, and UUIDs using an IntelliJ action!

This plugin is also available on the plugin repository.

πŸ“– How to use

Animated sample usage of Randomness.

To insert random data, press Alt + R (βŒ₯R) and choose the type of data you want to insert. A different value will be inserted at each caret.

You can modify this behavior by holding a key while selecting the type of data to insert:

  • Array: Hold Shift to insert a whole array of values.
  • Settings: Hold Ctrl to open the settings of that data type.
  • Repeat: Hold Alt (βŒ₯) to insert the same value at each caret.

You can also hold multiple modifier keys to combine their effects.

Randomness can also be found in the main menu under Tools or in Code > Generate.

✨ Features

  • πŸ•Έ Data Types
    There are five types of data that can be inserted:

    1. Integers, such as 7,826,922, in any base from binary to hexatrigesimal.
    2. Decimals, such as 8,816,573.10, using customisable separators.
    3. Strings, such as "PaQDQqSBEH", with custom symbol lists.
    4. Words, such as "Bridge", with custom word lists.
    5. UUIDs, such as 0caa7b28-fe58-4ba6-a25a-9e5beaaf8f4b, with or without dashes.

    In addition to these data types, it's also possible to generate entire arrays of a data type. For example, an array of integers might look like [978, 881, 118, 286, 288].

  • βš™ Settings
    The way the data is generated can be adjusted to your demands. You can customise the smallest integer to generate, the quotation marks to surround strings with, the number of elements to put in an array, the decimal separator to use, the capitalisation of strings and UUIDs, and much more.

  • πŸ‘€ Previews
    To help you decide what settings to choose, a preview of the data that is generated with your current settings is shown at the bottom of the settings window.

  • πŸ’¨ Shortcuts
    Instead of using up all your shortcuts, Randomness only uses the Alt + R (or βŒ₯R) shortcut by default. However, you have the option to assign a unique shortcut to each individual data type and each settings window to streamline your workflow.

  • πŸ’¬ Symbol sets
    While Randomness comes with a varied selection of symbols to use for generating strings, it also gives you the option to add your own symbols, with support for Chinese symbols and emoji.

  • πŸ“š Dictionaries
    Randomness is bundled with a small English dictionary from which it chooses random words. However, you may want to add random words from another language or insert random movie quotes. You can create your own dictionaries by creating a text file and putting one option on each line, and saving the file with the .dic extension. Empty lines and lines that start with a # are ignored.

    Dictionary settings

πŸ’» Development

This section contains instructions in case you want to build the plugin from source or want to help with development. Please also check the contribution guidelines.

πŸ”¨ Build/run

$ gradlew runIde       # Open a sandbox IntelliJ instance running the plugin
$ gradlew buildPlugin  # Build an installable zip of the plugin

πŸ§ͺ Quality assurance

$ gradlew test                # Run tests
$ gradlew test --tests X      # Run tests in class X
$ gradlew check               # Run tests and static analysis
$ gradlew jacocoTestReport    # Run tests and calculate coverage
$ gradlew runPluginVerifier   # Check for compatibility issues

πŸ“š Documentation

$ gradlew dokkaHtml  # Generate documentation

πŸ–Ό Icons

The icons used by the plugin are found in the .sketch file. You can open this file with Sketch (macOS), Lunacy (Windows), or Figma (Linux).

πŸ™ Acknowledgements

In chronological order of contribution:

If I should add, remove, or change anything here, just open an issue or email me!

About

IntelliJ plugin for inserting random numbers, strings, and UUIDs

https://plugins.jetbrains.com/plugin/9836-randomness

License:MIT License


Languages

Language:Kotlin 99.4%Language:HTML 0.6%