6

Obsidian 中使用 Vim 模式并配置 Vimrc

 2 years ago
source link: https://einverne.github.io/post/2022/07/obsidian-vim-and-vimrc.html
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

Obsidian Commands

安装 Vimrc 支持插件之后作者定义了一个 Ex command 叫做 obcommand 来执行不同的 Obsidian 命令。

在 Obsidian 中执行 : obcommand [commandName] 可以执行命令:

作者在 GitHub 上说在编辑器中执行 : obcommand 会展示出当前支持的 obcommand 命令列表,但我尝试之后并没有作用,把 Obsidian 升级到最新的 0.15.9 也不管用。

并且尝试使用 surround ,目前好像也有 BUG。

目前支持的 obcommand 列表:

app:delete-file Delete current file –
app:go-back Navigate back Ctrl+Alt+ArrowLeft
app:go-forward Navigate forward Ctrl+Alt+ArrowRight
app:open-help Open help F1
app:open-settings Open settings Ctrl+,
app:open-vault Open another vault –
app:reload Reload app without saving –
app:show-debug-info Show debug info –
app:toggle-default-new?pane-mode Toggle default new pane mode –
app:toggle-left-sidebar Toggle left sidebar –
app:toggle-right-sidebar Toggle right sidebar –
backlink:open Backlinks: Show backlinks pane –
backlink:open-backlinks Backlinks: Open backlinks for the current file –
backlink:toggle-backlinks-in?document Backlinks: Toggle backlinks in document –
command-palette:open Command palette: Open command palette Ctrl+P
dataview:dataview-drop?cache Dataview: Drop All Cached File Metadata –
dataview:dataview-force?refresh-views Dataview: Force Refresh All Views and Blocks –
editor:attach-file Insert attachment –
editor:context-menu Show context menu under cursor –
editor:cycle-list-checklist Cycle bullet/checkbox –
editor:delete-paragraph Delete paragraph Ctrl+D
editor:focus Focus on last note –
editor:focus-bottom Focus on pane below –
editor:focus-left Focus on pane to the left –
editor:focus-right Focus on pane to the right –
editor:focus-top Focus on pane above –
editor:fold-all Fold all headings and lists –
editor:follow-link Follow link under cursor Alt+Enter
editor:insert-callout Insert callout –
editor:insert-embed Add embed –
editor:insert-link Insert Markdown link Ctrl+K
editor:insert-tag Add tag –
editor:insert-wikilink Add internal link –
editor:open-link-in-new-leaf Open link under cursor in new pane Ctrl+Alt+Enter
editor:open-search Search current file Ctrl+F
editor:open-search-replace Search & replace in current file Ctrl+H
editor:rename-heading Rename this heading... –
editor:save-file Save current file Ctrl+S
editor:set-heading Toggle heading –
editor:swap-line-down Move line down –
editor:swap-line-up Move line up –
editor:toggle-blockquote Toggle blockquote –
editor:toggle-bold Toggle bold Ctrl+B
editor:toggle-bullet-list Toggle bullet list –
editor:toggle-checklist?status Toggle checkbox status Ctrl+Enter
editor:toggle-code Toggle code –
editor:toggle-comments Toggle comment Ctrl+/
editor:toggle-fold Toggle fold on the current line –
editor:toggle-highlight Toggle highlight –
editor:toggle-italics Toggle italics Ctrl+I
editor:toggle-numbered-list Toggle numbered list –
editor:toggle-source Toggle Live Preview/Source mode –
editor:toggle-spellcheck Toggle spellcheck –
editor:toggle-strikethrough Toggle strikethrough –
editor:unfold-all Unfold all headings and lists –
file-explorer:move-file File explorer: Move file to another folder –
file-explorer:new-file Create new note Ctrl+N
file-explorer:new-file-in-new?pane Create note in new pane Ctrl+Shift+N
file-explorer:open File explorer: Show file explorer –
file-explorer:reveal-active- file
File explorer: Reveal active file in navigation
file-recovery:open File recovery: Open saved snapshots –
global-search:open Search: Search in all files Ctrl+Shift+F
graph:animate Graph view: Start graph timelapse animation
graph:open Graph view: Open graph view Ctrl+G
graph:open-local Graph view: Open local graph –
markdown-importer:open Format converter: Open format converter
markdown:toggle-preview Toggle reading view Ctrl+E
note-composer:extract?heading Note composer: Extract this heading... –
note-composer:merge-file Note composer: Merge current file with another file... –
note-composer:split-file Note composer: Extract current selection... –
open-with-default-app:open Open in default app –
open-with-default-app:show Show in system explorer –
outgoing-links:open Outgoing Links: Show outgoing links pane
outgoing-links:open-for?current Outgoing Links: Open outgoing links for the current file –
switcher:open Quick switcher: Open quick switcher Ctrl+O
theme:use-dark Use dark mode –
theme:use-light Use light mode –
window:toggle-always-on?top Toggle window always on top –
workspace:close Close active pane Ctrl+W
workspace:close-others Close all other panes –
workspace:copy-path Copy file path –
workspace:copy-url Copy Obsidian URL –
workspace:edit-file-title Edit file title F2
workspace:export-pdf Export to PDF –
workspace:move-to-new?window Move current pane to new window –
workspace:open-in-new?window Open current pane in new window –
workspace:split-horizontal Split horizontally –
workspace:split-vertical Split vertically –
workspace:toggle-pin Toggle pin –
workspace:undo-close-pane Undo close pane Ctrl+Shift+T

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK