1 # coffeelint: disable=colon_assignment_spacing
2 # coffeelint: disable=no_implicit_braces
4 # This file defines all VimFx’s options in an easy-to-read way.
9 'o': 'focus_location_bar'
10 'O': 'focus_search_bar'
12 'P': 'paste_and_go_in_tab'
13 'yy': 'copy_current_url'
18 'L': 'history_forward'
23 'aR': 'reload_all_force'
32 '<space>': 'scroll_page_down'
33 '<s-space>': 'scroll_page_up'
34 'd': 'scroll_half_page_down'
35 'u': 'scroll_half_page_up'
37 'G': 'scroll_to_bottom'
38 '0 ^': 'scroll_to_left'
39 '$': 'scroll_to_right'
40 'm': 'mark_scroll_position'
42 'g[': 'scroll_to_previous_position'
43 'g]': 'scroll_to_next_position'
47 'T': 'tab_new_after_current'
49 'J gT': 'tab_select_previous'
50 'K gt': 'tab_select_next'
51 'gl': 'tab_select_most_recent'
52 'gL': 'tab_select_oldest_unvisited'
53 'gJ': 'tab_move_backward'
54 'gK': 'tab_move_forward'
55 'gw': 'tab_move_to_window'
56 'g0': 'tab_select_first'
57 'g^': 'tab_select_first_non_pinned'
58 'g$': 'tab_select_last'
59 'gp': 'tab_toggle_pinned'
62 'gX': 'tab_restore_list'
63 'gx$': 'tab_close_to_end'
64 'gxa': 'tab_close_other'
69 'et': 'follow_in_focused_tab'
70 'ew': 'follow_in_window'
71 'ep': 'follow_in_private_window'
72 'af': 'follow_multiple'
75 'ec': 'open_context_menu'
76 'eb': 'click_browser_element'
77 '[': 'follow_previous'
79 'gi': 'focus_text_input'
80 'v': 'element_text_caret'
81 'av': 'element_text_select'
82 'yv': 'element_text_copy'
86 'a/': 'find_highlight_all'
87 'g/': 'find_links_only'
93 'W': 'window_new_private'
94 'i': 'enter_mode_ignore'
96 'gr': 'enter_reader_view'
97 'gB': 'edit_blacklist'
98 'gC': 'reload_config_file'
100 '<force><escape>': 'esc'
108 'b': 'move_word_left'
109 'w': 'move_word_right'
110 '0 ^': 'move_to_line_start'
111 '$': 'move_to_line_end'
112 'v': 'toggle_selection'
113 'o': 'toggle_selection_direction'
114 'y': 'copy_selection_and_exit'
122 <a-enter>': 'activate_highlighted'
123 '<c-space>': 'rotate_markers_forward'
124 '<s-space>': 'rotate_markers_backward'
125 '<backspace>': 'delete_char'
126 '<c-backspace>': 'toggle_complementary'
127 '<up>': 'increase_count'
136 '<escape> <enter>': 'exit'
143 'prevent_autofocus': false
144 'ignore_keyboard_layout': false
145 'blacklist': '*example.com* http://example.org/editor/*'
146 'hints.chars': 'fjdkslaghrueiwonc mv'
147 'hints.auto_activate': true
150 'prev_patterns': 'prev previous ‹ « ◀ ← << < back newer'
151 'next_patterns': 'next › » ▶ → >> > more older'
154 'notifications_enabled': true
155 'notify_entered_keys': true
156 'prevent_target_blank': true
157 'counts_enabled': true
158 'find_from_top_of_viewport': true
159 'browsewithcaret': false
160 'ignore_ctrl_alt': (Services.appinfo.OS == 'WINNT')
161 'prevent_autofocus_modes': 'normal'
162 'config_file_directory': ''
164 'refocus_timeout': 100
165 'smoothScroll.lines.spring-constant': '1000'
166 'smoothScroll.pages.spring-constant': '2500'
167 'smoothScroll.other.spring-constant': '2500'
168 'scroll.reset_timeout': 1000
169 'scroll.repeat_timeout': 65
170 'scroll.horizontal_boost': 6
171 'scroll.vertical_boost': 3
172 'scroll.full_page_adjustment': 40
173 'scroll.half_page_adjustment': 20
174 'scroll.last_position_mark': "'"
175 'scroll.last_find_mark': '/'
176 'pattern_selector': ':-moz-any(
177 a, button, input[type="button"]
178 ):not([role="menu"]):not([role="tab"])'
179 'pattern_attrs': 'rel role data-tooltip aria-label'
180 'hints.matched_timeout': 200
182 'hints.match_text': true
183 'hints.peek_through': '<c-s->'
184 'hints.toggle_in_tab': '<c-'
185 'hints.toggle_in_background': '<a-'
186 'activatable_element_keys': '<enter>'
187 'adjustable_element_keys': '<arrowup> <arrowdown> <arrowleft>
188 <arrowright> <space> <enter>'
189 'focus_previous_key': '<s-tab>'
190 'focus_next_key': '<tab>'
191 'options.key.quote': '<c-q>'
192 'options.key.insert_default': '<c-d>'
193 'options.key.reset_default': '<c-r>'
197 'categories': {} # Will be filled in below.
201 # The above easy-to-read data is transformed in to easy-to-consume (for
202 # computers) formats below.
204 # coffeelint: enable=colon_assignment_spacing
205 # coffeelint: enable=no_implicit_braces
207 translate = require('./translate')
208 utils = require('./utils')
210 addCategory = (category, order) ->
211 uncategorized = (category == '')
212 categoryName = if uncategorized then '' else translate("category.#{category}")
213 parsed_options.categories[category] = {
215 order: if uncategorized then 0 else order
223 createCounter = -> new utils.Counter({step: 100})
224 modeCounter = createCounter()
225 categoryCounter = createCounter()
227 for modeName, modeCategories of shortcuts
228 mode_order[modeName] = modeCounter.tick()
229 for categoryName, modeShortcuts of modeCategories
230 addCategory(categoryName, categoryCounter.tick())
231 commandIndex = createCounter()
232 for shortcut, commandName of modeShortcuts
233 pref = "mode.#{modeName}.#{commandName}"
234 shortcut_prefs[pref] = shortcut
235 command_order[pref] = commandIndex.tick()
236 categoryMap[pref] = categoryName
238 # All options, excluding shortcut customizations.
239 all_options = Object.assign({}, options, advanced_options, parsed_options)
240 # All things that are saved in Firefox’s prefs system.
241 all_prefs = Object.assign({}, options, advanced_options, shortcut_prefs)
253 BRANCH: 'extensions.VimFx.'