Usage
Note that all the keybindings in this section are the default keybindings that can be changed by editing keys_user.config.
Each key executes a command. In order to add a keybinding that executes a command, you add the following to keys_user.config:
command key
For example suppose you want to use the j key to move down. You can add the following to your config file:
move_down j
You can press : to open a searchable list of all available commands.
Opening Files
Press
oto open the select file menu. (open_documentcommand)Press
<Shift o>(O) to open a searchable list of recently opened files. (open_prev_doccommand)Press
<Ctrl o>to open an embedded file system browser. (open_document_embeddedcommand)Press
<Ctrl Shift o>to open an embedded file system browser rooted in the current document folder. (open_document_embedded_from_current_pathcommand)You can also drag files into sioyek window to open them.
You can presss
deletein the list of recently opened files to remove a file from the list (doesn’t remove the file on the filesystem).If you want to open a file in a new sioyek window, you can pass the
--new-windowcommand line option. Or you could open a new window from within sioyek by pressing<Ctrl t>.You can switch between opened sioyek windows using
goto_windowcommand.
Basic Movement
You can move the screen using the arrow keys. (corresponding to the following commands:
move_down,move_up,move_leftandmove_right)You can also use the mouse wheel to scroll the screen.
Press
ggto go to the first page andGto go to the last page. (goto_beginingandgoto_endcommands)In order to go to a specific page you can enter the page number and then press
gg. For example in order to go to page 42, you should enter42gg.To go to a specific page, you can also press the
HOMEbutton which opens a menu where you can enter the page number. (goto_page_with_page_numbercommand)Press
spaceto move the screen down and<Shift space>to move the screen up. (screen_downandscreen_upcommands)Press
<Ctrl PageDown>/<Ctrl PageUp>to go to the next/previous page. (next_pageandprevious_pagecommands)Press
tto open a searchable table of contents. You can jump to table of content entries by selecting. (goto_toc)Press
gcto go to the next chapter andgCto go to the previous chapter. (next_chapterandprev_chaptercommands)We don’t have a scrollbar by default. If you want to enable it, you can run
toggle_scrollbar
Zoom
Press
+(<Shift =>) to zoom in and-to zoom out. (zoom_inandzoom_outcommands)You can also use the mouse wheel while holding control to zoom in/out.
Press
f9to fit the page to window width. (fit_to_page_widthcommand)Press
f10to fit the page to window width ignoring white page margins. (fit_to_page_width_smartcommand)
Overview and SmartJump
You can right click on PDF links to open a quick overview of the link destination. You can navigate in this overview using mouse wheel.
Even if the PDF document has no links, you can right click on items and sioyek tries to open an overview of item destination. For example right clicking on the text “Figure 2.19” opens an overview showing (hopefully) Figure 2.19 . This also works with equations, tables, references, etc.
You can also middle click on items to directly jump to their location instead of opening an overview.
Visual Mark
If you right click on a line of text in a PDF file, sioyek displays a visual highlight below that line (we refer to this as the “visual mark” from now on). This visual mark has multiple use-cases.
It can act as a simple mark (see Marks). You can always return to the last location of visual mark by pressing
`and then right-clicking or pressing`again. This can be useful when you want to quickly check previous pages and jump back to where you were.It highlights the current line being read which reduces eye strain and prevents losing your place in PDF files.
You can move the visual mark to the next/previous line by pressing
j/k(move_visual_mark_downandmove_visual_mark_upcommands).You can toggle visual scroll mode by pressing
f7(toggle_visual_scrollcommand). In this mode, mouse wheel moves the visual mark up and down.If you set
ruler_mode 0in yourprefs_user.config, we just highlight below the current line, if you setruler_mode 1we draw a rectangle around the current line. The following figure shows the difference between these two settings.
While a line is highlighted, you can press
l(overview_definitioncommand) to create an overview to the reference in current lien (for example if there is aFigure 2.3in the current highlighted line, we create an overview to the figure location. If there are multiple references in the same line, we use the first reference)Similarly you can press
](portal_to_definition) andctrl+](goto_definition) to create a portal or jump to the definition.
Search
Press
/or<Ctrl f>to open the search menu. (searchcommand)Once a search is initiated, you can press
nto go to the next match orNto go to the previous match. (next_itemandprevious_itemcommands)You can enter
c/to search only the current chapter. (chapter_searchcommand).You can limit the search range to a specific page range using the following syntax in the search bar
<begin,end>search term. For example, if you want to search for the term ‘Figure’ in pages 20 to 30, you can enter the following:<20,30>Figure
Using
overview_next_itemandoverview_prev_itemcommands, you can open an overview to search results instead of jumping to them.
Marks
Sometimes while reading a document, you need to glance at the contents of previous pages and quickly return to the original location. For example, maybe you forgot the definition of a term that was defined a few pages ago, or perhaps the current paragraph is referencing a previous figure. Using marks, you can mark your location before glancing at previous content and then quickly return to the location of the mark.
In order to create a mark, first press
m(set_markcommand) followed by an alphabet symbol (this symbol will be the name of the mark, you can have multiple marks with different names). For example, in order to create a mark namedafor your current location, enterma.You can go to a mark by pressing
`followed by the name of the mark (note that`is different from single quote'.`usually is on the same key as~). For example, in order to go back to the mark created in the previous example, enter`a. (goto_markcommand)Marks are persistent (they are saved even when sioyek is closed).
Lower case marks are local to the current document but upper case marks are global across sioyek.
Bookmarks
Bookmarks are similar to marks except they use a textual description instead of an alphabet letter.
You can add a bookmark by pressing
b(add_bookmarkcommand) and then entering a textual desciption of the bookmark in the opened menu.You can open a searchable list of the bookmarks in the current document by entering
gb(goto_bookmarkcommand).You can open a searchable list of all the bookmarks in all documents by entering
gB(goto_bookmark_gcommand).You can delete the closest bookmark to the current location by entering
db(delete_bookmarkcommand). You can also delete bookmarks directly in the bookmarks list by selecting the bookmark and then pressing thedeletebutton on keyboard.
Highlights
You can highlight text in sioyek. Similar to marks, you can assign a “type” to each highlight using a lower case alphabet letter. Highlights of different types are distinguished by different colors.
Select a piece of text and then press
hfollowed by a letter to create a highlight of that letter type. For example in order to create a highlight of type “a” enterha. (add_highlightcommand)Alternatively, if you don’t want to specify highlight type every time, you can execute
add_highlight_with_current_typecommand which uses the current highlight type to highlight the selected text. You can change the current highlight type by executingset_select_highlight_typecommand.You can toggle select highlight mode by executing
toggle_select_highlightcommand. While in this mode, all selected text will be highlighted using the selected highlight type.Press
ghto open a searchable list of the highlights in the current document. (goto_highlightcommand)Press
gHto open a searchable list of the highlights in all documents. (goto_highlight_gcommand)You can execute
goto_next_highlightandgoto_prev_highlightto navigate the highlights in current document. If you want to navigate the highlights of selected type, you can usegoto_next_highlight_of_typeandgoto_prev_highlight_of_typecommands.In order to delete a highlight, first left click on the highlight and then enter
dh(delete_highlightcommand). Alternatively, you can press thedeletebutton on the keyboard in the highlight list.
Portals
Sometimes, a paragraph is entirely about a previous part of the document. For example maybe the paragraph is explaining the data in a previous table or describing a previous figure or answering a previous exercise. In such situations, it is usually very annoying to keep alternating between the paragraph and the referenced material. Using portals, you can link the location of the paragraph with the location of the referenced material and whenever you scroll to the paragraph, the referenced content is automatically displayed in a secondary window.
In order to create a portal, press
p(portalcommand, note that portals are called “links” in the sioyek source code, however, in the documentation we refer to them as portal so as not to confuse them with PDF links). This creates an incomplete portal with the current location as the source. Now, navigate to the location of the referenced material and presspagain. This completes the portal with the second location as the destination.Alternatively, you can create portals by pressing
pand then clicking on a PDF link. This automatically creates a portal from the location of the link to the link destination. Also you can middle click after pressingpwhich uses SmartJump to determine the destination.To view portal destinations, you need to open the helper window. You can open/close the helper widow by pressing
f12(toggle_window_configurationcommand). This window automatically shows the destination of the portal with the closest source to the current location. This window is more useful for users with multiple monitors.You can delete the closest portal by entering
dp(delete_portalcommand)You can go to the destination of the closest link by executing
goto_portalcommand.In order to edit the destination of the current link, press
Shift p(edit_portalcommand). This automatically jumps you to the destination of the link. Now you can adjust the screen or zoom level. When you are done, return to the source location by going back in history (backspaceby default).You can also edit the link destination by directly panning the helper window using mouse or scrolling using the mouse wheel. You can also adjust the zoom level using the mouse wheel while holding
Ctrl.
External Search
Select a piece of text and enter
ss/sl(external_searchcommand followed by a lettera-z) to search it in google scholar/library genesis.You can also middle click or shift-middle click on the name of papers/books to quickly search them in google scholar or other search engines. You don’t need to select the text, sioyek will automatically try to guess the paper name on which you middle clicked.
You can configure the search engines using
search_url_*configurations inprefs_user.config. The*stands for any lettera-z. For example if I havesearch_url_g https://www.google.com/search?q=in myprefs_user.config, then sioyek will use google to search selected texts when I presssg.You can configure which search engines to use for middle click or shift-middle click searches using
middle_click_search_engineandshift_middle_click_search_engineconfigurations inprefs_user.config. The value of these configurations should be a letter corresponding tosearch_url_*configs. For example if I want to use the google search from previous example when middle clicking, I should add the following to myprefs_user.config:
middle_click_search_engine g
Synctex
Press
f4to toggle synctex mode (toggle_synctexcommand). While in this mode, right clicking on any text opens the correspondingtexfile in the appropriate location.You can configure the synctex inverse search command using
inverse_search_commandconfig inprefs.config. Here is an example for VsCode (%1 stands for the name of the file and %2 stands for the line number in the file):inverse_search_command "C:\path\to\vscode\Code.exe" "C:\path\to\vscode\resources\app\out\cli.js" --ms-enable-electron-run-as-node -r -g "%1:%2"
Here is a sample configuration for latex workshop in VSCode:
"latex-workshop.view.pdf.external.synctex.command": "C:\\path\\to\\sioyek.exe", "latex-workshop.view.pdf.external.synctex.args": [ "--inverse-search", "\"C:\\path\\to\\vscode\\Code.exe\" \"C:\\path\\to\\vscode\\resources\\app\\out\\cli.js\" --ms-enable-electron-run-as-node -r -g \"%1:%2\"", "--reuse-instance", "--forward-search-file", "%TEX%", "--forward-search-line", "%LINE%", "%PDF%" ]
Here is a sample configuration for VimTex:
let g:vimtex_view_method = 'sioyek'
Data and Synchronization
Sioyek stores your data in two database files named local.db and shared.db. As the name suggests, local.db stores system-specific data (for example the location of PDF files in your filesystem) while shared.db stores all other data including marks, bookmarks, portals, etc.
As the name suggests, shared.db can be shared across machines. There is also a shared_database_path config which you can set in your prefs_user.config which specifies the path of this shared database file. For example you can set this path to be a file in your dropbox directory and this way all your data will automatically be synchronized across your machines.
You can also export/import your data into/from a json file by executing the export/import command (see Commands).
Window Configuration
Toggle fullscreen mode using
f12(toggle_window_configurationcommand)You can save your current window configuration copy_window_size_config command.
Miscellaneous
Copy text by first selecting it and pressing
<Ctrl c>. (copycommand)You can open the links in PDF files from keyboard by pressing
fand entering the number next to the desired link. (open_linkcommand)Press
f8to toggle dark mode. (toggle_dark_modecommand)Press
f5to toggle presentation mode (toggle_presentation_modecommand).You can use
toggle_horizontal_scroll_lockcommand to prevent the document from being scrolled horizontally (can be useful for touchpad users).Use
toggle_custom_colorto toggle the custom color scheme configured in Configuration.Use
executeto open a command line where you can execute shell commands. In this command line%1expands to the full path of the current file,%2expands to current file name and%3expands to current selected text. You can also predefine commands and execute them quickly usingexecute_predefined_command. See this post for examples of what is possible.You can export a version of current PDF file with all bookmarks/highlights embedded in it (so it is available to other PDF software) by executing
embed_annotationscommand.You can rotate the page by executing
rotate_clockwiseandrotate_counterclockwisecommands.