Giter VIP home page Giter VIP logo

terokarvinen / palettero Goto Github PK

View Code? Open in Web Editor NEW
11.0 3.0 1.0 125 KB

Command palette - Ctrl-P to fuzzy search & run commands, textfilters and descriptions - Micro editor plugin

Home Page: https://terokarvinen.com/2022/command-palette-cheatsheet-run-and-make-micro/

License: GNU General Public License v3.0

Lua 100.00%
command-palette editor menu micro-editor micro-editor-plugin plugin micro

palettero's Introduction

Palettero - command palette / menu for Micro editor

Command palette for Micro editor - fuzzy search commands and textfilters

The first and original command paletter for Micro.

Screenshot

Usage

Press Ctrl-Space or Alt-Ctrl-Space to open Palettero. Type to fuzzy search commands and their descriptions. Use up and down arrows to move. Press enter to select, Press Esc to cancel.

Command is pre-filled to command bar. Edit the command, then press enter to execute.

Tab completes file names in some commands, such as "tab" and "open".

To select an item immediately without editing, press double enter.

Advanced Usage

You can add your own menu items with ctrl-E "editmenu".

Update the list of available help files and colorschemes (themes) with ctrl-E "updatemenu". Update is automatically ran once when you install Palettero.

Features

Palettero command palette includes

  • All built-in commands in Micro
  • All built-in help documents in Micro
  • Many ready made textfilters to automatically modify your selection
    • Split to lines by comma, base64, rot13, remove empty lines, urldecode, hard wrap, squeeze white space, extract email addresses, extract URLs...
  • Detects installed colorschemes and help files
  • Write your own presets with 'editmenu' command
    • Use any script or command to fully integrate your existing environment
    • Use Python one-liners with pythonpy (automatic import, perform an action on every line)

Requirements

Requires fzf and bash, optionally pythonpy for extra features.

$ sudo apt-get update
$ sudo apt-get -y install fzf
$ sudo apt-get -y install pythonpy # optional

Only tested on Linux.

Installation

In the future, you will be able to install Palettero by

$ micro --plugin install palettero

Currently, there is just development install

$ cd $HOME/.config/micro/plug/
$ git clone https://github.com/terokarvinen/palettero

Adding your own commands

You can add your own menu entries with 'editmenu' command.

Your commands will be saved to $HOME/.config/micro/palettero.cfg

Adminstrivia

https://TeroKarvinen.com/micro

palettero's People

Contributors

terokarvinen avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

octoshrimpy

palettero's Issues

How to add generic shell command.

Suppose I want to insert the date, or a whole file, or anything the shell can write to STDOUT. Could you please tell me how to write the command?

Many, many, many thanks!

palettero.cfg from other plugins

Hello, it would be interesting to add an integration with other plugins, for example, if a plugin contains the palettero.cfg file it will also be loaded

Example:
In config.ConfigDir + /plug/manipulator/palettero.cfg

snake # turns the selected string into snake case
camel # turns the selected string into camel case

The files can be found using the go library filepath

local config = import("micro/config")
local filepath = import("path/filepath") -- Go library

local plugs, _ = filepath.Glob(config.ConfigDir.."/plug/*/palettero.cfg")

If it makes sense to the project, I can help with a pr.

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.