Skip to content

super-dots/superdots

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

78 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

superdots

Table of Contents

Intro

Superdots is a shell environment plugin framework that focuses on workflow efficiency. Specific focus is placed on the efficiency of:

  • Shell environment management
  • Dot-file Organization (e.g. vim configurations/scripts)
  • User-friendly command saving/recall (fn* functions)
  • Context switching (work function)

As opposed to other terminal frameworks that focus on encapsulating specific functionality as plugins, superdots sets its focus on capturing the higher level, overall shell environment of users as shareable plugins.

As an example, user1 could share their tmux, vim, and bash configurations as a single superdots plugin. Another user's personal workspace might be a mix of user1's superdots plugin (bash/tmux/vim settings) and their own personal customizations.

Another common situation is when separate personal and work shell environments are needed. A work shell environment is often a blend of personal settings and work-specific configurations. A user could define their base/personal shell environment in a superdots plugin saved to GitHub, and define a separate work-specific superdots plugin that is committed to a repository at work.

Quick Start

Install superdots by running the commands below:

git clone https://github.com/super-dots/superdots ~/.superdots
~/.superdots/bin/install

superdots_install

NOTE: superdots currently comes default with the fn-vim plugin, which adds nicer support for fn* functions in vim. If you want a completely clean super-dots installation, use the --bare flag when running bin/install:

USAGE: bin/install [--bare] [--help]

This script installs superdots. The default installation comes with
fn-vim installed as a plugin. Use the '--bare' option to install a
bare superdots:

            --bare      Do not install any default plugins
            --help,-h   Show this help message

Supported Platforms

Linux and Posix systems should both be fully supported. Windows with WSL or Cygwin have not yet been tested.

System Functions

System functions that you will use with superdots are:

Command Example Note
superdots superdots a-user/a-superdots Records github.com/a-user/a-superdots
superdots git@some.host:group/project.git
superdots https://github.com/group/project
superdots-install superdots-install Ensures all recorded plugins are installed
superdots-update superdots-update Updates all recorded superdots plugins
superdots-status superdots-status Show the git status of installed dots
superdots-shell superdots-shell SUPERDOT Drop into a $SHELL in the superdot (use tab completion!)

Efficiency Functions

Core functions of superdots are:

Command Example Note
fn_edit fn_edit python Edit ${SUPERDOTS}/dots/local/bash-sources/python.sh file for editing in vim
fn_new fn_new python Expand new_fn snippet within ${SUPERDOTS}/dots/local/bash-sources/python.sh
fn fn a_function A proxy to support tab-completion with superdots-specific functions
fn_src fn_src a_function Print the source of the function a_function to stdout
work work new_project Creates or reattaches to an existing tmux session named new_project

Fn Functions

fn_edit

fn_edit

fn_new

fn_new

fn - tab completion

fn

fn_src - Display source of the specified function

fn_src

Work Function

work - new session

work

work - reattach to an existing session

work_reattach

Plugins

Using Existing Plugins

After installing superdots, you can record references to external superdots plugins in your ~/.bashrc with:

# ~/.bashrc

superdots a-username/another-superdots-plugin
superdots other-username/their-superdots-plugin

Superdots plugins must be explicitly installed using the superdots-install command. This command will clone the referenced repositories into $SUPERDOTS/dots, and source the bash files contained within the repository.

WAIT That sounds dangerous! Frankly, it is! This is no different than pip-installing unknown or untrusted python packages, using vim-plug to install unverified vim plugins, or installing 1000s of node packages through npm. Be smart, and exercise the same caution that you do with other package and plugin managers.

A list of plugins is kept below:


DISCLAIMER The maintainers of superdots make no claim as to the reliability, security, or intentions of the following superdots plugins.


repo stars contributors description
super-dots/fn-vim GitHub stars GitHub contributors Vim-specific fn* integrations
d0c-s4vage/my-superdots GitHub stars GitHub contributors d0c-s4vage's personal superdots

Creating Plugins

Creating your own superdots plugin is straightforward. For best results, use the plugin-template cookiecutter template to initialize a new superdots plugin.

The minimum requirement is a directory structure as shown below:

./
├── bash-source-pre
├── bash-sources
└── vim-sources

3 directories, 0 files

Your plugin can be added to your ~/.bashrc as a superdots plugin with the superdots command:

# ~/.bashrc

superdots my-username/my-superdots-plugin # Github
superdots git@somewhere.else:my-username/my-superdots-plugin.git # elsewhere
superdots https://gitlab.com/my-username/my-superdots-plugin.git # elsewhere

This functionality should feel similar to vim-plug.

History

Superdots has evolved over the years as a result of @d0c-s4vage tiring of having to copy around his dot files as he switched jobs, upgraded computers, and tried keeping his personal and work metadata in-sync. Things developed slowly from:

Inspiration

Superdots takes inspiration from vim's plugin structure, specifically vim-plug's approach to it.

Notes

Vim-Plug

Be aware that vim-plug currently doesn't support multiple plugin sections. See

The last superdots plugin loaded will have the final say on vim-plug definitions.

About

Core framework for superdots

Resources

Contributing

Stars

Watchers

Forks

Packages

 
 
 

Contributors