Skip to content

Commit facc42c

Browse files
committed
docs(ci): split pages and vimdoc workflows
1 parent c206e04 commit facc42c

11 files changed

Lines changed: 53 additions & 107 deletions

File tree

.github/workflows/changelog.js

Lines changed: 0 additions & 23 deletions
This file was deleted.

.github/workflows/mdbook.yml

Lines changed: 9 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,53 +1,41 @@
1-
# Sample workflow for building and deploying a mdBook site to GitHub Pages
2-
#
3-
# To get started with mdBook see: https://rust-lang.github.io/mdBook/index.html
4-
#
51
name: Deploy mdBook site to Pages
62

73
on:
8-
# Runs on pushes targeting the default branch
94
push:
105
branches: ["main"]
11-
12-
# Allows you to run this workflow manually from the Actions tab
6+
paths:
7+
- "docs/**"
8+
- ".github/workflows/mdbook.yml"
139
workflow_dispatch:
1410

15-
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
1611
permissions:
1712
contents: read
1813
pages: write
1914
id-token: write
2015

21-
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
22-
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
2316
concurrency:
2417
group: "pages"
2518
cancel-in-progress: false
2619

2720
jobs:
28-
# Build job
2921
build:
3022
runs-on: ubuntu-latest
31-
env:
32-
MDBOOK_VERSION: 0.4.36
3323
steps:
3424
- uses: actions/checkout@v4
35-
- name: Install mdBook
36-
run: |
37-
curl --proto '=https' --tlsv1.2 https://sh.rustup.rs -sSf -y | sh
38-
rustup update
39-
cargo install --version ${MDBOOK_VERSION} mdbook
4025
- name: Setup Pages
4126
id: pages
4227
uses: actions/configure-pages@v5
28+
- name: Install mdBook
29+
uses: peaceiris/actions-mdbook@v2
30+
with:
31+
mdbook-version: "0.4.44"
4332
- name: Build with mdBook
44-
run: mdbook build
33+
run: mdbook build docs
4534
- name: Upload artifact
4635
uses: actions/upload-pages-artifact@v3
4736
with:
48-
path: ./book
37+
path: ./docs/book
4938

50-
# Deployment job
5139
deploy:
5240
environment:
5341
name: github-pages
Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,34 @@
1-
name: docs
1+
name: vimdocs
22

33
on:
44
push:
55
branches:
66
- main
77
paths:
88
- "README.md"
9-
- "doc/**"
9+
- "docs/**"
1010
- "lua/**"
1111
- "plugin/**"
12-
- ".github/workflows/docs.yml"
12+
- ".github/workflows/vimdocs.yml"
1313
workflow_dispatch:
1414

1515
permissions:
1616
contents: write
1717

1818
jobs:
19-
docs:
19+
vimdocs:
20+
name: Build vimdoc
2021
runs-on: ubuntu-latest
2122
steps:
2223
- uses: actions/checkout@v4
23-
- name: panvimdoc
24+
- name: Generate vimdoc
2425
uses: kdheepak/panvimdoc@main
2526
with:
2627
vimdoc: gui-keymap
2728
version: "Neovim >= 0.8.0"
2829
demojify: true
2930
treesitter: true
30-
- name: Push changes
31+
- name: Push generated vimdoc
3132
uses: stefanzweifel/git-auto-commit-action@v6
3233
with:
3334
commit_message: "chore(ci): auto-generate vimdoc"

docs/SUMMARY.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Summary
2+
3+
- [Overview](index.md)
4+
- [Installation](installation.md)
5+
- [Configuration](configuration.md)
6+
- [Keymaps](keymaps.md)
7+
- [Commands and Diagnostics](commands.md)
8+
- [Troubleshooting](troubleshooting.md)

docs/book.toml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
[book]
2+
title = "gui-keymap.nvim"
3+
authors = ["Only-Moon"]
4+
description = "GUI-style keybindings for Neovim."
5+
language = "en"
6+
multilingual = false
7+
src = "."
8+
9+
[build]
10+
build-dir = "book"
11+
12+
[output.html]
13+
git-repository-url = "https://github.com/Only-Moon/gui-keymap.nvim"
14+
edit-url-template = "https://github.com/Only-Moon/gui-keymap.nvim/edit/main/docs/{path}"
15+
default-theme = "light"
16+
preferred-dark-theme = "navy"

