Skip to content

Commit

Permalink
Merge branch 'master' into fix_mark_for_chekbox_parent
Browse files Browse the repository at this point in the history
  • Loading branch information
harshad1 committed Apr 18, 2024
2 parents 3329a75 + 4ed0785 commit 65307cf
Show file tree
Hide file tree
Showing 13 changed files with 464 additions and 142 deletions.
36 changes: 36 additions & 0 deletions .all-contributorsrc
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,42 @@
"code",
"bug"
]
},
{
"login": "cpence",
"name": "Charles Pence",
"avatar_url": "https://avatars.githubusercontent.com/u/297075?v=4",
"profile": "https://codeberg.org/cpence",
"contributions": [
"code"
]
},
{
"login": "mstojanovic",
"name": "Marko Stojanovic",
"avatar_url": "https://avatars.githubusercontent.com/u/3449343?v=4",
"profile": "https://github.com/mstojanovic",
"contributions": [
"doc"
]
},
{
"login": "clarkshaeffer",
"name": "Clark",
"avatar_url": "https://avatars.githubusercontent.com/u/58539767?v=4",
"profile": "https://github.com/clarkshaeffer",
"contributions": [
"doc"
]
},
{
"login": "wenzel-hoffman",
"name": "Wenzel",
"avatar_url": "https://avatars.githubusercontent.com/u/111205756?v=4",
"profile": "https://github.com/wenzel-hoffman",
"contributions": [
"code"
]
}
],
"contributorsPerLine": 7,
Expand Down
43 changes: 43 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
# This workflow will download a prebuilt Ruby version, install dependencies and run tests with Rake
# For more information see: https://github.com/marketplace/actions/setup-ruby-jruby-and-truffleruby

name: Test

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:
test:

runs-on: ubuntu-latest
strategy:
matrix:
ruby-version: ["3.0"]

steps:
- name: Checkout Code
uses: actions/checkout@v2

- name: Install dependencies
run: sudo apt install vim-gtk3 xvfb

- name: Set up Ruby
# To automatically get bug fixes and new Ruby versions for ruby/setup-ruby,
# change this to (see https://github.com/ruby/setup-ruby#versioning):
# uses: ruby/setup-ruby@v1
uses: ruby/setup-ruby@473e4d8fe5dd94ee328fdfca9f8c9c7afc9dae5e
with:
ruby-version: ${{ matrix.ruby-version }}
bundler-cache: true # runs 'bundle install' and caches installed gems automatically

- name: Run headless tests
uses: GabrielBB/xvfb-action@v1
with:
run: bundle exec rspec
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
doc/tags
vendor/
spec/examples.txt
doc/tags
2 changes: 1 addition & 1 deletion .tool-versions
Original file line number Diff line number Diff line change
@@ -1 +1 @@
ruby 2.7.0
ruby 3.1.0
1 change: 1 addition & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,6 @@ group :test do
gem 'pry-byebug'
gem 'rake', '~> 12.3.3'
gem 'rspec'
gem 'rspec-retry'
gem 'vimrunner'
end
3 changes: 3 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ GEM
rspec-mocks (3.8.0)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.8.0)
rspec-retry (0.6.2)
rspec-core (> 3.3)
rspec-support (3.8.0)
vimrunner (0.3.4)

Expand All @@ -35,6 +37,7 @@ DEPENDENCIES
pry-byebug
rake (~> 12.3.3)
rspec
rspec-retry
vimrunner

BUNDLED WITH
Expand Down
108 changes: 81 additions & 27 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
![Bullets.vim](img/bullets-vim-logo.svg)

