Skip to content

Make it possible to customize local journal mappings#216

Merged
lervag merged 3 commits intolervag:masterfrom
aignas:local-journal-mappings-extend
Jan 28, 2022
Merged

Make it possible to customize local journal mappings#216
lervag merged 3 commits intolervag:masterfrom
aignas:local-journal-mappings-extend

Conversation

@aignas
Copy link
Copy Markdown
Contributor

@aignas aignas commented Jan 28, 2022

A small addition of an extra setting and a short intro in the docs.

Copy link
Copy Markdown
Owner

@lervag lervag left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! This looks like a useful addition. I have two minor comments.


call extend(l:mappings, get(g:, 'wiki_mappings_local', {}))
if b:wiki.in_journal
call extend(l:mappings, get(g:, 'wiki_mappings_journal_local', {}))
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could I suggest local_journal instead of journal_local?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done


For any local mappings that should only be applied in journal entries,
consider setting |g:wiki_mappings_journal_local|.

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps one should add an example for this as well?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added an example and an extra table for the defaults.

@aignas aignas requested a review from lervag January 28, 2022 12:34
lervag added a commit that referenced this pull request Jan 28, 2022
@lervag lervag merged commit 276aad6 into lervag:master Jan 28, 2022
@lervag
Copy link
Copy Markdown
Owner

lervag commented Jan 28, 2022

Thanks! I hope you don't mind that I made a minor adjustment on top of this. In any case, I appreciate your contribution!

@aignas
Copy link
Copy Markdown
Contributor Author

aignas commented Jan 28, 2022

Thanks! I hope you don't mind that I made a minor adjustment on top of this. In any case, I appreciate your contribution!

Thanks! no worries. My main goal was to get the setting in, so I am happy that you could review this this quickly!

@aignas aignas deleted the local-journal-mappings-extend branch January 28, 2022 14:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants