aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--alias3
-rw-r--r--vim/kickstarter.lua26
2 files changed, 24 insertions, 5 deletions
diff --git a/alias b/alias
index 71f54f2..359737c 100644
--- a/alias
+++ b/alias
@@ -54,13 +54,12 @@ vll() {
54 nvim -c 'Telescope oldfiles' 54 nvim -c 'Telescope oldfiles'
55} 55}
56# Apply defaut session 56# Apply defaut session
57alias vv="vim -S ~/.vim.session" 57alias vS="vim -S /tmp/vim.session"
58#alias vl="vim $(sed -n '/^[^#]/{p;q}' ~/.vim_mru_files)" 58#alias vl="vim $(sed -n '/^[^#]/{p;q}' ~/.vim_mru_files)"
59alias ve="vim ~/.config/nvim/nvim.lua" 59alias ve="vim ~/.config/nvim/nvim.lua"
60alias vq='vim ~/buffer' 60alias vq='vim ~/buffer'
61alias cdv='cd ~/.vim/vim-init' 61alias cdv='cd ~/.vim/vim-init'
62vs() { which $1 && vim $(which $1); } 62vs() { which $1 && vim $(which $1); }
63alias vS='vim -S ~/.vim.session'
64[ "$shell" = zsh ] && compdef vs=which 63[ "$shell" = zsh ] && compdef vs=which
65alias vim.dos2unix="vim '+set ff=unix' '+x'" 64alias vim.dos2unix="vim '+set ff=unix' '+x'"
66 65
diff --git a/vim/kickstarter.lua b/vim/kickstarter.lua
index e4b6238..1805fa2 100644
--- a/vim/kickstarter.lua
+++ b/vim/kickstarter.lua
@@ -193,9 +193,27 @@ require('lazy').setup({
193 end, 193 end,
194 opts = { buffer = true, expr = true }, 194 opts = { buffer = true, expr = true },
195 } 195 }
196 } 196 },
197
198 -- see below for full list of options 👇 197 -- see below for full list of options 👇
198 note_id_func = function(title)
199 return title
200 -- Create note IDs in a Zettelkasten format with a timestamp and a suffix.
201 -- In this case a note with the title 'My new note' will be given an ID that looks
202 -- like '1657296016-my-new-note', and therefore the file name '1657296016-my-new-note.md'
203 -- local suffix = ""
204 -- title = title:gsub(" ", "-"):gsub("[^A-Za-z0-9-]", ""):lower()
205 -- if title ~= nil and title ~= "" then
206 -- -- If title is given, transform it into valid file name.
207 -- suffix = "-" .. title
208 -- else
209 -- -- If title is nil, just add 4 random uppercase letters to the suffix.
210 -- for _ = 1, 4 do
211 -- suffix = suffix .. string.char(math.random(65, 90))
212 -- end
213 -- suffix = "-" .. title
214 -- end
215 -- return tostring(os.time()) .. suffix
216 end,
199 }, 217 },
200 }, 218 },
201 219
@@ -470,6 +488,8 @@ vim.cmd('nmap <C-/> V<C-/>')
470vim.keymap.set('n', "<leader>oo", ':Obsidian') 488vim.keymap.set('n', "<leader>oo", ':Obsidian')
471vim.keymap.set('n', "<leader>ot", ':ObsidianTags<CR>') 489vim.keymap.set('n', "<leader>ot", ':ObsidianTags<CR>')
472vim.keymap.set('n', "<leader>os", ':ObsidianSearch<CR>') 490vim.keymap.set('n', "<leader>os", ':ObsidianSearch<CR>')
491vim.keymap.set('n', "<leader>oq", ':ObsidianQuickSwitch<CR>')
492vim.keymap.set('v', "<leader>on", ':ObsidianLinkNew<CR>')
473 493
474-- [[ Configure Telescope ]] 494-- [[ Configure Telescope ]]
475-- See `:help telescope` and `:help telescope.setup()` 495-- See `:help telescope` and `:help telescope.setup()`
@@ -509,7 +529,7 @@ require('telescope').setup {
509 -- Display symbols as <root>.<parent>.<symbol> 529 -- Display symbols as <root>.<parent>.<symbol>
510 show_nesting = { 530 show_nesting = {
511 ["_"] = false, -- This key will be the default 531 ["_"] = false, -- This key will be the default
512 json = true, -- You can set the option for specific filetypes 532 json = true, -- You can set the option for specific filetypes
513 yaml = true, 533 yaml = true,
514 }, 534 },
515 }, 535 },