docs/commands.md

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,3 @@
1-
---
2-
layout: default
3-
title: Commands and Diagnostics
4-
---
5-
61
# Commands and Diagnostics
72

83
## User commands

docs/configuration.md

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,3 @@
1-
---
2-
layout: default
3-
title: Configuration
4-
---
5-
61
# Configuration Reference
72

83
## Default configuration
@@ -88,7 +83,7 @@ Enables:
8883
- `Ctrl+Backspace`
8984
- `Ctrl+Delete`
9085

91-
Mapped to Vim-native word deletion behavior.
86+
Mapped to GUI-style word deletion behavior that avoids polluting clipboard state.
9287

9388
### `save`
9489

@@ -102,16 +97,12 @@ Modes:
10297

10398
### `quit`
10499

105-
Enables `Ctrl+Q` to save and close the current window or buffer.
100+
Enables `Ctrl+Q` to save and close the current file.
106101

107102
Behavior:
108103

109-
1. tries `:update`
110-
2. tries `:confirm close`
111-
3. falls back to `:confirm bdelete`
112-
113-
This is intentionally closer to GUI “save and close document” behavior than a
114-
raw quit.
104+
1. saves pending changes
105+
2. runs `:confirm wq`
115106

116107
### `home_end`
117108

docs/index.md

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,3 @@
1-
---
2-
layout: default
3-
title: gui-keymap.nvim
4-
---
5-
61
# gui-keymap.nvim
72

83
Use familiar GUI shortcuts in Neovim while learning native Vim commands.

docs/installation.md

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,3 @@
1-
---
2-
layout: default
3-
title: Installation
4-
---
5-
61
# Installation
72

83
## Requirements

docs/keymaps.md

Lines changed: 7 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,3 @@
1-
---
2-
layout: default
3-
title: Keymaps
4-
---
5-
61
# Keymaps and Behavior
72

83
## GUI shortcut table
@@ -23,18 +18,18 @@ title: Keymaps
2318
| `Ctrl+S` | normal | save buffer | `:write` |
2419
| `Ctrl+S` | insert | save buffer | `:write` |
2520
| `Ctrl+S` | visual | save buffer | `:write` |
26-
| `Ctrl+Q` | normal | save and close | `:wq` / `:update \| close` |
27-
| `Ctrl+Q` | insert | save and close | `:wq` / `:update \| close` |
21+
| `Ctrl+Q` | normal | save and close | `:confirm wq` |
22+
| `Ctrl+Q` | insert | save and close | `:confirm wq` |
2823
| `Home` | normal | line start | `0` |
2924
| `Home` | insert | line start | `<C-o>0` |
3025
| `Home` | visual | line start | `0` |
3126
| `End` | normal | line end | `$` |
3227
| `End` | insert | line end | `<C-o>$` |
3328
| `End` | visual | line end | `$` |
34-
| `Ctrl+Backspace` | normal | delete previous word | `db` |
35-
| `Ctrl+Backspace` | insert | delete previous word | `<C-o>db` |
36-
| `Ctrl+Delete` | normal | delete next word | `dw` |
37-
| `Ctrl+Delete` | insert | delete next word | `<C-o>dw` |
29+
| `Ctrl+Backspace` | normal | delete previous word | GUI-style previous-word delete |
30+
| `Ctrl+Backspace` | insert | delete previous word | GUI-style previous-word delete |
31+
| `Ctrl+Delete` | normal | delete next word | GUI-style next-word delete |
32+
| `Ctrl+Delete` | insert | delete next word | GUI-style next-word delete |
3833

3934
## Delete-selection mappings
4035

@@ -87,16 +82,7 @@ Saves the current buffer with `:update`.
8782

8883
### `Ctrl+Q`
8984

90-
`Ctrl+Q` is treated as a GUI-style save-and-close action.
91-
92-
Implementation order:
93-
94-
1. `:update`
95-
2. `:confirm close`
96-
3. `:confirm bdelete`
97-
98-
This avoids raw quit behavior and is closer to closing a document/window in a
99-
GUI editor.
85+
`Ctrl+Q` is treated as a GUI-style save-and-close action and runs `:confirm wq`.
10086

10187
## Mode preservation
10288

0 commit comments

Comments
 (0)