dotfiles

My personal shell configs and stuff
git clone git://git.alex.balgavy.eu/dotfiles.git
Log | Files | Refs | Submodules | README | LICENSE

keys_user.config (14643B)


      1 
      2 # you can edit this file to change keybindings lines that start with '#' are comments
      3 # the syntax is pretty simple. Some examples:
      4 #command        k             (command is executed when k is pressed)
      5 #command        <C-k>         (command is executed when k is pressed while holding control)
      6 #command        <S-k>         (command is executed when k is pressed while holding shift)
      7 #command        <A-k>         (command is executed when k is pressed while holding alt)
      8 #command        <S-+>         (command is executed when = is pressed while holding shift.
      9 #                                Note that <S-=> would not work because of a bug in the command system so
     10 #                                when prefixing non-ascii keys with shift, you have to specify the shift
     11 #                                modified key in addition to the shift modifier)
     12 #command        <C-S-k>       (command is executed when k is pressed while holding control and shift)
     13 #command        gg            (command is executed when g is pressed twice)
     14 #command        gt            (command is executed when g is pressed and then t is pressed)
     15 #command        g<C-n><S-d>t  (command is executed when g is pressed and then n is pressed while holding\
     16 #                               control and then d is pressed while holding shift and then t is pressed)
     17 # you can execute multiple commands using the following syntax:
     18 #command1;command2;command3        <keybinding>
     19 
     20 
     21 # ---------- NAVIGATION AND ZOOM ----------
     22 
     23 # Goto the begining of document. If prefixed with a number, it will go to that page.
     24 # for example 150gg goes to page 150.
     25 goto_begining       gg
     26 goto_begining		<C-<home>>
     27 
     28 # Goto the end of the document
     29 goto_end            <end>
     30 goto_end            <S-g>
     31 
     32 # Opens a prompt to enter page number and jump to that page
     33 goto_page_with_page_number		<home>
     34 
     35 ## Goto left/right/bottom/top side of the page
     36 #goto_left <unbound>
     37 #goto_right <unbound>
     38 #goto_top_of_page <unbound>
     39 #goto_bottom_of_page <unbound>
     40 
     41 # Goto left/right side of the page ignoring white margins
     42 goto_left_smart     0
     43 goto_right_smart     $
     44 
     45 # Movement (can be prefixed with a number)
     46 # move_down           <down>
     47 # move_up             <up>
     48 move_left           l
     49 move_right          h
     50 
     51 # Goto forward for one page width. (can be prefixed with a number)
     52 # (note that going forward for one page width is not usually what you want becaue if
     53 # the page is larger than the screen you will miss some content. What you usually want is screen_down)
     54 next_page           <S-<down>>
     55 previous_page       <S-<up>>
     56 
     57 # Go down one screen width (can be prefixed with a number which tells how many screen widths should we go down)
     58 screen_down         <space>
     59 screen_down         <C-d>
     60 screen_down         <C-f>
     61 screen_down         <pagedown>
     62 screen_up         <S-space>
     63 screen_up         <backspace>
     64 screen_up         <C-u>
     65 screen_up         <C-b>
     66 screen_up           <pageup>
     67 
     68 # Goto the next/prev chapter
     69 next_chapter        gc
     70 prev_chapter        g<S-c>
     71 
     72 # Goto previous viewing state and delete the current (and future) state(s).
     73 # pop_state           w
     74 
     75 # Goto the previous history point
     76 prev_state          <C-o>
     77 prev_state          <C-<left>>
     78 
     79 ## Create a new sioyek window
     80 new_window <C-w>n
     81 new_window <C-w>v
     82 new_window <C-w>s
     83 new_window <C-x>2
     84 new_window <C-x>3
     85 
     86 ## Close the current sioyek window
     87 close_window <C-w>c
     88 close_window <C-w>q
     89 close_window <C-x>0
     90 
     91 ## Search and switch between sioyek windows
     92 goto_window <A-o>
     93 goto_window <C-w>j
     94 
     95 # If we are not at the end of viewing history, goto the next history point
     96 next_state          <C-i>
     97 
     98 # Open table of contents.
     99 goto_toc            t
    100 
    101 # Zoom
    102 zoom_in             <S-+>
    103 zoom_in            =
    104 zoom_out            -
    105 zoom_in             J
    106 zoom_out            K
    107 
    108 ## Zoom in/out on the mouse cursor (instead of center of screen)
    109 # zoom_in_cursor <unbound>
    110 # zoom_out_cursor <unbound>
    111 
    112 # Rotate document
    113 rotate_clockwise           r
    114 rotate_counterclockwise    <S-r>
    115 
    116 # Automatically set the zoom level and horizontal offset such that the current page is centered horizontally and
    117 # it fills the screen width
    118 fit_to_page_width   zw
    119 # Same as fit_to_page_with but ignores page margins
    120 fit_to_page_width_smart   zW
    121 fit_to_page_height zh
    122 fit_to_page_height_smart zH
    123 # Goto the top-right side of page. Usefull for two column documents
    124 goto_top_of_page;goto_right_smart zr
    125 
    126 ## Same as fit_to_page_width_smart, but instead of filling the screen width, it fills the ratio of screen that is
    127 ## configured in `prefs_user.config` using `fit_to_page_width_ratio` config. See https://github.com/ahrm/sioyek/issues/162#issuecomment-1059738730.
    128 #fit_to_page_width_ratio <unbound>
    129 
    130 # Open a file dialog to select a document.
    131 open_document       o
    132 # Open an embedded file dialog in sioyek
    133 # open_document_embedded       <C-o>
    134 # Open an embedded file dialog in sioyek rooted in the directory of current opened file
    135 open_document_embedded_from_current_path       <C-O>
    136 
    137 # Open a searchable list of previously opened documents.
    138 open_prev_doc       O
    139 
    140 ## Opens the last document opened is sioyek. It is usefull when you want to
    141 #quickly toggle between two documents
    142 open_last_document <C-6>
    143 
    144 ## Keyboard shortcut to enter visual mark mode (instead of right clicking)
    145 #enter_visual_mark_mode <unbound>
    146 
    147 # Command the move the visual mark to the next/previous line
    148 # these keys only work when a visual mark is set (by right clicking or using `visual_mark_under_cursor` command)
    149 move_visual_mark_up		k
    150 move_visual_mark_down	j
    151 move_visual_mark_up		<up>
    152 move_visual_mark_down	<down>
    153 
    154 ## lock horizontal scroll, usefull when using laptop touchpads
    155 # toggle_horizontal_scroll_lock <unbound>
    156 
    157 # ---------- SEARCH ----------
    158 
    159 # Search the document.
    160 # example: /something                   (searches the document for 'something')
    161 # you can also specify a page range to search:
    162 # example: /<110,135>something          (searches pages 110 to 135 (inclusive) for 'something')
    163 search              /
    164 
    165 # Searches the current chapter. This is essentially the same as search but the range prefix is autofilled
    166 # with the range of the current lowest level subchapter.
    167 chapter_search      c<C-f>
    168 chapter_search      c/
    169 
    170 # Goto the next search item. Can be prefixed with a number which is the same as performing the command n times
    171 # for example if we are on the 10th search result and we input 15n, we go to the 25th search result.
    172 next_item           n
    173 # Goto the previous search result. Can be prefixed with a number with similar rules as next_item.
    174 previous_item       <S-n>
    175 
    176 # ---------- BOOKMARKS ----------
    177 # Add a bookmark in the current location (opens a text input where you can specify the bookmark text)
    178 add_bookmark        b
    179 delete_bookmark     db
    180 
    181 # Open bookmarks menu of the current document.
    182 goto_bookmark       gb
    183 
    184 # Open bookmarks menu of all documents.
    185 goto_bookmark_g     g<S-b>
    186 
    187 # ---------- HIGHLIGHTS ----------
    188 # You can select a piece of text and press the `add_highlight` shortcut followed by a symbol (a character from a-z) to highlight
    189 # the text
    190 add_highlight		H
    191 # Search in highlights of current document
    192 goto_highlight		gh
    193 # Search in highlights of all documents
    194 goto_highlight_g	g<S-h>
    195 # Slick on a highlight and then press the `delete_highlight` shortcut to delete it.
    196 delete_highlight	dh
    197 
    198 # Sets the highlight type to be used for other operations (the default highlight type is 'a')
    199 #set_select_highlight_type
    200 
    201 ## Same as `add_highlight` but uses the current selected highlight type as the type of highlight
    202 #add_highlight_with_current_type <unbound>
    203 
    204 ## Toggle select highlight mode. In select highlight mode, all text selected using mouse will automatically be highlighted
    205 ## with highlight type set using `set_select_highlight_type`
    206 #toggle_select_highlight <unbound>
    207 
    208 # Goto next/previous highlight in current document
    209 goto_next_highlight  gnh
    210 goto_prev_highlight  g<S-n>h
    211 
    212 ## Goto next/previous highlight of the current selected highlight type
    213 #goto_next_highlight_of_type <unbound>
    214 #goto_prev_highlight_of_type <unbound>
    215 
    216 # ---------- MARKS ----------
    217 
    218 # Mark the current location. After pressing the mark button, you must enter a symbol (a letter from a-z or A-Z).
    219 # this marks the current location in the file with the entered symbol. Afterwards you will be able to return to
    220 # the locations of the marks using goto_mark command.
    221 # example:  mm      (marks the current location in the file with a mark named 'm')
    222 set_mark            m
    223 # Goto a previously set mark. After pressing goto_mark you must enter a symbol associated with a previously set mark.
    224 # example:  `m      (goes to the location of the mark named m)
    225 goto_mark           `
    226 
    227 
    228 # ---------- PORTALS ----------
    229 # If we are in default state, goto portal state with the current location in document as the portal source
    230 # if we are already in the portal state, create the portal with the current location as destination.
    231 portal                p
    232 
    233 # Delete the portal with the closest source to current location
    234 delete_portal         dp
    235 
    236 # Goto the position of the portal with the closest source to current location
    237 goto_portal           gp
    238 goto_portal           <tab>
    239 
    240 # Similar to goto_portal, except when prev_state is called, the destination of the portal is update to be the state
    241 # on which prev_state is called
    242 edit_portal           <S-p>
    243 edit_portal           <S-<tab>>
    244 
    245 # Open/Close the helper window for portals
    246 toggle_window_configuration   <A-p>
    247 
    248 ## open/close helper window
    249 #toggle_one_window <unbound>
    250 
    251 # ---------- MISC ----------
    252 
    253 # Copy selected text
    254 copy                <C-c>
    255 
    256 toggle_fullscreen  <S-z>
    257 
    258 # Toggles whether we highlight pdf links or not
    259 toggle_highlight    <f1>
    260 
    261 # open command line
    262 command             ;
    263 
    264 # Seach the selected text using one of the search engines defined using search_url_* settings in prefs.config (* can be any letter between 'a' and 'z')
    265 # see https://sioyek-documentation.readthedocs.io/en/latest/usage.html#external-search
    266 external_search		s
    267 
    268 # opens the selected text as a url in the default browser
    269 # open_selected_url   <S-q>
    270 
    271 # Toggle dark mode (inverted colors)
    272 toggle_dark_mode	i
    273 
    274 ## Toggle custom color mode. You can specify the text background color in your `prefs_user.config` file
    275 ## see https://sioyek-documentation.readthedocs.io/en/latest/configuration.html#custom-background-color-and-custom-text-color
    276 #toggle_custom_color <f8>
    277 
    278 # Toggle synctex mode. When in synctex mode, right clicking on a pdf launches the corresponding latex page.
    279 toggle_synctex		S
    280 
    281 ## Perform a synctex search under the mouse cursor
    282 #synctex_under_cursor		<unbound>
    283 
    284 # While in mouse drag mode, instead of selecting text you can pan the screen using mouse
    285 toggle_mouse_drag_mode	<f6>
    286 
    287 # In visual scroll mode, mouse wheel performs `move_visual_mark_up` and `move_visual_mark_down` commands
    288 toggle_visual_scroll	<C-v>
    289 
    290 # In visual scroll mode, create an overview to/go to/portal to the definition in highlighted line
    291 # overview_definition     l
    292 goto_definition     <C-]>
    293 portal_to_definition     ]
    294 
    295 # In presentation mode, we fit the pages to screen and movement keys move entire pages
    296 toggle_presentation_mode	<f5>
    297 
    298 ## Quit sioyek
    299 quit		q
    300 
    301 # Open PDF links using keyboard
    302 open_link f
    303 # Select text using keyboard
    304 keyboard_select v
    305 # Smart jump using keyboard
    306 keyboard_smart_jump <S-f>
    307 ## Open overview window using keyboard
    308 #keyboard_overview <unbound>
    309 
    310 ## If the preview is not correct, jump to the next preview
    311 #next_preview <C-n>
    312 
    313 ## If the preview is not correct, jump to the previous preview
    314 #previous_preview <C-n>
    315 
    316 ## Jump to the location of the current overview
    317 #goto_overview <unbound>
    318 
    319 ## Create a portal to the location of the current overview
    320 #portal_to_overview <unbound>
    321 
    322 ## Center the window on selected text
    323 #goto_selected_text <unbound>
    324 
    325 ## Focus the visual mark on the text matching the given string (useful when extensions want to focus on a text)
    326 #focus_text <unbound>
    327 
    328 ## Smart jump to the location under mouse cursor
    329 #smart_jump_under_cursor <unbound>
    330 ## Open overview window to the location under mouse cursor
    331 #overview_under_cursor <unbound>
    332 ## Set a visual mark under mouse cursor
    333 #visual_mark_under_cursor <unbound>
    334 ## Close the overview window
    335 #close_overview <unbound>
    336 ## Exit visual mark mode
    337 close_visual_mark <esc>
    338 
    339 ## Import sioyek data from an exported file
    340 #import <unbound>
    341 
    342 ## Export sioyek data into a json file
    343 #export <unbound>
    344 
    345 ## Execute shell commands. For example:
    346 ## sioyek --new-instance %1
    347 ## in the command %1 expands to the path of the current file and %2 expand to the file name of the current file
    348 #execute <unbound>
    349 
    350 ## (deprecated see bottom of the page) Execute a predefined command. these commands are defined in `prefs_user.config` file using the following syntax:
    351 ## --------prefs_user.config-----------
    352 ## execute_command_a	some_command %1 %2
    353 ## execute_command_x	another_command %2
    354 ## ------------------------------------
    355 ## now in order to execute the second command you can first execute `execute_predefined_command` and then press 'x'
    356 #execute_predefined_command <unbound>
    357 
    358 
    359 
    360 ## Embed the annotations (highlights and bookmarks) into a new PDF file so they are visible to other PDF readers
    361 #embed_annotations <unbound>
    362 
    363 ## Copy the current window configuration to clipboard so they can be used in `prefs_user.config`
    364 #copy_window_size_config <unbound>
    365 
    366 ## Opens the default preference file
    367 #prefs <unbound>
    368 ## Opens the user preference file with highest priority
    369 #prefs_user <unbound>
    370 ## Opens a list of all user preference files
    371 #prefs_user_all <unbound>
    372 
    373 ## Opens the default kwys file
    374 #keys <unbound>
    375 ## Opens the user keys file with highest priority
    376 #keys_user <unbound>
    377 ## Opens a list of all user keys files
    378 #keys_user_all <unbound>
    379 
    380 ## Enter password for password protected documents
    381 #enter_password <unbound>
    382 
    383 ## Toggle fastread mode. this is an experiental feature
    384 #toggle_fastread <unbound>
    385 
    386 ## Toggle statusbar display
    387 #toggle_statusbar <unbound>
    388 
    389 ## Toggle statusbar display
    390 #toggle_statusbar <unbound>
    391 
    392 ## Reload sioyek window
    393 reload <C-r>
    394 
    395 ## Set the status string to be displayed in sioyek's statusbar (it is useful for extensions)
    396 #set_status_string <unbound>
    397 
    398 ## Clears the status string set by `set_status_string`
    399 #clear_status_string <unbound>
    400 
    401 ## Toggles the window titlebar
    402 #toggle_titlebar <unbound>
    403 
    404 ## You can bind custom commands defined in `prefs_user.config` using the same syntax as the built-in commands
    405 ## --------prefs_user.config-----------
    406 ## new_command	_my_command_name python /path/to/script.py %{file_name} %{paper_name}
    407 ## ------------------------------------
    408 ## now you can bind _my_command_name to a keybind here:
    409 #_my_command_name <unbound>