🔫 Bullets.vim is a Vim/NeoVim plugin for automated bullet lists.
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
doc
img
plugin
spec
.gitignore
.rspec
.travis.yml
CONTRIBUTING.md
Gemfile
Gemfile.lock
LICENSE.md
README.md
Rakefile
bullets.vim.png

README.md

Bullets.vim

Build Status

Description

Bullets.vim is a Vim plugin for automated bullet lists.

Simple bullets:

demo

Wrapped text bullets: wrapped bullets

Renumbering lines: renumber demo

Installation

With VimPlug:

Plug 'dkarter/bullets.vim'

Then source your bundle file and run :PlugInstall.

Usage

In markdown or a text file start a bulleted list using - or *. Press return to go to the next line, a new list item will be created.

Configuration

You can choose which file types this plugin will work on:

" Bullets.vim
let g:bullets_enabled_file_types = [
    \ 'markdown',
    \ 'text',
    \ 'gitcommit',
    \ 'scratch'
    \]

Just add above to your .vimrc

Documentation

:h bullets

Testing

The test suite is written using vimrunner. It is known to run on macOS with MacVim installed, and on travis. Your vim must have +clientserver and either have its own GUI or in a virtual X11 window.

On your mac run:

bundle install
bundle exec rspec

On linux:

bundle install
xvfb-run bundle exec rspec

You should see a Vim window open which will run each test, same general idea as Capybara integration testing. ❤️

TODO

  • eliminate trailing bullet on previous line if user pressed twice
  • allow indenting while in insert mode (C-l: indent right, C-h: indent left)
  • scope the keybindings and functions to markdown and perhaps text
  • allow GFM-style checkbox auto bullet
  • prefix shortcuts and allow disabling them
  • add numbered list
  • reset numbers (user selects numbered bullets 3-5 and copies to middle of document, then reselects and resets them to 1-3)
  • check if plugin initialized and don't load if it did
  • allow for return without creating a bullet (only possible in GuiVim unfortunately)
  • create a text object for bullets
  • create a text object for GFM-style checkboxes
  • check if user is at EOL before appending auto-bullet - they may just want to
  • attempt to keep the same total bullet width even as number width varies (right padding)
  • detect lists that have multiline bullets (should have no empty lines between lines).
  • add alphabetic list
  • allow user to define a global var with custom bullets
  • create a text object for bullet list indentation
  • support for intelligent alphanumeric indented bullets e.g. 1. \t a. \t 1.

About

Hashrocket logo

Bullets.vim is kindly supported by Hashrocket, a multidisciplinary design and development consultancy. If you'd like to work with us or join our team, don't hesitate to get in touch.