Skip to content

Instantly share code, notes, and snippets.

@marvhus
Last active December 20, 2024 13:20
Show Gist options
  • Save marvhus/598859958466e4e0dfbf4f59d4977f94 to your computer and use it in GitHub Desktop.
Save marvhus/598859958466e4e0dfbf4f59d4977f94 to your computer and use it in GitHub Desktop.
Focus config
[6] # Version number. Do not delete.
[[workspace]]
/home/mvh/source/marvhus/example
/home/mvh/opt/jai
[ignore]
/home/mvh/source/marvhus/example/.git/**
[[build commands]]
build_working_dir: /home/mvh/source/marvhus/example
open_panel_on_build: true
# close_panel_on_success: false
clear_build_output_before_running: true
error_regex: ^(?P<file>.*):(?P<line>\d+),(?P<col>\d+): (?P<type>Error|Warning|Info|...):* (?P<msg>.*)|^(?P<msg1>.*error LNK.*)
auto_jump_to_error: true
[Debug Build]
build_command: jai first.jai
build_working_dir: /home/mvh/source/marvhus/example
timeout_in_seconds: 5
key_binding: F1
[Debug Build And Run]
build_command: jai first.jai
build_working_dir: /home/mvh/source/marvhus/example
timeout_in_seconds: 5
run_command: bin/example
run_working_dir: /home/mvh/source/marvhus/example
key_binding: F2
[Run]
run_command: bin/example
run_working_dir: /home/mvh/source/marvhus/example
key_binding: F3
[6] # Version number. Do not delete.
[[workspace]]
# These directories and files will be scanned when a workspace is opened so that search etc. works.
# Example:
# C:/projects/my-project # <- the first directory in the list becomes the working directory
# C:/jai
# src # <- this would be relative to the config file location
[ignore]
# Files and directories matching the following wildcards will not be loaded or descended into
# Example:
# *.js - will ignore all files with a '.js' extension
# tmp* - will ignore any files or directories which start with 'tmp'
# C:/project/dirname/** - will ignore everything under `dirname`
# C:/project/dirname/* - will ignore all files under `dirname`, but not recursively
.svn
.git
[allow]
# Files and directories matching the wildcards in this section will be loaded, even if they are ignored in the previous section.
# NOTE: known binary file extensions are ignored by default (*.exe, *.obj etc.). If this is not what you want, you can explicitly allow them here.
.focus-*
[file associations]
# Optional file associations in the format `<wildcard1> <wildcard2> ... : <language>`
# Example:
# *.hpp *.hh *.h : cpp
# todo.txt : todo
[[settings]]
maximize_on_start: true
open_on_the_biggest_monitor: false
cursor_as_block: false
cursor_blink_time_in_seconds: 5
highlight_selection_occurrences: true
highlight_line_with_cursor: true
highlight_matching_brackets: true
show_paste_effect: true
disable_file_open_close_animations: false
double_shift_to_search_in_workspace: true
tab_size: 4
insert_spaces_when_pressing_tab: true
strip_trailing_whitespace_on_save: except_lines_with_cursor
smooth_scrolling: true
scroll_beyond_last_line: true
line_height_scale_percent: 120
max_editor_width: 1500
can_cancel_go_to_line: true
copy_whole_line_without_selection: false
editor_history_size: 1024
line_wrap_is_on_by_default: true
show_line_numbers: true
show_selected_text_length: true
colored_titlebar: false # Windows 11+ only
dark_titlebar: false # Windows only
hide_mouse_when_typing: true
draw_indent_guides: true
auto_surround_with_brackets_and_quotes: true
auto_close_brackets: false
prefer_system_file_dialogs: false # Windows only
show_cursors_off_screen: true
persist_local_search_results: false # if true, search results will stay highlighted and you have to dismiss them using the `escape` action
load_most_recent_project_on_start: false
projects_sorting_order: most_recent_first
build_panel_stays_in_one_place: false # if false, the build panel will flip to the inactive pane in two pane layouts
build_panel_line_wrap_always_on: true
build_panel_width_percent: 50
build_panel_height_percent: 40
save_all_file_backed_buffers_on_build: true
save_current_buffer_on_build: false
status_bar_position: bottom # options: top, bottom
color_preview_popup: enabled # options: enabled, minimized, disabled
search_is_case_sensitive_when_uppercase_present: true
# This is an example configuration for build commands
# [[build commands]]
# build_working_dir: <build working dir for all commands> # <- paths relative to the workspace working dir (the first one in the list) are allowed
# open_panel_on_build: true # <- any settings specified here will apply to all commands unless overridden
# close_panel_on_success: false
# clear_build_output_before_running: false
# error_regex: <compiler-specific error regex> # see examples below
# auto_jump_to_error: false
# [Debug Build And Run] # <- command name. Can be arbitrary
# build_command: jai main.jai # should be an executable or a script
# build_working_dir: <build working dir for this command only>
# timeout_in_seconds: 5 # if you don't want a timeout, don't specify it
# run_command: test.exe # will be run if build succeeds
# run_working_dir: W:/focus # working dir for the run command
# key_binding: F5
# [Run] # <- You could have commands that don't build anything and just run something
# run_command: test
# run_working_dir: /home/user/test
# key_binding: Ctrl-F5
# [Release]
# build_command: jai first.jai - release
# key_binding: F9
# Example error regexes:
# For jai: ^(?P<file>.*):(?P<line>\d+),(?P<col>\d+): (?P<type>Error|Warning|Info|...):* (?P<msg>.*)|^(?P<msg1>.*error LNK.*)
# For msvc: ^(?P<file>.*)\((?P<line>\d+),?(?P<col>\d+)?\)[ ]?: (?P<type>error|warning) (?P<msg>.*)$
# For golang: ^(?P<file>.*):(?P<line>\d+):(?P<col>\d+): (?P<msg>.*)$
# For gcc: ^(?P<file>.*):(?P<line>\d+):(?P<col>\d+): (?P<type>error|warning): (?P<msg>.*) (\[(?P<msg1>.*)\])?$
# ... let us know what regex works for you and we'll add it here
# NOTE:
# You can use the following variables in build commands:
# %FILE% - full path to currenly active file
# %FILE_DIR% - the directory of the currently active file
# %FILE_NAME% - current file name, with extension
# %FILE_NAME_NO_EXTENSION% - current file name, without extension
# %BUILD_WORKING_DIR% - working dir of the build command
# %RUN_WORKING_DIR% - working dir of the run command
# %PROJECT_CONFIG_DIR% - the dir containing the active project config file
[[keymap]]
# - The first matching combination will be used, so order matters
[editors] # <- this means that the following key combos will apply only when editing text
# Key combination Action
Alt-F4 quit
Ctrl-D select_word_or_create_another_cursor
Ctrl-Shift-A select_all_occurrences
Ctrl-Shift-D duplicate_lines
# These shortcuts can be annoying to accidentally use, so they are commented out by default
# Shift-Backspace delete_line_and_go_up
# Shift-Delete delete_line
Ctrl-K delete_to_end_of_line
Ctrl-Shift-Delete delete_to_end_of_line
Ctrl-Shift-Backspace delete_to_start_of_line
Alt-ArrowUp move_selected_lines_up
Alt-ArrowDown move_selected_lines_down
Ctrl-J join_lines
Ctrl-Shift-J join_lines_no_spaces_in_between
Tab indent_or_go_to_next_tabstop
Shift-Tab unindent
Ctrl-] indent
Ctrl-[ unindent
Ctrl-S save
Ctrl-Shift-S save_as
Alt-Minus move_to_previous_editor_history
Alt-Plus move_to_next_editor_history
Ctrl-PageUp move_to_previous_buffer
Ctrl-PageDown move_to_next_buffer
Alt-/ toggle_comment
Ctrl-L select_line
Alt-O scroll_viewport_up
Shift-Alt-O scroll_viewport_up_fast
Alt-U scroll_viewport_down
Shift-Alt-U scroll_viewport_down_fast
#Alt-H scroll_viewport_left
#Alt-L scroll_viewport_right
Ctrl-Alt-ArrowUp scroll_viewport_up
Ctrl-Alt-ArrowDown scroll_viewport_down
Ctrl-Alt-ArrowLeft scroll_viewport_left
Ctrl-Alt-ArrowRight scroll_viewport_right
Alt-V move_cursor_to_viewport_center
{Shift}-Ctrl-ArrowUp move_up_to_empty_line
{Shift}-Ctrl-ArrowDown move_down_to_empty_line
Alt-Shift-I add_cursors_to_line_ends
Alt-Shift-Ctrl-I add_cursors_to_line_starts
Enter break_line
Ctrl-Enter new_line_below_without_breaking
Ctrl-Shift-Enter new_line_above_without_breaking
NumpadEnter break_line
Ctrl-NumpadEnter new_line_below_without_breaking
Ctrl-Shift-NumpadEnter new_line_above_without_breaking
Ctrl-1 switch_to_left_editor
Ctrl-2 switch_to_right_editor
Ctrl-, switch_to_other_editor
Ctrl-Shift-, duplicate_editor
Ctrl-Alt-Shift-ArrowLeft move_editor_to_the_left
Ctrl-Alt-Shift-ArrowRight move_editor_to_the_right
Ctrl-N create_new_file
Ctrl-Shift-N create_new_file_on_the_side
Alt-Shift-ArrowUp create_cursor_above
Alt-Shift-ArrowDown create_cursor_below
Alt-A align_cursors
#Alt-Z toggle_line_wrap
#Alt-Shift-L toggle_line_numbers
Ctrl-Shift-Alt-N open_another_editor_instance
[open file dialog]
Enter open_entry_in_place
Ctrl-Enter open_entry_on_the_side
Ctrl-1 open_entry_on_the_left
Ctrl-2 open_entry_on_the_right
Shift-Enter open_entry_in_explorer
Tab open_directory
Backspace pop_directory
[search dialog]
Enter open_entry_in_place
Ctrl-Enter open_entry_on_the_side
Ctrl-1 open_entry_on_the_left
Ctrl-2 open_entry_on_the_right
Shift-Enter move_up # an alternative way to move
Alt-C toggle_case_sensitive
Alt-W toggle_whole_word
Alt-R toggle_regex_search
[common]
# Common key combos may be used as a fallback if they are not defined in more specific sections.
# For example, if "move_up" is not defined in [editors], the one in the [common] section will be matched.
Alt-X show_commands
Ctrl-Shift-P show_commands
Ctrl-Alt-P switch_to_project
Ctrl-F search_in_buffer
Alt-F search_in_buffer_dropdown_mode
Ctrl-Shift-F search_in_project
Ctrl-P open_file_by_name
Ctrl-O navigate_to_file
Ctrl-Shift-O navigate_to_file_from_root
Ctrl-Tab switch_between_open_files
Ctrl-G go_to_line
Ctrl-C copy
Ctrl-X cut
Ctrl-V paste
Ctrl-Z undo
Ctrl-Shift-Z redo
Ctrl-D select_word
Ctrl-A select_all
Ctrl-W close_current_editor
Ctrl-Shift-W close_other_editor
Escape escape # combines close_dialog and remove_additional_cursors
Ctrl-Shift-L toggle_expand
Ctrl-B toggle_build_panel
F11 toggle_fullscreen
# {Shift}- means shift is optional, the key combination will still be matched.
# NOTE: in this editor the Shift key is hard-coded to extend selection when held
{Shift}-ArrowUp move_up
{Shift}-Alt-K move_up
#{Shift}-Ctrl-ArrowUp move_up_fast
{Shift}-PageUp move_up_one_page
{Shift}-ArrowDown move_down
{Shift}-Alt-J move_down
#{Shift}-Ctrl-ArrowDown move_down_fast
{Shift}-PageDown move_down_one_page
{Shift}-ArrowLeft move_left
{Shift}-Alt-H move_left
{Shift}-Alt-ArrowLeft move_left_by_word
{Shift}-Ctrl-ArrowLeft move_left_by_word_ends
#{Shift}-Ctrl-Alt-B move_left_by_word_ends
{Shift}-ArrowRight move_right
{Shift}-Alt-L move_right
{Shift}-Alt-ArrowRight move_right_by_word
{Shift}-Ctrl-ArrowRight move_right_by_word_ends
#{Shift}-Ctrl-Alt-F move_right_by_word_ends
{Shift}-Home jump_to_line_start
{Shift}-Alt-D jump_to_line_start # why doesn't Alt-A work?
{Shift}-End jump_to_line_end
{Shift}-Alt-E jump_to_line_end
{Shift}-Ctrl-Home jump_to_file_start
{Shift}-Ctrl-End jump_to_file_end
{Shift}-Ctrl-M jump_to_matching_bracket
{Shift}-Backspace delete_left_char
{Shift}-Delete delete_right_char
{Shift}-Alt-Backspace delete_word_left_no_underscore
{Shift}-Alt-Delete delete_word_right_no_underscore
{Shift}-Ctrl-Backspace delete_word_left
{Shift}-Ctrl-Delete delete_word_right
Ctrl-Plus increase_font_size
Ctrl-Minus decrease_font_size
Ctrl-0 reset_font_size_to_default
Ctrl-MouseMiddle reset_font_size_to_default
F8 go_to_next_build_error
Ctrl-F8 go_to_next_build_error_on_the_side
Shift-F8 go_to_previous_build_error
Shift-Ctrl-F8 go_to_previous_build_error_on_the_side
[[style]]
theme: gruber-darker
[fonts]
font: default
font_size: 14
[colors]
background0: 15212AFF
background1: 10191FFF
background2: 18262FFF
background3: 1A2831FF
background4: 21333FFF
# NOTE: for Jai region_scope colors define background colors for blocks of code that fall into those scopes,
# so make sure to override those as well if you change the background.
# Those regions are likely to be used for languages other than Jai in the future
region_scope_export: 15212AFF
region_scope_file: 131C22FF
region_scope_module: 1A2831FF
region_header: 1A5152FF
region_success: 226022FF
region_warning: 986032FF
region_error: 772222FF
region_heredoc: 090e12FF
selection_active: 1C4449FF
selection_inactive: 1C44497F
selection_highlight: FCEDFC26
search_result_active: 8E772EFF
search_result_inactive: FCEDFC26
scrollbar: 33CCCC19
scrollbar_hover: 33CCCC4C
scrollbar_background: 10191F4C
cursor: 26B2B2FF
cursor_inactive: 196666FF
paste_animation: 1C4449FF
splitter: 21333FFF
splitter_hover: 1C4449FF
letter_highlight: 599999FF
list_cursor_lite: 33CCCC19
list_cursor: 33CCCC4C
shadow_dark: 0E161C7F
shadow_transparent: 0E161C00
text_input_label: 3B4450FF
char_under_cursor: FFFFFFFF
ui_default: BFC9DBFF
ui_dim: 87919DFF
ui_neutral: 4C4C4CFF
ui_warning: F8AD34FF
ui_warning_dim: 986032FF
ui_error: 772222FF
ui_error_bright: FF0000FF
ui_success: 227722FF
build_panel_background: 1A2831FF
build_panel_scrollbar: 33CCCC19
build_panel_scrollbar_hover: 33CCCC4C
build_panel_scrollbar_background: 10191F4C
build_panel_title_bar: 1C303AFF
code_default: BFC9DBFF
code_invalid: FF0000FF
code_string_literal: D4BC7DFF
code_multiline_string: D4BC7DFF
code_raw_string: D4BC7DFF
code_char_literal: D4BC7DFF
code_identifier: BFC9DBFF
code_note: E0AD82FF
code_number: D699B5FF
code_error: FF0000FF
code_warning: E4D97DFF
code_highlight: E4D97DFF
code_comment: 87919DFF
code_multiline_comment: 87919DFF
code_operation: E0AD82FF
code_punctuation: BFC9DBFF
code_keyword: E67D74FF
code_type: 82AAA3FF
code_value: D699B5FF
code_modifier: E67D74FF
code_attribute: E67D74FF
code_enum_variant: BFC9DBFF
code_macro: E0AD82FF
code_function: D0C5A9FF
code_builtin_variable: D699B5FF
code_builtin_function: E0AD82FF
code_builtin_exception: E0AD82FF
code_directive: E67D74FF
code_directive_modifier: E67D74FF
code_header: E67D74FF
code_header2: E0AD82FF
code_header3: E0AD82FF
code_header4: E0AD82FF
code_header5: E0AD82FF
code_header6: E0AD82FF
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment