Evernote Markdown Sublime實現


版權聲明:

歡迎轉載,但請保留文章原始出處

作者:GavinCT

出處:http://www.cnblogs.com/ct2011/p/3996164.html

Evernote無法實現markdown一直是個缺陷。
本來馬克飛象已經解決了這一難題,可是馬克飛象近日又開始收費(本來官網上測試專業版的時候說未來會有專業版和免費版的區分,但是專業版正式推出的時候卻宣布必須付費,實在是言行不一啊)。
沒錢的我已經習慣了markdown的書寫,因此一直找尋Evernote markdown的解決方案。
最后發現了神器:Sublime的Evernote插件。
先上效果圖,然后我們再繼續~
Evernote Markdown Sublime 效果圖

安裝基本步驟

官方資料

內含安裝步驟和使用教程(英文)

我的配置及改進

快捷鍵配置改進

Preferences--> Key Bindings-User

官方給出的快捷鍵配置及介紹

The plugin does not install keymaps, if you wish you may add a variation of the following to your user keymaps:

{ "keys": ["super+e"], "command": "show_overlay", "args": {"overlay": "command_palette", "text": "Evernote: "} },
{ "keys": ["ctrl+e", "ctrl+s"], "command": "send_to_evernote" },
{ "keys": ["ctrl+e", "ctrl+o"], "command": "open_evernote_note" },
{ "keys": ["ctrl+e", "ctrl+u"], "command": "save_evernote_note" },

you can also overwrite the standard “save” bindings for Evernote notes as follows:

{ "keys": ["ctrl+s"], "command": "save_evernote_note", "context": [{"key": "evernote_note"}] },
{ "keys": ["ctrl+s"], "command": "send_to_evernote", "context": [{"key": "evernote_note", "operator": "equal", "operand": false}, {"key": "selector", "operator": "equal", "operand": "text.html.markdown.evernote"}] },

注:super代表Windows鍵或者Command鍵(Mac)

  • 問題1:Windows鍵在Win8系統全被系統截獲響應,自定義快捷鍵應盡量避免。顯然官方給出的第一個快捷鍵在Windows8下不會有響應。
  • 問題2:新建一篇筆記才有send的必要,已經新建好的筆記只需要save就可以了。所以如果要使用官方給出的快捷鍵,盡量不要直接將兩者拼合使用,盡管不會出現什么問題。

我的配置

[
    { "keys": ["ctrl+shift+e"], "command": "show_overlay", "args": {"overlay": "command_palette", "text": "Evernote: "} },
    { "keys": ["ctrl+e", "ctrl+s"], "command": "send_to_evernote" },
    { "keys": ["ctrl+e", "ctrl+o"], "command": "open_evernote_note" },
    { "keys": ["ctrl+e", "ctrl+n"], "command": "new_evernote_note" },
    { "keys": ["ctrl+s"], "command": "save_evernote_note", "context": [{"key": "evernote_note"}] },
    { "keys": ["ctrl+s"], "command": "send_to_evernote", "context": [{"key": "evernote_note", "operator": "equal", "operand": false}, {"key": "selector", "operator": "equal", "operand": "text.html.markdown.evernote"}] }

]
  • 使用ctrl+shift+e直接調用與Evernote相關的Menu。不常用的此插件功能可以通過此快捷鍵調出menu后查詢使用。

  • 加入了新建筆記快捷鍵("ctrl+e", "ctrl+n" 連續按鍵,其他綁定兩個鍵的使用方式相同)

  • 新建一篇筆記,由於沒有保存前還不是evernote_note的環境("context": [{"key": "evernote_note"}]),所以需要send的快捷鍵。一旦創建成功或者是編輯以前的筆記,才有save的需求,所以有

    { "keys": ["ctrl+s"], "command": "save_evernote_note", "context": [{"key": "evernote_note"}] }
    

的配置。

備注:使用新建快捷鍵之后,使用ctrl+s無效。所以懷疑官方給出的最后一個快捷鍵(send)配置沒有生效。只能通過 "ctrl+e", "ctrl+s" ,暫時保留沒有做深入研究。
深入研究資料保留: Sublime快捷鍵配置官方介紹

還有一個比較怪異的現象是:
如果我把keys的綁定都綁定成一個鍵,即替換sublime本身的ctrl+s、 ctrl+n、 ctrl+o ,放棄先敲一個ctrl+e的策略。
ctrl+s可以看到效果, ctrl+n、ctrl+o均無效。

markdown渲染樣式改造(主要是代碼)

Preferences--> Package Settings --> Evernote --> Settings-User

{
    "noteStoreUrl": "http://app.yinxiang.com/……",
    "token": "………………………………",
    "inline_css": {
        "pre": "color: #000000; font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 14px; white-space: pre-wrap; word-wrap: break-word; background-color: #f8f8f8; border: 1px solid #cccccc; border-radius: 3px; overflow: auto; padding: 6px 10px; margin-bottom: 10px;",
        "code": "color: black; font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 14px;"

    },
    "code_highlighting_style": "github"
}

主要更改:

  • font-family: Menlo, Monaco, Consolas, Courier New, monospace; (參照了馬克飛象的字體選擇)
  • font-size: 14px; (Windows和Android顯示效果妥協的結果)
  • "code_highlighting_style": "github" (嘗試了幾種都很難看,最后還是用了這個,這個是默認的,可以不用設置)


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM