The option that you seem to exclude is setlocal complete+=k{dict} for a dict file of your accounts.
How about redefining :help 'define'/'include', or ~/.ctags suitably to detect and complete them by `i_ctrl-x_ctrl-d/i/] ?
Le jeudi 2 janvier 2025 à 20:12:20 UTC+1, Tim Chase a écrit :
Using ledger(1) for finances, fields are usually delimited by runs
of 2+ spaces (or a tab), allowing a single space in the account-name.
So I might have a transaction like
2024-012-31 ! Groceries
Expenses:Household:Groceries:Food Lion $18.43
Liabilities:Credit Card:Visa -$18.43
(note the 2+ space indent and the 2+ space separation between the
account and the amount, while the single space in "Food Lion" and
"Credit Card")
It would be awfully handy to have colons and single-spaces be part
of 'isk' so that i_CTRL-N and i_CTRL-P can find full accounts (even
if they contain the occasional space), but that starts causing weird
issues (Vim really doesn't like having space in 'isk')
I've tried i_CTRL-X_CTRL-L to do whole-line completion but I have
enough transactions (and each amount regularly differs) that this
returns dozens or hundreds of matching lines, so it's less than useful.
Short of completely hijacking ^N/^P functionality to complete from
my known chart of accounts, is there a better solution I've overlooked?
Thanks!
-tim
(1) https://ledger-cli.org/
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/vim_use/7d78e736-18ff-4d7f-98e0-3a1c9f6c2348n%40googlegroups.com.
No comments:
Post a Comment