Giter VIP home page Giter VIP logo

ahk.v2.autosnipp-'s Introduction

odsbn-autosnipp.ahk :

For use with Obsidian.md.

update 20200806 : now works with AutoHotkey ANSI (obsidian-autosnipp_A) or Unicode (obsidian-autosnipp_U)

a quick way to create reference blocks/transclusions from text selection with CTRL SHIFT X / CTRL V.
You can also clone a block with CTRL SHIFT C

HOW:

  • before first use: edit the .ahk to configure your destination folder and naming convention.
  • select a block of text and use CTR+SHIFT+X (or CTRL+SHIFT+C for copy) to cut the selected text into a NEW FILE in the /snippets directory of your vault (create the folder beforehand to avoid problems). The file will be named in the format :
    yourvault/snippets/yyyyMM/xx_yyyyMMhhmmss-msec_%sourcewindowtitle%.md and the link to the file is put in the clipboard, ready to be pasted as an Obsidian transclusion (with the format ![[%yourfile%]]).

WHY:

since Obsidian doesn't have block-level transclusions, this is a quick hack to get the same functionnality, but manually. Select your text, hit the shortcut, the selection is now a file that can be referenced elsewhere and modified, thus making clones or instances.

KNOWN ISSUES :

if you are using Autohotkey Unicode, run obsidian-autosnipp_U.ahk, if you are using Autohotkey Ansi, run obsidian-autosnipp_A.ahk, or else you will get errors.

SCREENSHOTS :

obsdn-autosnipp-demo.gif

the ahk script will save the selected text into a new markdown file in a specified obsidian vault. The script will put the link to the new file in the clipboard, ready to be pasted as a transclusion in Obsidian.

Obsidian-autosnipp.png obsdn-autosnipp_firefox.png

ahk.v2.autosnipp-'s People

Contributors

cannibalox avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.