From 3f55d01e4a231ba5f8a5edede57aa020244e04ef Mon Sep 17 00:00:00 2001 From: KemoNine Date: Thu, 25 Aug 2022 11:14:22 -0400 Subject: [PATCH] setup markdown preview mode in code profile --- _setup.sh | 47 ++++++++++++++++++++++++----------------------- code/init.el | 13 +++++++++++++ 2 files changed, 37 insertions(+), 23 deletions(-) diff --git a/_setup.sh b/_setup.sh index e13e699..9e36fd1 100755 --- a/_setup.sh +++ b/_setup.sh @@ -1,23 +1,24 @@ -#!/bin/bash - -# kemo setup -if [[ ! -d ~/.emacs.d.profiles ]]; then - git clone https://git.kemonine.info/kemonine/dotfiles.git ~/.emacs.d.profiles -fi - -# multi profile -if [[ ! -d ~/.emacs.d ]]; then - git clone https://github.com/plexus/chemacs2.git ~/.emacs.d -fi - -# profiles -rm ~/.emacs-profiles.el -if grep -q "Android" <<< `uname -a`; then - ln -s ~/.emacs.d.profiles/.emacs-profiles-mobile.el ~/.emacs-profiles.el -else - ln -s ~/.emacs.d.profiles/.emacs-profiles.el ~/.emacs-profiles.el -fi - -# dont forget to pre-compile elisp / install plugins -cat ~/.emacs-profiles.el -echo "run emacs with each profile in '~/.emacs-profiles.el'" +#!/bin/bash + +# kemo setup +if [[ ! -d ~/.emacs.d.profiles ]]; then + git clone https://git.kemonine.info/kemonine/dotfiles.git ~/.emacs.d.profiles +fi + +# multi profile +if [[ ! -d ~/.emacs.d ]]; then + git clone https://github.com/plexus/chemacs2.git ~/.emacs.d +fi + +# profiles +rm ~/.emacs-profiles.el +if grep -q "Android" <<< `uname -a`; then + ln -s ~/.emacs.d.profiles/.emacs-profiles-mobile.el ~/.emacs-profiles.el +else + ln -s ~/.emacs.d.profiles/.emacs-profiles.el ~/.emacs-profiles.el +fi + +# dont forget to pre-compile elisp / install plugins +cat ~/.emacs-profiles.el +echo "run emacs with each profile in '~/.emacs-profiles.el'" +echo "install multimarkdown (windows bin release + add to emacs path like sqlite3)" diff --git a/code/init.el b/code/init.el index 65dcfda..6077d24 100644 --- a/code/init.el +++ b/code/init.el @@ -20,6 +20,7 @@ ; add executables to path ahead of them being used by extensions / emacs stuff (add-to-list 'exec-path "C:/Users/mcros/OneDrive/Programs/PortableApps/sqlite3") + (add-to-list 'exec-path "C:/Users/mcros/OneDrive/Programs/PortableApps/MultiMarkdown-Windows-6.6.0/bin") ) (when kmn/is-termux ; setup storage locations -- cheat so mobile/desktop look alike for file urls @@ -82,6 +83,18 @@ ("\\.markdown\\'" . markdown-mode)) :init (setq markdown-command "multimarkdown")) +(use-package markdown-preview-mode + :ensure t + :if (boundp 'mdcommand) + :init + ;(setq markdown-preview-auto-open nil) + :custom + (markdown-preview-ws-port 9697) + (markdown-preview-http-port 9696) + (markdown-preview-host "127.0.0.1") + (markdown-preview-http-host "127.0.0.1")) +(setq markdown-preview-stylesheets (list "https://cdnjs.cloudflare.com/ajax/libs/github-markdown-css/3.0.1/github-markdown.min.css")) + ; lua (autoload 'lua-mode "lua-mode" "Lua editing mode." t) (add-to-list 'auto-mode-alist '("\\.lua$" . lua-mode))