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'
101 '<force><escape>': 'esc'
109 'b': 'move_word_left'
110 'w': 'move_word_right'
111 '0 ^': 'move_to_line_start'
112 '$': 'move_to_line_end'
113 'v': 'toggle_selection'
114 'o': 'toggle_selection_direction'
115 'y': 'copy_selection_and_exit'
123 <a-enter>': 'activate_highlighted'
124 '<c-space>': 'rotate_markers_forward'
125 '<s-space>': 'rotate_markers_backward'
126 '<backspace>': 'delete_char'
127 '<c-backspace>': 'toggle_complementary'
128 '<up>': 'increase_count'
137 '<escape> <enter>': 'exit'
144 'prevent_autofocus': false
145 'ignore_keyboard_layout': false
146 'blacklist': '*example.com* http://example.org/editor/*'
147 'hints.chars': 'fjdkslaghrueiwonc mv'
148 'hints.auto_activate': true
151 'prev_patterns': 'prev previous ‹ « ◀ ← << < back newer'
152 'next_patterns': 'next › » ▶ → >> > more older'
155 'notifications_enabled': true
156 'notify_entered_keys': true
157 'prevent_target_blank': true
158 'counts_enabled': true
159 'find_from_top_of_viewport': true
160 'browsewithcaret': false
161 'ignore_ctrl_alt': (Services.appinfo.OS == 'WINNT')
162 'prevent_autofocus_modes': 'normal'
163 'config_file_directory': ''
165 'refocus_timeout': 100
166 'smoothScroll.lines.spring-constant': '1000'
167 'smoothScroll.pages.spring-constant': '2500'
168 'smoothScroll.other.spring-constant': '2500'
169 'scroll.reset_timeout': 1000
170 'scroll.repeat_timeout': 65
171 'scroll.horizontal_boost': 6
172 'scroll.vertical_boost': 3
173 'scroll.full_page_adjustment': 40
174 'scroll.half_page_adjustment': 20
175 'scroll.last_position_mark': "'"
176 'scroll.last_find_mark': '/'
177 'pattern_selector': ':-moz-any(
178 a, button, input[type="button"]
179 ):not([role="menu"]):not([role="tab"])'
180 'pattern_attrs': 'rel role data-tooltip aria-label'
181 'hints.matched_timeout': 200
183 'hints.match_text': true
184 'hints.peek_through': '<c-s->'
185 'hints.toggle_in_tab': '<c-'
186 'hints.toggle_in_background': '<a-'
187 'activatable_element_keys': '<enter>'
188 'adjustable_element_keys': '<arrowup> <arrowdown> <arrowleft>
189 <arrowright> <space> <enter>'
190 'focus_previous_key': '<s-tab>'
191 'focus_next_key': '<tab>'
192 'options.key.quote': '<c-q>'
193 'options.key.insert_default': '<c-d>'
194 'options.key.reset_default': '<c-r>'
198 'categories': {} # Will be filled in below.
202 # The above easy-to-read data is transformed in to easy-to-consume (for
203 # computers) formats below.
205 # coffeelint: enable=colon_assignment_spacing
206 # coffeelint: enable=no_implicit_braces
208 translate = require('./translate')
209 utils = require('./utils')
211 addCategory = (category, order) ->
212 uncategorized = (category == '')
213 categoryName = if uncategorized then '' else translate("category.#{category}")
214 parsed_options.categories[category] = {
216 order: if uncategorized then 0 else order
224 createCounter = -> new utils.Counter({step: 100})
225 modeCounter = createCounter()
226 categoryCounter = createCounter()
228 for modeName, modeCategories of shortcuts
229 mode_order[modeName] = modeCounter.tick()
230 for categoryName, modeShortcuts of modeCategories
231 addCategory(categoryName, categoryCounter.tick())
232 commandIndex = createCounter()
233 for shortcut, commandName of modeShortcuts
234 pref = "mode.#{modeName}.#{commandName}"
235 shortcut_prefs[pref] = shortcut
236 command_order[pref] = commandIndex.tick()
237 categoryMap[pref] = categoryName
239 # All options, excluding shortcut customizations.
240 all_options = Object.assign({}, options, advanced_options, parsed_options)
241 # All things that are saved in Firefox’s prefs system.
242 all_prefs = Object.assign({}, options, advanced_options, shortcut_prefs)
254 BRANCH: 'extensions.VimFx.'