updating obsidian

This commit is contained in:
marctalcott 2024-07-17 21:28:13 -04:00
parent dbe6c124f2
commit 12febc1bc4
1 changed files with 68 additions and 3 deletions

View File

@ -32,7 +32,7 @@ return {
path = '~/Library/Mobile Documents/iCloud~md~obsidian/Documents/ArchivedTalcottUniverse',
},
},
notes_subdir = 'notes',
notes_subdir = 'inbox',
log_level = vim.log.levels.INFO,
daily_notes = {
-- Optional, if you keep daily notes in a separate directory.
@ -44,7 +44,7 @@ return {
-- Optional, default tags to add to each new daily note created.
default_tags = { 'daily-notes' },
-- Optional, if you want to automatically insert a template from your template directory like 'daily.md'
template = nil,
template = 'daily-note-template.md',
},
-- Optional, completion of wiki links, local markdown links, and tags using nvim-cmp.
completion = {
@ -141,7 +141,7 @@ return {
-- Optional, boolean or a function that takes a filename and returns a boolean.
-- `true` indicates that you don't want obsidian.nvim to manage frontmatter.
disable_frontmatter = false,
disable_frontmatter = true,
-- Optional, alternatively you can customize the frontmatter data.
---@return table
@ -307,5 +307,70 @@ return {
end,
},
}
--------------
-- obsidian --
--------------
--
-- >>> oo # from shell, navigate to vault (optional)
--
-- # NEW NOTE
-- >>> on "Note Name" # call my "obsidian new note" shell script (~/bin/on)
-- >>>
-- >>> ))) <leader>on # inside vim now, format note as template
-- >>> ))) # add tag, e.g. fact / blog / video / etc..
-- >>> ))) # add hubs, e.g. [[python]], [[machine-learning]], etc...
-- >>> ))) <leader>of # format title
--
-- # END OF DAY/WEEK REVIEW
-- >>> or # review notes in inbox
-- >>>
-- >>> ))) <leader>ok # inside vim now, move to zettelkasten
-- >>> ))) <leader>odd # or delete
-- >>>
-- >>> og # organize saved notes from zettelkasten into notes/[tag] folders
-- >>> ou # sync local with Notion
--
-- navigate to vault
vim.keymap.set('n', '<leader>od', ':cd /Users/marctalcott/Library/Mobile\\ Documents/iCloud~md~obsidian/Documents/MarcsDailyNotes<cr>')
--
-- convert note to template and remove leading white space
vim.keymap.set('n', '<leader>on', ':ObsidianTemplate note<cr> :lua vim.cmd([[1,/^\\S/s/^\\n\\{1,}//]])<cr>', { desc = 'Obsidian note template' })
vim.keymap.set('n', '<leader>o1', ':ObsidianTemplate 1-1-template<cr> :lua vim.cmd([[1,/^\\S/s/^\\n\\{1,}//]])<cr>', { desc = 'Obsidian 1 on 1 template' })
vim.keymap.set(
'n',
'<leader>ol',
':ObsidianTemplate log-template<cr> :lua vim.cmd([[1,/^\\S/s/^\\n\\{1,}//]])<cr>',
{ desc = 'Obsidian Log entry template' }
)
-- strip date from note title and replace dashes with spaces
-- must have cursor on title
vim.keymap.set('n', '<leader>of', ':s/\\(# \\)[^_]*_/\\1/ | s/-/ /g<cr>')
--
-- search for files in full vault
vim.keymap.set(
'n',
'<leader>os',
':Telescope find_files search_dirs={"/Users/marctalcott/Library/Mobile\\ Documents/iCloud~md~obsidian/Documents/MarcsDailyNotes/notes"}<cr>'
)
vim.keymap.set(
'n',
'<leader>oz',
':Telescope live_grep search_dirs={"/Users/marctalcott/Library/Mobile\\ Documents/iCloud~md~obsidian/Documents/MarcsDailyNotes/notes"}<cr>'
)
--
-- search for files in notes (ignore zettelkasten)
-- vim.keymap.set("n", "<leader>ois", ":Telescope find_files search_dirs={\"/Users/alex/library/Mobile\\ Documents/iCloud~md~obsidian/Documents/ZazenCodes/notes\"}<cr>")
-- vim.keymap.set("n", "<leader>oiz", ":Telescope live_grep search_dirs={\"/Users/alex/library/Mobile\\ Documents/iCloud~md~obsidian/Documents/ZazenCodes/notes\"}<cr>")
--
-- for review workflow
-- move file in current buffer to zettelkasten folder
vim.keymap.set(
'n',
'<leader>ok',
":!mv '%:p' /Users/marctalcott/Library/Mobile\\ Documents/iCloud~md~obsidian/Documents/MarcsDailyNotes/zettelkasten<cr>:bd<cr>"
)
-- delete file in current buffer
vim.keymap.set('n', '<leader>odd', ":!rm '%:p'<cr>:bd<cr>")
end,
}