補上 WordPress 編輯器的 accesskey

WordPress 編輯文章時我還是習慣用傳統編輯界面自己修改主要的 html tag,像是這樣:

上面那些按鈕在很久以前的版本透過 accesskey 用鍵盤快速輸入各種連結與效果,但後來就被拿掉了... 不過可以在「Adding WordPress Custom QuickTags」這邊看到一些文章有提到過。

研究了一下 WordPress 的 minimal plugin 有哪些東西,看起來也不難寫,就花了些時間用 js 操作,這樣編輯起來方便多了... 程式包起來放到 gslin/wp-editor-accesskey 上,有需要的也可以拿去用,不過我猜現在還這樣寫文章的人不多了...

換到 vim-polyglot 上...

在「A guide to setting up Vim for JavaScript development」這邊看到可以用 sheerun/vim-polyglot 吃多種語言:

Vim supports basic syntax highlighting for JavaScript but I found it suboptimal especially when it comes to modern ES2015+ syntax, and it doesn’t support JSX when working with React. I found that vim-javascript and vim-jsx solved my problems in both instances.

However, I later replaced those two with vim-polyglot which is a plugin that bundles several other syntax plugins for over 100 languages, and loads them on demand so that performance is not affected.

先前遇到新的語言就得去找新的 plugin 加,現在看起來可以用一套吃遍天下 (只要一直更新),換過去後先短暫的測了一下,沒什麼大問題...

WordPress 5.0 的編輯界面大改...

WordPress 升級到 5.0 後發現完全不會用新的編輯器了 (我是自己編 html 習慣了),去官方的 forum 上看一下有沒有其他人抱怨 (以及解法),看到「READ THIS FIRST WordPress 5.0 Master List」這篇公告。

公告裡提到可以裝「Classic Editor」這個 plugin 把舊的 editor 弄回來寫文章,而且這個 plugin 至少維護到 2022 年:

Classic Editor is an official WordPress plugin, and will be maintained until at least 2022.

本來打算要 downgrade 回舊版... 目前看起來還可以撐一段時間。

CKEditor 的 Collaborative Editing

CKEditor 的文章,說明他們在研究共同編輯產品 Collaborative editing 時遇到的問題以及設計,算是帶一些技術性質的行銷文章:「Lessons learned from creating a rich-text editor with real-time collaboration」。

就技術上應該會需要 Websocket 之類的服務即時更新 (至少會需要 HTTPS long polling)。頁面上看起來是賣服務的產品,然後有提到 30 天試用:

Implement real-time collaboration in your web application by choosing one of the solutions. Both solutions offer a commitment-free 30 day free trial so you can take your time before you make the final decision.

價錢要登入才看得到,而目前不接受開放註冊,需要邀請...

Matt Mullenweg 決定對 React 的專利議題投下反對票

React 的專利問題繼續燒... (可以參考「React 的專利授權議題」,不過陸陸續續還有發生一些事情沒寫...)

Facebook 表態他們不會修改 React 的條款後,Matt Mullenweg (WordPress 的共同創造人,以及 WordPress.com 現在的老大) 直接宣佈了 Gutenberg (WordPress 新的 editor) 將全面停用 React 改用新的 library 開發:

[...] I'm here to say that the Gutenberg team is going to take a step back and rewrite Gutenberg using a different library. It will likely delay Gutenberg at least a few weeks, and may push the release into next year.

算是相當大的一個決策改變...

這件事情剛好讓人想到當年 MovableType 因為 license 問題而失勢 (而讓 WordPress 長起來),究竟 React 會不會逐漸被取代呢...

打數學式子的工具

看到 Mathcha 這個網站,除了可以輸入 TeX 的公式外,也有 WYSIWYG 的方式輸入,而最後可以輸出成各種格式 (包括 TeX),或是直接丟連結給其他人:

輸入的部份,對於不知道的符號葉可以用畫的 XD

然後網站上的標示寫沒有支援 IE 與 Edge,不知道是真得不支援還是沒列上去而已... XD

Vim 的 Easy Mode

Twitter 上看到 Vim 的 Easy Mode 是無法直接用 :q! 直接離開的,對於用 Vim 用很久的人反而不知道怎麼辦 XDDD:

因為知道是 -y,所以查了 manual 後發現是 easy mode。有了關鍵字後解法就很好找了,是「How to quit vim's easy mode (vim -y)」這篇,先用 Ctrl-L 回到 Normal Mode 再用 :q! 離開...

對純文字格式的推廣

在「The future of education is plain text」這邊看到對純文字格式的推廣 XDDD

作者提出了五點:

  • Plain text is always compatible
  • Plain text is easy to mix and match
  • Plain text is easy to maintain
  • Plain text is lightweight
  • Plain text is always forward compatible

是沒錯啦,把力氣專注在內容本身,而不是一堆格式上...

這讓我想起 George R. R. MartinConan 上提到他是用 WordStar 4.0 寫《冰與火之歌》的採訪片段:

StackOverflow 上離開 Vim 方法的文章...

被拿出來當 PR 宣傳了:「Stack Overflow: Helping One Million Developers Exit Vim」。

由於 Vim 是 Unix-like 系統一定會內建的 editor,所以常常被拿來放在 tutorial 裡面 (考慮到普及性,但完全不熟的初學者就...),或是不小心在輸入 vipw 或是 visudo 之類的指令就中獎了:

可以看到 pageview 破一百萬次了 XDDD 而且流量也都很穩定:

依照地區來拆開的話:(不過沒有照人口數正規化...)

然後做交叉分析,看這些卡在 Vim 的人平常是看什麼其他的文章:

回到資料分析的角度來看,這些東西可以透過有 cookie 的 access log 做到。有 access log 後可以用 Google CloudBigQuery,也可以用 AWS 家的 Amazon Athena 做。

Vim 8.0...

Vim 版號進到 8.0 了:「Vim 8.0 released!」,從 GitHub 上的記錄可以看到「updated for version 7.0」是 2006 年五月的事情了。

新的 feature 包括了 packages...?所以 Vim 自己也要搞一套 package 系統了嗎... 還沒仔細看,不知道跟 Vundle 的關係不知道會變成什麼樣子 @_@

Among the new features are:
- Asynchronous I/O support, channels, JSON
- Jobs
- Timers
- Partials, Lambdas and Closures
- Packages
- New style testing
- Viminfo merged by timestamp
- GTK+ 3 support
- MS-Windows DirectX support