duras.vim : Vim support for sigline structured text and the duras daily notes system.
| script karma |
Rating 17/10,
Downloaded by 646 |
Comments, bugs, improvements
|
Vim wiki
|
| created by |
| Sergiy Duras |
| |
| script type |
| utility |
| |
| description |
Vim support for sigline structured text and the duras daily notes system.
https://codeberg.org/duras/duras.vim
SIGLINE
sigline is a structured plain-text format for writing directly in Vim.
Each line begins with a sigil that declares its meaning:
# Heading
> Lead paragraph
! Warning
~ Note
| Blockquote
term :: Definition
- List item
key: value (metadata)
%% comment
```sh ... ``` (fenced block with required language tag)
Structure is visible in raw text and does not depend on rendering.
duras notes use .dn; standalone sigline documents use .sl.
FORMAT FEATURES (no duras CLI required)
Syntax highlighting
All sigline constructs are highlighted, including structural
errors such as invalid heading depth (####).
Section folding
Folds at heading boundaries (#, ##, ###).
foldlevel=99 opens all folds by default.
Navigation — buffer-local normal mode mappings:
]] [[ next / previous heading
]w [w next / previous warning (!)
]n [n next / previous note (~)
]d [d next / previous definition (::)
Auto-continuation
Pressing <CR> on a !, ~, or | line continues the block prefix.
Validation (:DValidate)
Single-pass O(n) structural check. Results go to the location list.
Checks: heading depth, lead block placement, unclosed fences.
Runs automatically on write by default.
DURAS INTEGRATION (requires duras CLI in PATH)
:DOpen [date] Open note. Date: YYYY-MM-DD or integer offset.
:DAppend [text] Append buffer, selection, inline text, or clipboard.
:DSearch keyword Search notes. <CR> in results opens matching note.
:DStats Note counts, size, date range, streak.
:DPath Today's note path.
:DTags [tag] List all tags or notes containing a tag.
:DClipYank Buffer to clipboard.
:DClipPaste Clipboard to buffer.
:DCopyPath Note path to clipboard.
Default mappings: <leader>do (open), <leader>da (append),
<leader>ds (search), <leader>dp (path).
CONFIGURATION
let g:duras_validate_on_write = 1 " validate on BufWritePost
let g:duras_auto_continue = 1 " continue !, ~, | on <CR>
let g:duras_fold_enable = 1 " section folding
All options default to 1 (enabled). Set to 0 to disable. |
| |
| install details |
REQUIREMENTS
Vim 9.0+
duras CLI (workflow commands only) — https://codeberg.org/duras/duras
INSTALL
Extract into ~/.vim/ and run :helptags ALL.
See :help duras after install.
Or with native packages:
mkdir -p ~/.vim/pack/duras/start
git clone https://codeberg.org/duras/duras.vim \
~/.vim/pack/duras/start/duras.vim
vim -u NONE -c 'helptags ~/.vim/pack/duras/start/duras.vim/doc' -c q |
| |
script versions (upload new version)
Click on the package to download.
| duras.vim.tar.gz |
2.0 |
2026-07-01 |
9.0 |
Sergiy Duras |
Major update: sigline format support (syntax, folding, navigation, validation) added alongside existing duras CLI integration. |
| duras_bridge.tar.gz |
1.2.0 |
2026-06-17 |
9.0 |
Sergiy Duras |
### 1.2.0 (2026-06-18)
- Vim 9.0 is a safe minimum.
- Check for `duras` at startup and exit silently if unavailable.
- Use list-form `system()` calls throughout.
- Make search buffers `nomodifiable`.
- Use `<Cmd>` mappings where applicable.
- Add error handling to `DStats`, `DPath`, and `DCopyPath`.
- Preserve clipboard whitespace; strip only trailing newlines.
- Add `s:Err()` helper.
- Add `abort` to all functions.
- Add `-bar` to `DStats` and `DPath`. |
ip used for rating: 216.73.216.248
|