| autoload | Initial commit | |
| doc | Initial commit | |
| ftdetect | Initial commit | |
| ftplugin | Initial commit | |
| plugin | Initial commit | |
| syntax | Initial commit | |
| .gitignore | Initial commit | |
| LICENSE | Initial commit | |
| README.md | Update README.md | |
duras.vim
Vim support for the duras note-taking system and sigline documents.
Features:
- Syntax highlighting
- Section folding
- Structural navigation
- Block auto-continuation
- Document validation
- duras CLI integration
Requirements:
- Vim 9.x
- Pure VimL
- No external dependencies for format support
durasCLI required only for workflow commands
Installation
Native packages (recommended)
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
vim-plug
Plug 'https://codeberg.org/duras/duras.vim'
After installation:
:helptags ALL
Manual
Copy:
autoload/
doc/
ftdetect/
ftplugin/
plugin/
syntax/
into ~/.vim/, then run:
:helptags ~/.vim/doc
Updating
Native packages
git -C ~/.vim/pack/duras/start/duras.vim pull
vim -u NONE -c 'helptags ~/.vim/pack/duras/start/duras.vim/doc' -c q
vim-plug
:PlugUpdate
About sigline
sigline is a structured plain-text format designed for writing directly in Vim.
Each line begins with a sigil that declares its meaning:
# Heading
> Lead
! Warning
~ Note
term :: Definition
The structure is visible in raw text and does not depend on rendering.
duras notes use the .dn extension.
Standalone sigline documents use .sl.
Further reading:
Quick reference
| Construct | Example | |
|---|---|---|
| Heading | # Title |
|
| Lead | > Summary |
|
| Warning | ! Warning |
|
| Note | ~ Note |
|
| Quote | ` | Quoted text` |
| Definition | term :: meaning |
|
| List | - item |
|
| Metadata | key: value |
|
| Comment | %% internal note |
|
| Code fence | ```sh |
|
| Output fence | ```output |
See the sigline specification for complete syntax rules.
Features
Syntax highlighting
Highlights all sigline constructs, including structural errors such as invalid heading levels.
Folding
Heading-based section folding using Vim's native folding commands.
Navigation
Jump between structural elements without searching:
| Keys | Action |
|---|---|
]] / [[ |
Next / previous heading |
]w / [w |
Next / previous warning |
]n / [n |
Next / previous note |
]d / [d |
Next / previous definition |
Mappings are buffer-local and wrap at file boundaries.
Auto-continuation
Pressing Enter on a warning, note, or quote line to continue the current block:
! first warning
! second warning
Validation
Validate document structure:
:DValidate
Reports issues through Vim's location list.
Checks include:
| Issue | Severity |
|---|---|
| Heading deeper than level 3 | Error |
| Multiple leads in one section | Warning |
| Lead before first heading | Warning |
| Unclosed code fence | Error |
Validation runs automatically on write by default.
duras integration
Open, append, search, and inspect notes without leaving Vim.
Open notes
:DOpen
:DOpen 2026年04月20日
:DOpen -1
Append content
:DAppend
:DAppend text
:DAppend -
Search notes
:DSearch keyword
Search results open in a temporary buffer.
Utilities
:DStats
:DPath
:DTags
:DTags project
:DClipYank
:DClipPaste
:DCopyPath
Default mappings
| Key | Action |
|---|---|
<leader>do |
:DOpen |
<leader>da |
:DAppend |
<leader>ds |
:DSearch |
<leader>dp |
:DPath |
Visual mode:
| Key | Action |
|---|---|
<leader>da |
Append selection |
Mappings are defined in plugin/duras.vim.
Configuration
let g:duras_validate_on_write = 1
let g:duras_auto_continue = 1
let g:duras_fold_enable = 1
All options default to 1 (enabled).
Limitations
- Encrypted notes (
.dn.gpg) are not supported :DAppendalways targets today's note:DSearchexposes only the default CLI search mode- CLI operations are synchronous
Documentation
:help duras