You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: README.md
+35-33
Original file line number
Diff line number
Diff line change
@@ -7,11 +7,12 @@ A **community fork** of the Neovim plugin for writing and navigating [Obsidian](
7
7
8
8
Built for people who love the concept of Obsidian -- a simple, markdown-based notes app -- but love Neovim too much to stand typing characters into anything else.
9
9
10
-
If you're new to Obsidian we highly recommend watching [this excellent YouTube video](https://youtu.be/5ht8NYkU9wQ?si=8nbnNsRVnw0xfX2S) for a great overview.
10
+
If you're new to Obsidian we highly recommend watching [this excellent YouTube video](https://youtu.be/5ht8NYkU9wQ) for a great overview.
11
11
12
12
_Keep in mind this plugin is not meant to replace Obsidian, but to complement it._ The Obsidian app is very powerful in its own way; it comes with a mobile app and has a lot of functionality that's not feasible to implement in Neovim, such as the graph explorer view. That said, this plugin stands on its own as well. You don't necessarily need to use it alongside the Obsidian app.
13
13
14
14
## About the fork
15
+
15
16
The original project has not been actively maintained for quite a while and with the ever-changing Neovim ecosystem, new widely used tools such as [blink.cmp](https://github.com/Saghen/blink.cmp) or [snacks.picker](https://github.com/folke/snacks.nvim/blob/main/docs/picker.md) were not supported.
16
17
With bugs, issues and pull requests piling up, people from the community decided to fork and maintain the project.
17
18
The fork aims to stay close to the original, but fix bugs, include and merge useful improvements, and ensure long term robustness.
@@ -47,54 +48,54 @@ The fork aims to stay close to the original, but fix bugs, include and merge use
47
48
48
49
### Commands
49
50
50
-
-`:ObsidianOpen [QUERY]` to open a note in the Obsidian app.
51
+
-`:Obsidian open [QUERY]` to open a note in the Obsidian app.
51
52
This command has one optional argument: a query used to resolve the note to open by ID, path, or alias. If not given, the note corresponding to the current buffer is opened.
52
53
53
-
-`:ObsidianNew [TITLE]` to create a new note.
54
+
-`:Obsidian new [TITLE]` to create a new note.
54
55
This command has one optional argument: the title of the new note.
55
56
56
-
-`:ObsidianQuickSwitch` to quickly switch to (or open) another note in your vault, searching by its name using [ripgrep](https://github.com/BurntSushi/ripgrep) with your preferred picker (see [plugin dependencies](#plugin-dependencies) below).
57
+
-`:Obsidian quickswitch` to quickly switch to (or open) another note in your vault, searching by its name using [ripgrep](https://github.com/BurntSushi/ripgrep) with your preferred picker (see [plugin dependencies](#plugin-dependencies) below).
57
58
58
-
-`:ObsidianFollowLink [vsplit|hsplit]` to follow a note reference under the cursor, optionally opening it in a vertical or horizontal split.
59
+
-`:Obsidian followlink [vsplit|hsplit]` to follow a note reference under the cursor, optionally opening it in a vertical or horizontal split.
59
60
60
-
-`:ObsidianBacklinks` for getting a picker list of references to the current buffer.
61
+
-`:Obsidian backlinks` for getting a picker list of references to the current buffer.
61
62
62
-
-`:ObsidianTags [TAG ...]` for getting a picker list of all occurrences of the given tags.
63
+
-`:Obsidian tags [TAG ...]` for getting a picker list of all occurrences of the given tags.
63
64
64
-
-`:ObsidianToday [OFFSET]` to open/create a new daily note. This command also takes an optional offset in days, e.g. use `:ObsidianToday -1` to go to yesterday's note. Unlike `:ObsidianYesterday` and `:ObsidianTomorrow` this command does not differentiate between weekdays and weekends.
65
+
-`:Obsidian today [OFFSET]` to open/create a new daily note. This command also takes an optional offset in days, e.g. use `:Obsidian today -1` to go to yesterday's note. Unlike `:Obsidian yesterday` and `:Obsidian tomorrow` this command does not differentiate between weekdays and weekends.
65
66
66
-
-`:ObsidianYesterday` to open/create the daily note for the previous working day.
67
+
-`:Obsidian yesterday` to open/create the daily note for the previous working day.
67
68
68
-
-`:ObsidianTomorrow` to open/create the daily note for the next working day.
69
+
-`:Obsidian tomorrow` to open/create the daily note for the next working day.
69
70
70
-
-`:ObsidianDailies [OFFSET ...]` to open a picker list of daily notes. For example, `:ObsidianDailies -2 1` to list daily notes from 2 days ago until tomorrow.
71
+
-`:Obsidian dailies [OFFSET ...]` to open a picker list of daily notes. For example, `:Obsidian dailies -2 1` to list daily notes from 2 days ago until tomorrow.
71
72
72
-
-`:ObsidianTemplate [NAME]` to insert a template from the templates folder, selecting from a list using your preferred picker. See ["using templates"](#using-templates) for more information.
73
+
-`:Obsidian template [NAME]` to insert a template from the templates folder, selecting from a list using your preferred picker. See ["using templates"](#using-templates) for more information.
73
74
74
-
-`:ObsidianSearch [QUERY]` to search for (or create) notes in your vault using `ripgrep` with your preferred picker.
75
+
-`:Obsidian search [QUERY]` to search for (or create) notes in your vault using `ripgrep` with your preferred picker.
75
76
76
-
-`:ObsidianLink [QUERY]` to link an inline visual selection of text to a note.
77
+
-`:Obsidian link [QUERY]` to link an inline visual selection of text to a note.
77
78
This command has one optional argument: a query that will be used to resolve the note by ID, path, or alias. If not given, the selected text will be used as the query.
78
79
79
-
-`:ObsidianLinkNew [TITLE]` to create a new note and link it to an inline visual selection of text.
80
+
-`:Obsidian linknew [TITLE]` to create a new note and link it to an inline visual selection of text.
80
81
This command has one optional argument: the title of the new note. If not given, the selected text will be used as the title.
81
82
82
-
-`:ObsidianLinks` to collect all links within the current buffer into a picker window.
83
+
-`:Obsidian links` to collect all links within the current buffer into a picker window.
83
84
84
-
-`:ObsidianExtractNote [TITLE]` to extract the visually selected text into a new note and link to it.
85
+
-`:Obsidian extractnote [TITLE]` to extract the visually selected text into a new note and link to it.
85
86
86
-
-`:ObsidianWorkspace [NAME]` to switch to another workspace.
87
+
-`:Obsidian workspace [NAME]` to switch to another workspace.
87
88
88
-
-`:ObsidianPasteImg [IMGNAME]` to paste an image from the clipboard into the note at the cursor position by saving it to the vault and adding a markdown image link. You can configure the default folder to save images to with the `attachments.img_folder` option.
89
+
-`:Obsidian pasteimg [IMGNAME]` to paste an image from the clipboard into the note at the cursor position by saving it to the vault and adding a markdown image link. You can configure the default folder to save images to with the `attachments.img_folder` option.
89
90
90
-
-`:ObsidianRename [NEWNAME] [--dry-run]` to rename the note of the current buffer or reference under the cursor, updating all backlinks across the vault. Since this command is still relatively new and could potentially write a lot of changes to your vault, I highly recommend committing the current state of your vault (if you're using version control) before running it, or doing a dry-run first by appending "--dry-run" to the command, e.g. `:ObsidianRename new-id --dry-run`.
91
+
-`:Obsidian rename [NEWNAME] [--dry-run]` to rename the note of the current buffer or reference under the cursor, updating all backlinks across the vault. Since this command is still relatively new and could potentially write a lot of changes to your vault, I highly recommend committing the current state of your vault (if you're using version control) before running it, or doing a dry-run first by appending "--dry-run" to the command, e.g. `:Obsidian rename new-id --dry-run`.
91
92
92
-
-`:ObsidianToggleCheckbox` to cycle through checkbox options.
93
+
-`:Obsidian togglecheckbox` to cycle through checkbox options.
93
94
94
-
-`:ObsidianNewFromTemplate [TITLE]` to create a new note from a template in the templates folder. Selecting from a list using your preferred picker.
95
+
-`:Obsidian newfromtemplate [TITLE]` to create a new note from a template in the templates folder. Selecting from a list using your preferred picker.
95
96
This command has one optional argument: the title of the new note.
96
97
97
-
-`:ObsidianTOC` to load the table of contents of the current note into a picker list.
98
+
-`:Obsidian toc` to load the table of contents of the current note into a picker list.
98
99
99
100
### Demo
100
101
@@ -110,11 +111,11 @@ The fork aims to stay close to the original, but fix bugs, include and merge use
110
111
111
112
Specific operating systems also require additional dependencies in order to use all of obsidian.nvim's functionality:
112
113
113
-
-**Windows WSL** users need [`wsl-open`](https://gitlab.com/4U6U57/wsl-open) for the `:ObsidianOpen` command.
114
-
-**MacOS** users need [`pngpaste`](https://github.com/jcsalterego/pngpaste) (`brew install pngpaste`) for the `:ObsidianPasteImg` command.
115
-
-**Linux** users need xclip (X11) or wl-clipboard (Wayland) for the `:ObsidianPasteImg` command.
114
+
-**Windows WSL** users need [`wsl-open`](https://gitlab.com/4U6U57/wsl-open) for the `:Obsidian open` command.
115
+
-**MacOS** users need [`pngpaste`](https://github.com/jcsalterego/pngpaste) (`brew install pngpaste`) for the `:Obsidian pasteimg` command.
116
+
-**Linux** users need xclip (X11) or wl-clipboard (Wayland) for the `:Obsidian pasteimg` command.
116
117
117
-
Search functionality (e.g. via the `:ObsidianSearch` and `:ObsidianQuickSwitch` commands) also requires a picker such [telescope.nvim](https://github.com/nvim-telescope/telescope.nvim) (see [plugin dependencies](#plugin-dependencies) below).
118
+
Search functionality (e.g. via the `:Obsidian search` and `:Obsidian quickswitch` commands) also requires a picker such [telescope.nvim](https://github.com/nvim-telescope/telescope.nvim) (see [plugin dependencies](#plugin-dependencies) below).
118
119
119
120
### Install and configure
120
121
@@ -419,7 +420,7 @@ This is a complete list of all of the options that can be passed to `require("ob
419
420
substitutions= {},
420
421
},
421
422
422
-
-- Optional, by default when you use `:ObsidianFollowLink` on a link to an external
423
+
-- Optional, by default when you use `:Obsidian followlink` on a link to an external
423
424
-- URL it will be ignored but you can customize this behavior here.
424
425
---@paramurlstring
425
426
follow_url_func=function(url)
@@ -430,7 +431,7 @@ This is a complete list of all of the options that can be passed to `require("ob
430
431
-- vim.ui.open(url) -- need Neovim 0.10.0+
431
432
end,
432
433
433
-
-- Optional, by default when you use `:ObsidianFollowLink` on a link to an image
434
+
-- Optional, by default when you use `:Obsidian followlink` on a link to an image
434
435
-- file it will be ignored but you can customize this behavior here.
435
436
---@paramimgstring
436
437
follow_img_func=function(img)
@@ -443,7 +444,7 @@ This is a complete list of all of the options that can be passed to `require("ob
-- Optional, set to true to force ':ObsidianOpen' to bring the app to the foreground.
447
+
-- Optional, set to true to force ':Obsidian open' to bring the app to the foreground.
447
448
open_app_foreground=false,
448
449
449
450
picker= {
@@ -467,7 +468,7 @@ This is a complete list of all of the options that can be passed to `require("ob
467
468
468
469
-- Optional, sort search results by "path", "modified", "accessed", or "created".
469
470
-- The recommend value is "modified" and `true` for `sort_reversed`, which means, for example,
470
-
-- that `:ObsidianQuickSwitch` will show the notes sorted by latest modified time
471
+
-- that `:Obsidian quickswitch` will show the notes sorted by latest modified time
471
472
sort_by="modified",
472
473
sort_reversed=true,
473
474
@@ -554,12 +555,12 @@ This is a complete list of all of the options that can be passed to `require("ob
554
555
555
556
-- Specify how to handle attachments.
556
557
attachments= {
557
-
-- The default folder to place images in via `:ObsidianPasteImg`.
558
+
-- The default folder to place images in via `:Obsidian pasteimg`.
558
559
-- If this is a relative path it will be interpreted as relative to the vault root.
559
560
-- You can always override this per image by passing a full path to the command instead of just a filename.
560
561
img_folder="assets/imgs", -- This is the default
561
562
562
-
-- Optional, customize the default name or prefix when pasting images via `:ObsidianPasteImg`.
563
+
-- Optional, customize the default name or prefix when pasting images via `:Obsidian pasteimg`.
563
564
---@returnstring
564
565
img_name_func=function()
565
566
-- Prefix image names with timestamp.
@@ -807,4 +808,5 @@ And keep in mind that to reset a configuration option to `nil` you'll have to us
807
808
Please read the [CONTRIBUTING](https://github.com/obsidian-nvim/obsidian.nvim/blob/main/.github/CONTRIBUTING.md) guide before submitting a pull request.
808
809
809
810
## Acknowledgement
811
+
810
812
We would like to thank [epwalsh](https://github.com/epwalsh) for creating this beautiful plugin. If you're feeling especially generous, [he still appreciates some coffee funds! ❤️](https://www.buymeacoffee.com/epwalsh).
0 commit comments