Skip to content

Instantly share code, notes, and snippets.

摘要

使用 Neovim ,搭配下述之插件(Plugins),即可令 Markdown 文檔化為:需求分析與 功能設計之文件製作工具。

Neovim 插件

return {
  -- Open URI with your favorite browser from Neovim

摘要

使用 W3C Ruby Tag ,為「漢字」標示河洛話「注音」。

【排版需求】:

版面為漢字自左到右横排;注音顯示有二: (1)方音符號:置於漢字右側; (2)台羅拼音:放在漢字下方。

@AlanJui
AlanJui / gist:0c3cca1db3f4043af00f75128a0ba4a2
Created May 10, 2022 09:23
使用 LaTeX 為漢字標注音範例
\documentclass[]{article}
\usepackage[UTF8]{ctex}
%\usepackage[paperwidth=21cm,paperheight=29.7cm]{geometry}
\usepackage{geometry}
\geometry{a4paper,left=1cm,right=1cm,top=3cm,bottom=3cm}
\usepackage{xeCJK}
\setCJKmainfont{Noto Serif CJK TC}
\setmainfont{AR PL UMing TW}
\usepackage{ruby}
\renewcommand\rubysep{-0.6em}
-- Plugin Manager: install plugins
-----------------------------------------------------------
local vim = vim
local execute = vim.api.nvim_command
local fn = vim.fn
local package_root = require('utils').get_package_root()
local install_path = require('utils').get_install_path()
local compile_path = require('utils').get_compile_path()
local packer_bootstrap
@AlanJui
AlanJui / pyright_err.md
Last active November 27, 2020 14:59
可以正常編輯、執行的 Django 專案,卻總是看到由 Pyright 發出的錯誤警示。 [Pyright (reportMissingImports)] [E] Import "django.xxx" could not be resolved

我有一個 Django 專案,可以進行程式碼編輯;也能正常啟動及執行(python manage.py runserver)。

但很奇怪,在 Nvim 編輯器裡,總是會看到「由 Pyright 發出的錯誤警示訊息,告知我 django module 無法正常匯入」:

由於,使用 Nvim 編輯原始程式碼時,auto-completion 能正常運作,所以,故而推斷:Virtualenv、Python interpreter、 coc.nvim 及 coc-python 這些該有的設定,應為正確無誤。但為什麼 Pyright 卻老是認定:無法 import django 模組呢?!

在網路上找尋問題的解答許久,在幾乎放棄的時候,竟意外的看到了這篇發文 https://hanspinckaers.com/fixing-coc-pyright-and-anaconda-import-errors ,故而推斷我的問題,其導因很可能出自:「專案根目錄未放置 Pyright 設定檔(configuration file)所致」。

經過下述之驗證作業後,終於透過實驗證實,上述問題導因之判斷是正確的。

@AlanJui
AlanJui / .tmux.conf
Last active December 8, 2019 16:42
適用於 Ubuntu 18.04 的 Tmux 環境設定
# https://tmuxguide.readthedocs.io/en/latest/tmux/tmux.html#tmux-conf
#========================================================
# Tmux Plugins
#========================================================
# Tmux Plugin Manager
if "test ! -d ~/.tmux/plugins/tpm" \
"run 'git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm && ~/.tmux/plugins/tpm/bin/install_plugins'"

執行完 pipenv 後 Shell Prompt 怪怪的

使用 ZSH 當成 macOS 在 Command Line 的操作介面,天空是藍色的,配合 pipenv 的使用,Python 虛擬環境的運作正常。

但是這個看來賞心悅目的操作介面,在撰寫技術文件的時候,卻是個麻煩。因為在 Copy / Paste ,置入了文字編輯器後,呈現的系「亂碼二分之一」不忍卒睹的結果! 😿

剛完成 macOS升級,git 卻掛了!!

剛完成 macOS 作業系統的昇級,開始進入了 Catalina 10.15 這個新世界!

為了想知道目前正進行中的專案,有那些文件檔、程式碼已有更新,我想做個版本變更的存檔。

指尖在鍵盤上輕快地飛舞ing……

打開「終端機」,輸入指令:

在 macOS Catlina 安裝 Vue.js

安裝作業

【參考文件】: https://cli.vuejs.org/guide/prototyping.html

安裝前準備

Vue CLI 需搭配 Node.js 版本 8.11.0+ 。故請先用以下指令檢查目前使用中之 Node.js 版本。