Merge branch 'main' into RenameNote

This commit is contained in:
lambtho12
2022-01-20 16:59:36 +01:00
2 changed files with 30 additions and 9 deletions

View File

@@ -197,9 +197,24 @@ Other plugins I find useful in my day-to-day zettelkasten work:
Somewhere in your vim config, put a snippet like this: Somewhere in your vim config, put a snippet like this:
**Windows and macOS** users, please note: While this plugin works on Windows and macOS, it was not specifically designed
to support Windows well. Even on macOS, some of the features like image preview will not work out-of-the-box.
To avoid the most common Windows issue:
- Best option: don't use Windows if possible
- Second best option: try WSL2 on Windows and pretend you're on Linux
- if you **must** use Windows, use `/Users/myname/zettelkasten` instead of `~/zettelkasten`
- **NEVER** use `C:\Users\myname` style paths
```lua ```lua
lua << END lua << END
local home = vim.fn.expand("~/zettelkasten") local home = vim.fn.expand("~/zettelkasten")
-- NOTE for Windows users:
-- - don't use Windows
-- - try WSL2 on Windows and pretend you're on Linux
-- - if you **must** use Windows, use "/Users/myname/zettelkasten" instead of "~/zettelkasten"
-- - NEVER use "C:\Users\myname" style paths
require('telekasten').setup({ require('telekasten').setup({
home = home, home = home,
@@ -313,6 +328,11 @@ END
| setting | description | example | | setting | description | example |
| --- | --- | --- | | --- | --- | --- |
| `home` | path to your zettelkasten folder (folder with markdown files) | ~/zettelkasten | | `home` | path to your zettelkasten folder (folder with markdown files) | ~/zettelkasten |
| | NOTE for Windows users: | |
| | - don't use Windows | |
| | - try WSL2 on Windows and pretend you're on Linux | |
| | - if you **must** use Windows, use `/Users/myname/zettelkasten` instead of `~/zettelkasten` | |
| | - **NEVER** use `C:\Users\myname` style paths | |
| **`take_over_my_home`** | if set to `true` (default), telekasten will take over your home. Any notes from the configured `home` directory will receive a `set filetype=telekasten`, no matter if opened by telekasten or another way. | true | | **`take_over_my_home`** | if set to `true` (default), telekasten will take over your home. Any notes from the configured `home` directory will receive a `set filetype=telekasten`, no matter if opened by telekasten or another way. | true |
| `dailies` | path where your daily notes go | ~/zettelkasten/daily | | `dailies` | path where your daily notes go | ~/zettelkasten/daily |
| `weeklies` | path where your weekly notes go | ~/zettelkasten/weekly | | `weeklies` | path where your weekly notes go | ~/zettelkasten/weekly |
@@ -577,25 +597,25 @@ The following links are supported:
```markdown ```markdown
# Note links # Note links
- [[A cool title]] ................. links to the note named 'A cool title' - [[A cool title]] ................. links to the note named 'A cool title'
- [[A cool title#Heading 27]] ...... links to the heading 'Heading 27' within the note - [[A cool title#Heading 27]] ...... links to the heading 'Heading 27' within the note
named 'A cool title' named 'A cool title'
- [[A cool title#^xxxxxxxx]] ....... links to the paragraph with id ^xxxxxxxx within the note - [[A cool title#^xxxxxxxx]] ....... links to the paragraph with id ^xxxxxxxx within the note
named 'A cool title' named 'A cool title'
- [[#Heading 27]] .................. links to the heading 'Heading 27' within all notes - [[#Heading 27]] .................. links to the heading 'Heading 27' within all notes
- [[#^xxxxxxxx]] ................... links to the paragraph with id ^xxxxxxxx within all notes - [[#^xxxxxxxx]] ................... links to the paragraph with id ^xxxxxxxx within all notes
## Optionally, notes can live in specific sub-directories ## Optionally, notes can live in specific sub-directories
- [[some/subdirectory/A cool title]] ................. links to note named 'A cool title' - [[some/subdirectory/A cool title]] ................. links to note named 'A cool title'
in some/subdirectory in some/subdirectory
- [[some/subdirectory/A cool title#Heading 27]] ...... links to the heading 'Heading 27' within - [[some/subdirectory/A cool title#Heading 27]] ...... links to the heading 'Heading 27' within
the note named 'A cool title' the note named 'A cool title'
in some/subdirectory in some/subdirectory
- [[some/subdirectory/A cool title#^xxxxxxxx]] ....... links to the paragraph with - [[some/subdirectory/A cool title#^xxxxxxxx]] ....... links to the paragraph with
id ^xxxxxxxx within the note named id ^xxxxxxxx within the note named
'A cool title' in some/subdirectory 'A cool title' in some/subdirectory
# Media links # Media links
Use these for images, PDF files, videos. If telescope-media-files is installed, these can Use these for images, PDF files, videos. If telescope-media-files is installed, these can
be previewed. be previewed.
- ![optional title](path/to/file) ... links to the file `path/to/file` - ![optional title](path/to/file) ... links to the file `path/to/file`
``` ```
@@ -618,7 +638,7 @@ Regarding linking to paragraphs: The `^blockid` notation is supported by more an
illustrated below. illustrated below.
```markdown ```markdown
Here we have a line or even a paragraph. Here we have a line or even a paragraph.
We don't want to have a block id dangling We don't want to have a block id dangling
at the end of a line. So instead, we just at the end of a line. So instead, we just
put it in the next one. put it in the next one.

View File

@@ -966,6 +966,7 @@ local function find_files_sorted(opts)
local function entry_maker(entry) local function entry_maker(entry)
local iconic_entry = {} local iconic_entry = {}
iconic_entry.value = entry iconic_entry.value = entry
iconic_entry.path = entry
iconic_entry.ordinal = entry iconic_entry.ordinal = entry
if opts.show_link_counts then if opts.show_link_counts then
iconic_entry.display = make_display iconic_entry.display = make_display