browser vi navigation

  • vimium-c and vimium-ff
?       show the help dialog for a list of all available keys
h       scroll left
j       scroll down
k       scroll up
l       scroll right
gg      scroll to top of the page
G       scroll to bottom of the page
d       scroll down half a page
u       scroll up half a page
f       open a link in the current tab
F       open a link in a new tab
r       reload
gs      view source
i       enter insert mode -- all commands will be ignored until you hit Esc to exit
yy      copy the current url to the clipboard
yf      copy a link url to the clipboard
gf      cycle forward to the next frame
gF      focus the main/top frame

Navigating to new pages:

o       Open URL, bookmark, or history entry
O       Open URL, bookmark, history entry in a new tab
b       Open bookmark
B       Open bookmark in a new tab

Using find:

/       enter find mode
          -- type your search query and hit enter to search, or Esc to cancel
n       cycle forward to the next find match
N       cycle backward to the previous find match

Navigating your history:

H       go back in history
L       go forward in history

Manipulating tabs:

J, gT   go one tab left
K, gt   go one tab right
g0      go to the first tab. Use ng0 to go to n-th tab
g$      go to the last tab
^       visit the previously-visited tab
t       create tab
yt      duplicate current tab
x       close current tab
X       restore closed tab (i.e. unwind the 'x' command)
T       search through your open tabs
W       move current tab to new window
<a-p>   pin/unpin current tab

Using marks:

ma, mA  set local mark "a" (global mark "A")
`a, `A  jump to local mark "a" (global mark "A")
``      jump back to the position before the previous jump
          -- that is, before the previous gg, G, n, N, / or `a

Additional advanced browsing commands:

]], [[  Follow the link labeled 'next' or '>' ('previous' or '<')
          - helpful for browsing paginated sites
<a-f>   open multiple links in a new tab
gi      focus the first (or n-th) text input box on the page. Use <tab> to cycle through options.
gu      go up one level in the URL hierarchy
gU      go up to root of the URL hierarchy
ge      edit the current URL
gE      edit the current URL and open in a new tab
zH      scroll all the way left
zL      scroll all the way right
v       enter visual mode; use p/P to paste-and-go, use y to yank
V       enter visual line mode

logseq vi navigation

  • j: Move to next line. In visual block mode, it is for selecting down.

  • k : Move to previous line. In visual block mode, it is for selecting up.

  • h : Outdent.

  • l : Indent.

  • J : Move to next sibling. In visual block mode, it is for moving down.

  • K : Move to previous sibling. In visual block mode, it is for moving up.

  • H : Highlight focus out to parent level.

  • L : Highlight focus into child level.

  • a  and  A : Move the cursor to the end and enter edit mode.

  • i  and  I : Move the cursor to the beginning and enter edit mode.

  • yy : Copy current block content. Only supports one block – for copying multiple blocks, please use  cmd+c .

  • Y : Copy current block ref.

  • p : Paste clipboard content to next sibling. Only supports one block – for pasting multiple blocks, please use  cmd+v .

  • P : Paste clipboard content to previous sibling. Only supports one block – for pasting multiple blocks, please use  cmd+v .

  • o : Insert an empty block to next sibling.

  • O : Insert an empty block to previous sibling.

  • dd : Delete current block. Child blocks will also be deleted, but only current block content in the clipboard.

  • T : Scroll to top, because Logseq uses  gg  to go to graph view.

  • G : Scroll to bottom.

  • u : Undo.

  • ctrl+r : Redo.

  • gu : Change block content to lower case.

  • gU : Change block content to upper case.

  • mod+shift+u : Toggle block content between lower and upper case.

  • NUMBER + mod+shift+u : Trigger different case style, supports 1–16.

  • zo : Extend block.

  • zm : Collapse block.

  • zO : Extend block hierarchically.

  • zM : Collapse block hierarchically.

  • NUMBER + m : Save current page or block as a mark to  NUMBER  register.

  • NUMBER + ' : Load saved mark on main region.

  • NUMBER + mod+' : Load saved mark on right sidebar.

  • cmd+j cmd+j : Exit editing mode.  ctrl+[  does the same thing.

  • mod+alt+j : Join next sibling block.

  • mod+shift+enter : Jumping into internal page or tag.

  • mod+shift+;  and  mod+alt+; : Trigger command mode. This provides many handy commands to use, explained below.

  • ctrl+a : Increase the first found number in block. Supports multiple selections and combo.

  • ctrl+x : Decrease the first found number in block. Supports multiple selections and combo.

  • x : Cut a leading character. Supports multiple selections.

  • x : Cut a leading word. Supports multiple selections.

  • / : Trigger search in page bar on the below. Supports smartcase.

  • n : Search next search match.

  • N : Search previous search match.

  • sb : Search block content in Baidu.

  • se : Search block content in Wikipedia.

  • sg : Search block content in Google.

  • sh : Search block content in Github.

  • ss : Search block content in Stackoverflow.

  • sy : Search block content in Youtube.

  • ctrl+v : Toggle visual block mode.

  • mod+/ : Trigger emoji picker UI.

  • Modes

  • Normal mode

A block is focused/highlighted.

  • Insert mode

You can edit a block.

  • Visual block mode

You can select more blocks up and down and move the selected blocks using  j  and  k .

  • Command mode

In VIM this mode can be triggered by  : , but here, the shortcut is  mod+shift+; , also can be memorized as  mod+: . After trigger, you can find an input area at the bottom, you can input some commands here like in VIM. For now it’s about 10+ commands, but I believe that would be more.

NOTE: on Windows, the trigger is  ctrl+alt+;

  • The bottom input features

  • Autosuggestion when you input.

  • Press  Tab  if only one command matched, the matched command will be autocompleted right away.

  • Press  Up  and  Down  to traverse command history, it’s a 1000 limit history, I think it’s enough to use.

  • Press  Esc  to close command mode and back to the main window. For now Logseq can not get focused automatically sometime. so you need to click the main window to continue.

  • Just in case bug stuck, there are  Run  button and  Close  at bottom right to help you trigger behaviors.

  • Supported commands

  • :NUMBER  to scroll to specific line or  :-NUMBER  to scroll to specific line to the end or  :.NUMBER  represents scrolling to NUMBER * 100% of the page.

  • :s/  and  :substitute/ : Replace current block according regex, e.g.  s/foo/bar/gi , Notice it support Regex modifiers.

  • :%s/ a nd  :%substitute/ : Replace current page blocks according regex, e.g.  %s/foo/bar/gi .

  • :marks : Show marks.

  • :delm  and  :delmarks : Delete specific mark ids, e.g.  :delm 1 2 3 .

  • :delm!  and  :delmarks! : Delete all marks.

  • :m  and  :mark : Go to specific mark, e.g.  :m 1 .

  • :go : Go to existed page or block, e.g.  :go 2022-02-22  or  :go ((6219c981-256a-4464-bc62-4ecfab4c2141)) .

  • There are some shortcuts for page name:

  • :go @  and  :go @index : Go to Contents page

  • :go @today  Go to today’s journal page.

  • :go @yesterday  Go to yesterday’s journal page.

  • :go @tomorrow  Go to tomorrow’s journal page.

  • :go @prev  Go to prev-day’s journal page, if currect page is not a journal page, fallback to @yesterday.

  • :go @next  Go to next-day’s journal page, if currect page is not a journal page, fallback to @tomorrow.

  • :go @back  Go to backward page.

  • :go @forward  Go to forward page.

  • :go! : Go to existed page or block, create one if page not exist, e.g.  :go 2022-02-22  or  :go ((6219c981-256a-4464-bc62-4ecfab4c2141)) .

  • :go!  and  :go  support  --ns  and  --namespace  to go or create namespace page. e.g. you run command  :go! subpage --ns  on  test  page, then you will be redirect to  test/subpage  for saving your time to input prefix chars.

  • :re  and  :rename : Rename current page name, if target page exists, page content will be merged.

  • :undo  and  :redo : Undo and redo last edit.

  • :lorem  and  :lorem-ipsum : generate random blocks in same level, with  --unit word|paragraph|sentence  to change random block unit.

  • --unit  has a short style as  -u

  • wordparagraph  and  sentence  also have short styles as  wp , and  s .

  • also support  -p-s-w  and  --paragraph--sentence--word .

  • :emoji : Insert emojis by searching keyword, you can repeat emoji by appending a number.

  • :emoji-picker : Insert emoji by emoji UI.

  • :sort  and  rsort : Sort page first level blocks with no focus any blocks and sort sub level blocks with focus on one block.

  • :bg [namedColor|hexColor] : Set block background color, support multiple block selection.

  • :bg-picker : Trigger a color picker to select block background color, support multiple block selection.

  • :bg-random : Set block background color randomly, support multiple block selection.

  • :bg-clear : Clear block background color, support multiple block selection.

  • :copy-path : Get page or journal absolute path, so you can edit it outside of Logseq.

  • :open-in-vscode : Open page or journal in VSCode.

  • :w  and  :write : Save current page, actually this is a fake one, because Logseq save automatically.

  • :wq : Save current page and quit vim command mode.

  • :q  and  :quit : Quit vim command mode.

  • h  and  help : Show a help message modal.

  • Case Change Styles

  • 1 : Toggle upper and lower case, the default behavior.

  • 2 : Change to upper case. e.g.  LOGSEQ IS SO AWESOME

  • 3 : Change to lower case. e.g.  logseq is so awesome

  • 4 : Change to title case. e.g.  Logseq Is so Awesome

  • 5 : Change to sentence case. e.g.  Logseq is so awesome

  • 6 : Change to path case. e.g.  logseq/is/so/awesome

  • 7 : Change to capital case. e.g.  Logseq Is So Awesome

  • 8 : Change to constant case. e.g.  LOGSEQ_IS_SO_AWESOME

  • 9 : Change to dot case. e.g.

  • 10 : Change to header case. e.g.  Logseq-Is-So-Awesome

  • 11 : Change to param case. e.g.  logseq-is-so-awesome

  • 12 : Change to pascal case. e.g.  LogseqIsSoAwesome

  • 13 : Change to camel case. e.g.  logseqIsSoAwesome

  • 14 : Change to snake case. e.g.  logseq_is_so_awesome

  • 15 : Change to swap case. e.g.  lOGSEQ IS SO AWESOME

  • 16 : Change to random case. e.g.  logsEQ IS SO awESoME