diff options
-rw-r--r-- | alias | 3 | ||||
-rw-r--r-- | vim/kickstarter.lua | 26 |
2 files changed, 24 insertions, 5 deletions
@@ -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 |
57 | alias vv="vim -S ~/.vim.session" | 57 | alias 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)" |
59 | alias ve="vim ~/.config/nvim/nvim.lua" | 59 | alias ve="vim ~/.config/nvim/nvim.lua" |
60 | alias vq='vim ~/buffer' | 60 | alias vq='vim ~/buffer' |
61 | alias cdv='cd ~/.vim/vim-init' | 61 | alias cdv='cd ~/.vim/vim-init' |
62 | vs() { which $1 && vim $(which $1); } | 62 | vs() { which $1 && vim $(which $1); } |
63 | alias vS='vim -S ~/.vim.session' | ||
64 | [ "$shell" = zsh ] && compdef vs=which | 63 | [ "$shell" = zsh ] && compdef vs=which |
65 | alias vim.dos2unix="vim '+set ff=unix' '+x'" | 64 | alias 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-/>') | |||
470 | vim.keymap.set('n', "<leader>oo", ':Obsidian') | 488 | vim.keymap.set('n', "<leader>oo", ':Obsidian') |
471 | vim.keymap.set('n', "<leader>ot", ':ObsidianTags<CR>') | 489 | vim.keymap.set('n', "<leader>ot", ':ObsidianTags<CR>') |
472 | vim.keymap.set('n', "<leader>os", ':ObsidianSearch<CR>') | 490 | vim.keymap.set('n', "<leader>os", ':ObsidianSearch<CR>') |
491 | vim.keymap.set('n', "<leader>oq", ':ObsidianQuickSwitch<CR>') | ||
492 | vim.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 | }, |