feat: save session for wiki

This commit is contained in:
Max Hohlfeld 2023-11-01 08:56:30 +01:00
parent 4f8900d93b
commit 1b07dcea96
3 changed files with 18 additions and 2 deletions

View File

@ -53,6 +53,7 @@ require('packer').startup(function()
use 'mfussenegger/nvim-dap' -- Debugger Adapter Protocol
use 'rcarriga/nvim-dap-ui' -- UI for DAP
use 'phha/zenburn.nvim' -- zenburn coloursheme
use 'rmagatti/auto-session' -- session management
end)
-- General Editor Settings
@ -311,10 +312,18 @@ require('mkdnflow').setup({
MkdnEnter = { { 'i', 'n', 'v' }, '<CR>' },
MkdnCreateLinkFromClipboard = {{'n', 'v'}, '<leader>l'},
},
perspective = {
priority = 'current',
},
links = {
transform_explicit = function(text)
return string.lower(text:gsub(' ', ''))
end
},
new_file_template = {
template = [[
# {{ title }}
]],
}
})
@ -427,3 +436,10 @@ require("registers").setup()
-- Lazygit
map('n', '<Leader>g', '<cmd>LazyGit<cr>', { noremap = true })
-- Session
require("auto-session").setup {
log_level = "error"
}
opt.sessionoptions = "blank,buffers,curdir,folds,help,tabpages,winsize,winpos,terminal,localoptions"

View File

@ -77,7 +77,7 @@ vw () {
if [[ $# == 0 ]]
then
git -C ~/dokumente/wiki pull
nvim ~/dokumente/wiki/index.md
cd ~/dokumente/wiki && nvim
git -C ~/dokumente/wiki add -A
git -C ~/dokumente/wiki commit -m "autosync-$(date +%FT%T)"
git -C ~/dokumente/wiki push

View File

@ -67,7 +67,7 @@ vw () {
if [[ $# == 0 ]]
then
git -C ~/dokumente/wiki pull
nvim ~/dokumente/wiki/index.md
cd ~/dokumente/wiki && nvim
git -C ~/dokumente/wiki add -A
git -C ~/dokumente/wiki commit -m "autosync-$(date +%FT%T)"
git -C ~/dokumente/wiki push