1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-01-23 11:20:06 +08:00

Compare commits

..

2 Commits

Author SHA1 Message Date
Eric Wong
7afbd83a89 feat(zettelkasten): use <Enter> to open note 2024-12-12 17:04:05 +08:00
Eric Wong
ecbb4766da perf(zettelkasten): set winfixwidth option 2024-12-12 16:45:40 +08:00
3 changed files with 23 additions and 8 deletions

View File

@ -73,6 +73,14 @@ if vim.fn.mapcheck('[I', 'n') == '' then
require('zettelkasten.browser').open_tag_tree()
end,
})
vim.api.nvim_buf_set_keymap(0, 'n', '<Enter>', '', {
noremap = true,
silent = true,
nowait = true,
callback = function()
vim.cmd('normal 0gf')
end,
})
end
local config = require('zettelkasten.config')

View File

@ -11,6 +11,7 @@ vim.opt_local.bufhidden = 'wipe'
vim.opt_local.syntax = 'zktagstree'
vim.opt_local.buftype = 'nofile'
vim.opt_local.swapfile = false
vim.opt_local.winfixwidth = true
vim.api.nvim_buf_set_keymap(0, 'n', '<F2>', '', {
noremap = true,
silent = true,

View File

@ -39,14 +39,20 @@ update your custom configuration file with:
## Key bindings
| Key bindings | description |
| ------------ | ----------------------------- |
| `SPC m z n` | create new note |
| `SPC m z t` | create new note with template |
| `SPC m z b` | open zettelkasten browse |
| Key bindings | description |
| ------------ | -------------------------------------- |
| `SPC m z n` | create new note |
| `SPC m z t` | create new note with template |
| `SPC m z b` | open zettelkasten browse |
| `SPC m z g` | filter zettelkasten tags via telescope |
In the zettelkasten browse buffer:
| key bindings | description |
| ------------ | ---------------- |
| `K` | preview the note |
| key bindings | description |
| --------------- | ---------------------------------- |
| `F2` | open zettelkasten tags sidebar |
| `<LeftRelease>` | filter notes based on cursor tag |
| `gf` | open the note |
| `Ctrl-l` | clear tags filter pattarn |
| `Ctrl-] / K` | preview note in vim preview-window |
| `[I` | list references in quickfix-window |