[![Build Status](https://travis-ci.org/dkarter/bullets.vim.svg?branch=master)](https://travis-ci.org/dkarter/bullets.vim)

<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
[![All Contributors](https://img.shields.io/badge/all_contributors-12-orange.svg?style=flat-square)](#contributors-)
[![All Contributors](https://img.shields.io/badge/all_contributors-16-orange.svg?style=flat-square)](#contributors-)
<!-- ALL-CONTRIBUTORS-BADGE:END -->

> :information_source: Looking for help/maintainers https://github.com/dkarter/bullets.vim/issues/126
# Description

Bullets.vim is a Vim plugin for automated bullet lists.
Expand All @@ -22,10 +22,17 @@ Renumbering lines:

# Installation

With VimPlug:
### With Vim 8.1+ native package manager:
Clone into

`.vim/pack/plugins/start`

Make sure to include `packloadall` in your `vimrc`.

### With VimPlug:

```vim
Plug 'dkarter/bullets.vim'
Plug 'bullets-vim/bullets.vim'
```

Then source your bundle file and run `:PlugInstall`.
Expand Down Expand Up @@ -70,6 +77,36 @@ Add a leader key before default mappings:
let g:bullets_mapping_leader = '<M-b>' " default = ''
```

Customize key mappings:

```vim
let g:bullets_set_mappings = 0 " disable adding default key mappings, default = 1
" default = []
" N.B. You can set these mappings as-is without using this g:bullets_custom_mappings option but it
" will apply in this case for all file types while when using g:bullets_custom_mappings it would
" take into account file types filter set in g:bullets_enabled_file_types, and also
" g:bullets_enable_in_empty_buffers option.
let g:bullets_custom_mappings = [
\ ['imap', '<cr>', '<Plug>(bullets-newline)'],
\ ['inoremap', '<C-cr>', '<cr>'],
\
\ ['nmap', 'o', '<Plug>(bullets-newline)'],
\
\ ['vmap', 'gN', '<Plug>(bullets-renumber)'],
\ ['nmap', 'gN', '<Plug>(bullets-renumber)'],
\
\ ['nmap', '<leader>x', '<Plug>(bullets-toggle-checkbox)'],
\
\ ['imap', '<C-t>', '<Plug>(bullets-demote)'],
\ ['nmap', '>>', '<Plug>(bullets-demote)'],
\ ['vmap', '>', '<Plug>(bullets-demote)'],
\ ['imap', '<C-d>', '<Plug>(bullets-promote)'],
\ ['nmap', '<<', '<Plug>(bullets-promote)'],
\ ['vmap', '<', '<Plug>(bullets-promote)'],
\ ]
```

Enable/disable deleting the last empty bullet when hitting `<cr>` (insert mode) or `o` (normal mode):

```vim
Expand Down Expand Up @@ -101,6 +138,15 @@ let g:bullets_pad_right = 0
" ^ no extra space between bullet and text
```

Indent new bullets when the previous bullet ends with a colon:

```vim
let g:bullets_auto_indent_after_colon = 1 " default = 1
" a. text
" b. text:
" i. text
```

Maximum number of alphabetic characters to use for bullets:

```vim
Expand Down Expand Up @@ -129,7 +175,7 @@ let g:bullets_outline_levels = ['ROM', 'ABC', 'num', 'abc', 'rom', 'std-', 'std*
" std[-/*/+] = standard bullets using a hyphen (-), asterisk (*), or plus (+) as the marker.
" chk = checkbox (- [ ])
let g:bullets_outline_levels = ['num', 'abc', 'std*']
let g:bullets_outline_levels = ['num', 'abc', 'std-']
" Example [keys pressed to get this bullet]:
" 1. first parent
" a. child bullet [ <cr><C-t> ]
Expand Down Expand Up @@ -175,7 +221,7 @@ let g:bullets_nested_checkboxes = 1 " default = 1
" - [ ] child bullet [ type <leader>x ]
" - [ ] sub-child
" - [ ] child bullet
"
"
" Result:
" - [o] first bullet [ <- indicates partial completion of sub-tasks ]
" - [X] child bullet
Expand Down Expand Up @@ -216,18 +262,18 @@ let g:bullets_checkbox_partials_toggle = 1 " default = 1
" - [o] partially checked [ type <leader>x ]
" - [x] sub bullet
" - [ ] sub bullet
"
"
" Result:
" - [x] checked
" - [x] sub bullet
" - [x] sub bullet
"
"
" Example 2:
let g:bullets_checkbox_partials_toggle = 0
" - [o] partially checked [ type <leader>x ]
" - [x] sub bullet
" - [ ] sub bullet
"
"
" Result:
" - [ ] checked
" - [ ] sub bullet
Expand Down Expand Up @@ -260,7 +306,7 @@ let g:bullets_set_mappings = 0
Add a leader key before default mappings:

```vim
let g:bullets_mapping_leader = '<M-b>'
let g:bullets_mapping_leader = '<M-b>'
" Set <M-b> to the leader before all default mappings:
" Example: renumbering becomes `<M-b>gN` instead of just `gN`
```
Expand Down Expand Up @@ -338,22 +384,30 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
<!-- prettier-ignore-start -->
<!-- markdownlint-disable -->
<table>
<tr>
<td align="center"><a href="https://doriankarter.com"><img src="https://avatars3.githubusercontent.com/u/551858?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Dorian Karter</b></sub></a><br /><a href="https://github.com/dkarter/bullets.vim/commits?author=dkarter" title="Code">💻</a> <a href="https://github.com/dkarter/bullets.vim/commits?author=dkarter" title="Tests">⚠️</a> <a href="https://github.com/dkarter/bullets.vim/commits?author=dkarter" title="Documentation">📖</a> <a href="#maintenance-dkarter" title="Maintenance">🚧</a></td>
<td align="center"><a href="https://github.com/cormacrelf"><img src="https://avatars3.githubusercontent.com/u/378760?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Cormac Relf</b></sub></a><br /><a href="https://github.com/dkarter/bullets.vim/commits?author=cormacrelf" title="Code">💻</a> <a href="https://github.com/dkarter/bullets.vim/issues?q=author%3Acormacrelf" title="Bug reports">🐛</a></td>
<td align="center"><a href="http://keithmiyake.info"><img src="https://avatars1.githubusercontent.com/u/2266804?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Keith Miyake</b></sub></a><br /><a href="https://github.com/dkarter/bullets.vim/commits?author=kaymmm" title="Code">💻</a> <a href="https://github.com/dkarter/bullets.vim/commits?author=kaymmm" title="Documentation">📖</a> <a href="#ideas-kaymmm" title="Ideas, Planning, & Feedback">🤔</a> <a href="#maintenance-kaymmm" title="Maintenance">🚧</a></td>
<td align="center"><a href="https://yous.be"><img src="https://avatars0.githubusercontent.com/u/853977?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Chayoung You</b></sub></a><br /><a href="https://github.com/dkarter/bullets.vim/commits?author=yous" title="Code">💻</a> <a href="https://github.com/dkarter/bullets.vim/commits?author=yous" title="Documentation">📖</a></td>
<td align="center"><a href="https://github.com/adriaanzon"><img src="https://avatars3.githubusercontent.com/u/4326420?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Adriaan Zonnenberg</b></sub></a><br /><a href="https://github.com/dkarter/bullets.vim/commits?author=adriaanzon" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/eater"><img src="https://avatars3.githubusercontent.com/u/106199?v=4?s=100" width="100px;" alt=""/><br /><sub><b>eater</b></sub></a><br /><a href="https://github.com/dkarter/bullets.vim/commits?author=eater" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/hut"><img src="https://avatars1.githubusercontent.com/u/90548?v=4?s=100" width="100px;" alt=""/><br /><sub><b>hut</b></sub></a><br /><a href="https://github.com/dkarter/bullets.vim/commits?author=hut" title="Code">💻</a> <a href="https://github.com/dkarter/bullets.vim/commits?author=hut" title="Documentation">📖</a></td>
</tr>
<tr>
<td align="center"><a href="https://github.com/mykoza"><img src="https://avatars1.githubusercontent.com/u/48719773?v=4?s=100" width="100px;" alt=""/><br /><sub><b>mykoza</b></sub></a><br /><a href="https://github.com/dkarter/bullets.vim/commits?author=mykoza" title="Code">💻</a> <a href="#ideas-mykoza" title="Ideas, Planning, & Feedback">🤔</a></td>
<td align="center"><a href="https://github.com/noodlor"><img src="https://avatars3.githubusercontent.com/u/49209345?v=4?s=100" width="100px;" alt=""/><br /><sub><b>noodlor</b></sub></a><br /><a href="https://github.com/dkarter/bullets.vim/commits?author=noodlor" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/harshad1"><img src="https://avatars0.githubusercontent.com/u/1940940?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Harshad Srinivasan</b></sub></a><br /><a href="https://github.com/dkarter/bullets.vim/commits?author=harshad1" title="Code">💻</a> <a href="https://github.com/dkarter/bullets.vim/issues?q=author%3Aharshad1" title="Bug reports">🐛</a></td>
<td align="center"><a href="https://erickchacon.github.io/"><img src="https://avatars2.githubusercontent.com/u/7862458?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Erick A. Chacón Montalván</b></sub></a><br /><a href="#ideas-ErickChacon" title="Ideas, Planning, & Feedback">🤔</a></td>
<td align="center"><a href="https://samgriesemer.com"><img src="https://avatars.githubusercontent.com/u/19940657?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Sam Griesemer</b></sub></a><br /><a href="https://github.com/dkarter/bullets.vim/commits?author=samgriesemer" title="Code">💻</a> <a href="https://github.com/dkarter/bullets.vim/issues?q=author%3Asamgriesemer" title="Bug reports">🐛</a></td>
</tr>
<tbody>
<tr>
<td align="center"><a href="https://doriankarter.com"><img src="https://avatars3.githubusercontent.com/u/551858?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Dorian Karter</b></sub></a><br /><a href="https://github.com/bullets-vim/bullets.vim/commits?author=dkarter" title="Code">💻</a> <a href="https://github.com/bullets-vim/bullets.vim/commits?author=dkarter" title="Tests">⚠️</a> <a href="https://github.com/bullets-vim/bullets.vim/commits?author=dkarter" title="Documentation">📖</a> <a href="#maintenance-dkarter" title="Maintenance">🚧</a></td>
<td align="center"><a href="https://github.com/cormacrelf"><img src="https://avatars3.githubusercontent.com/u/378760?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Cormac Relf</b></sub></a><br /><a href="https://github.com/bullets-vim/bullets.vim/commits?author=cormacrelf" title="Code">💻</a> <a href="https://github.com/bullets-vim/bullets.vim/issues?q=author%3Acormacrelf" title="Bug reports">🐛</a></td>
<td align="center"><a href="http://keithmiyake.info"><img src="https://avatars1.githubusercontent.com/u/2266804?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Keith Miyake</b></sub></a><br /><a href="https://github.com/bullets-vim/bullets.vim/commits?author=kaymmm" title="Code">💻</a> <a href="https://github.com/bullets-vim/bullets.vim/commits?author=kaymmm" title="Documentation">📖</a> <a href="#ideas-kaymmm" title="Ideas, Planning, & Feedback">🤔</a> <a href="#maintenance-kaymmm" title="Maintenance">🚧</a></td>
<td align="center"><a href="https://yous.be"><img src="https://avatars0.githubusercontent.com/u/853977?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Chayoung You</b></sub></a><br /><a href="https://github.com/bullets-vim/bullets.vim/commits?author=yous" title="Code">💻</a> <a href="https://github.com/bullets-vim/bullets.vim/commits?author=yous" title="Documentation">📖</a></td>
<td align="center"><a href="https://github.com/adriaanzon"><img src="https://avatars3.githubusercontent.com/u/4326420?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Adriaan Zonnenberg</b></sub></a><br /><a href="https://github.com/bullets-vim/bullets.vim/commits?author=adriaanzon" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/eater"><img src="https://avatars3.githubusercontent.com/u/106199?v=4?s=100" width="100px;" alt=""/><br /><sub><b>eater</b></sub></a><br /><a href="https://github.com/bullets-vim/bullets.vim/commits?author=eater" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/hut"><img src="https://avatars1.githubusercontent.com/u/90548?v=4?s=100" width="100px;" alt=""/><br /><sub><b>hut</b></sub></a><br /><a href="https://github.com/bullets-vim/bullets.vim/commits?author=hut" title="Code">💻</a> <a href="https://github.com/bullets-vim/bullets.vim/commits?author=hut" title="Documentation">📖</a></td>
</tr>
<tr>
<td align="center"><a href="https://github.com/mykoza"><img src="https://avatars1.githubusercontent.com/u/48719773?v=4?s=100" width="100px;" alt=""/><br /><sub><b>mykoza</b></sub></a><br /><a href="https://github.com/bullets-vim/bullets.vim/commits?author=mykoza" title="Code">💻</a> <a href="#ideas-mykoza" title="Ideas, Planning, & Feedback">🤔</a></td>
<td align="center"><a href="https://github.com/noodlor"><img src="https://avatars3.githubusercontent.com/u/49209345?v=4?s=100" width="100px;" alt=""/><br /><sub><b>noodlor</b></sub></a><br /><a href="https://github.com/bullets-vim/bullets.vim/commits?author=noodlor" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/harshad1"><img src="https://avatars0.githubusercontent.com/u/1940940?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Harshad Srinivasan</b></sub></a><br /><a href="https://github.com/bullets-vim/bullets.vim/commits?author=harshad1" title="Code">💻</a> <a href="https://github.com/bullets-vim/bullets.vim/issues?q=author%3Aharshad1" title="Bug reports">🐛</a></td>
<td align="center"><a href="https://erickchacon.github.io/"><img src="https://avatars2.githubusercontent.com/u/7862458?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Erick A. Chacón Montalván</b></sub></a><br /><a href="#ideas-ErickChacon" title="Ideas, Planning, & Feedback">🤔</a></td>
<td align="center"><a href="https://samgriesemer.com"><img src="https://avatars.githubusercontent.com/u/19940657?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Sam Griesemer</b></sub></a><br /><a href="https://github.com/bullets-vim/bullets.vim/commits?author=samgriesemer" title="Code">💻</a> <a href="https://github.com/bullets-vim/bullets.vim/issues?q=author%3Asamgriesemer" title="Bug reports">🐛</a></td>
<td align="center"><a href="https://codeberg.org/cpence"><img src="https://avatars.githubusercontent.com/u/297075?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Charles Pence</b></sub></a><br /><a href="https://github.com/bullets-vim/bullets.vim/commits?author=cpence" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/mstojanovic"><img src="https://avatars.githubusercontent.com/u/3449343?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Marko Stojanovic</b></sub></a><br /><a href="https://github.com/bullets-vim/bullets.vim/commits?author=mstojanovic" title="Documentation">📖</a></td>
</tr>
<tr>
<td align="center"><a href="https://github.com/clarkshaeffer"><img src="https://avatars.githubusercontent.com/u/58539767?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Clark</b></sub></a><br /><a href="https://github.com/bullets-vim/bullets.vim/commits?author=clarkshaeffer" title="Documentation">📖</a></td>
<td align="center"><a href="https://github.com/wenzel-hoffman"><img src="https://avatars.githubusercontent.com/u/111205756?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Wenzel</b></sub></a><br /><a href="https://github.com/bullets-vim/bullets.vim/commits?author=wenzel-hoffman" title="Code">💻</a></td>
</tr>
</tbody>
</table>

<!-- markdownlint-restore -->
Expand Down
2 changes: 1 addition & 1 deletion doc/bullets.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
*bullets.txt* Automated Bullet Lists in Vim

Author: Dorian Karter <https://doriankarter.com>
License: MIT (see LICENSE.md in https://github.com/dkarter/bullets.vim)
License: MIT (see LICENSE.md in https://github.com/bullets-vim/bullets.vim)

TABLE OF CONTENTS *bullets-toc*

Expand Down
Loading

0 comments on commit 65307cf

Please sign in to comment.