Skip to content

Releases: focus-editor/focus

Focus 0.3.8

27 Feb 01:52
Compare
Choose a tag to compare
  • New features:
    • Global search now allows to additionally filter results by specifying file include/exclude wildcards
    • Syntax highlighting:
    • It is now possible to pass a line number together with the file path to the editor on startup: focus /path/to/file:69 (thanks @caztanj)
    • New actions to change case of selected text (thanks @onelivesleft):
      • change_case_to_upper
      • change_case_to_lower
      • change_case_to_caps - will capitalize the first letter, and any letter following a non-letter character (my_foo_type -> My_Foo_Type)
      • change_case_cycle - will cycle through the options below. Bound to Ctrl-U by default
    • New action create_cursors_around. Creates cursors above and below so that they extend up to the surrounding whitespace (thanks @onelivesleft)
    • New actions for creating, moving and deleting cursors (thanks @BuzzwordChief):
      • move_selection_to_next_word (Ctrl-Y) - instead of creating a new cursor at the next occurrence it will move the current cursor, allowing you to skip an occurrence
      • revert_select_word_or_create_another_cursor (Ctrl-R) - removes the newly created selection
    • New actions:
      • reload_from_disk to force reload a buffer from disk (Reload File From Disk in the command palette)
      • reload_workspace to force reload the workspace (Reload Workspace in the command palette)
      • build_panel_toggle_focus - for those who want to be able to focus the build panel using only the keyboard
      • open_file_directory - (Open File Directory in the command palette) (thanks @jejikeh)
    • New font options in the style section - font_ui, font_ui_bold, font_ui_size (thanks @hfr4)
    • Windows rmenu key can now be used in keybinds as cmd (thanks @onelivesleft)
    • New bindable keys: MouseX1 and MouseX2 (thanks @onelivesleft)
    • New available colors:
      • ruler for the vertical ruler, if enabled
      • indent_guide for indent guides, if enabled
      • bracket_highlight for highlighting matching brackets
    • In [ignore] and [allow] sections of the workspace paths starting with ./ can now be used to refer to the project directories. E.g. ./folder/** will match a folder in any project directory.
    • New options in the [fonts] section which allow to disable hinting and subpixel anti-aliasing:
      • anti_aliasing: lcd (default - for subpixel AA), or normal
      • hinting (true by default)
    • Cursor movements have been reworked (thanks @onelivesleft).
      • Focus now supports the following cursor movement types:
        • by_character - goes through 1 character at a time
        • by_character_type - goes through blocks of characters of the same type (e.g. word, non-word, whitespace, etc)
        • by_character_type_fast - like above, but treats underscores as part of word and skips 1 space (unless multiple cursors are used)
        • through_word - goes through anything to reach the end of the next word block
        • through_word_throttled - like above, but goes through at most 2 blocks of characters at a time
      • Each movement type has a corresponding move and delete action, e.g.
        • move_{left|right}_by_character_type will move cursors by groups of characters
        • delete_{left|right}_through_word will delete the characters in between the current cursor position and the next cursor position after the move through word
      • By default:
        • Alt -Arrow{Left|Right} are bound to move by character type
        • Ctrl-Arrow{Left|Right} are bound to move through word throttled
        • Alt -{Delete|Backspace} are bound to delete by character type
        • Ctrl-{Delete|Backspace} are bound to delete by character type (fast)
    • Variable indentation is now supported:
      • New setting detect_indentation is added and is set to true by default (because presumably this is what people would most likely want)
      • The old setting insert_spaces_when_pressing_tab has been renamed to indent_using: spaces / tabs
      • If you disable detect_indentation you should get the old behaviour (all files use the same indentation settings based on indent_using and tab_size).
      • New commands have been added (search for "Indentation" in the command palette):
        • To force detect indentation from file (it will be remembered for the duration of the session, but there's no persistence)
        • To convert indentation from spaces to tabs and vice versa - this will change the file contents itself! Note that any tabs or spaces within the lines are not touched
        • To revert indentation to defaults as specified in the config
      • When tab indentation is used, the tab_size from the config is always used
    • File-specific settings are now supported:
      • Some settings can be specified for a subset of files, based on their language or a wildcard, for example:
        • [file: <wildcard1>, <wildcard2>, ...]
        • [lang: golang, cpp, c, ...]
    • It's now possible to focus buttons in dialogs using only keyboard (thanks @caztanj):
      • New actions are added - focus_next_ui_element, focus_previous_ui_element (Tab and Shift-Tab by default)
      • Confirm selection by using action open_entry_in_place (Enter by default)
    • Scrollbar will now be hidden by default and will only appear when scrolling or when the mouse pointer gets close to the scrollbar area.
    • New settings for scrollbar configuration:
      • show_scrollbar_marks (defaults to true). Can be used to disable the markers in the scrollbar area. Note that the markers are only shown when line wrap is off.
      • scrollbar_width_scale (defaults to 1.0). Use to control the scrollbar width. Set to 0 to remove the scrollbar.
      • scrollbar_min_opacity (defaults to 0.0). If you want the scrollbar to be always visible, set this to 1.0.
      • scrollbar_max_opacity (defaults to 1.0). Set to anything lower than 1.0 to reduce the default scrollbar visibility.
      • scrollbar_fade_in_sensitivity (defaults to 10.0). Controls when the scrollbar appears as the mouse pointer gets close.
      • scrollbar_fade_out_delay_seconds (defaults to 2.0). How long the scrollbar stays visible after scrolling.
  • Bug fixes:
    • Fixed a crash when changing languages in the color preview widget
    • Fixed a crash when editing colors near the end of file with color preview open (thanks @darkgiggs)
    • Fixed a crash when trying to jump to build error after reloading workspace
    • Fixed a crash when trying to duplicate an editor in some cases
    • Fixed a crash when printing too much into the build output window
    • Fixed a crash when file paths are too long on Windows (thanks @Roman-Skabin)
    • Fixed a crash when workspace list contained duplicate paths
    • Fixed font size changing when you press ctrl after scrolling has started (thanks @onelivesleft)
    • Cursors in all editors should now be preserved after stripping trailing whitespace. Undo/redo behaviour is fixed as well.
    • Current line highlights will no longer cover indent guides and text highlights
    • Fixed double save dialogs which could appear in some cases
    • Fixed a memory leak in the build system
    • Fixed a crash in the build system when letting commands print for too long
    • Fixed a bug with auto-closing brackets (thanks @darkgiggs)
    • Fixed a bug with it being impossible to undo after certain multi-cursor manipulations
    • Fixed auto_close_brackets not working at EOF
    • Fixed a crash after pasting an invalid text into the go-to-line dialog and trying to undo
    • Fixed a slowdown of the whole system which sometimes happened if Focus was kept minimized
  • Other changes:
    • When executing build/run commands Focus will now redirect the standard output/error streams of the child process to the same pipe. This should fix cases where the output from the underlying tool would be "reordered" due to the timing of reads from separate output/error pipes.
    • Syntax highlighting improvements for CSS, HTML and TypeScript (thanks @caztanj)
    • Creating cursors above and below will now skip empty lines as this is most likely the behaviour users want (thanks @onelivesleft)
    • The Navigate To File (Ctrl-O) dialog will always show all files and folders instead of applying the ignore rules to them, which will allow to selectively open files which are normally ignored
    • Selecting a word using double left click should now behave identically to selecting a word using the select_word action, highlighting only whole-word selection occurrences
    • The delete_to_{start,end}_of_line actions no longer copies the text to the clipboard.
      • Added two new actions cut_to_{start,end}_of_line that deletes the text and copies it to the clipboard.
    • When choosing a location to save a file, the option to "save as" in the dialog will appear after the directories but before files (previously it was at the bottom), so that it's still easy to navigate directories, but also the most likely needed option of saving as a new file is at the top.
    • When attempting to save a buffer which is modified on disk, a confirmation dialog will be shown
    • When a file gets deleted but is then created again (e.g. when switching branches in source control), th...
Read more

Focus 0.3.7

15 Sep 02:49
Compare
Choose a tag to compare
  • New features:
    • New command: move_current_file. Works as save_as, but removes the old file (thanks @simonvallz)
    • New config options:
      • search_is_case_sensitive_when_uppercase_present. Set to true to automatically make local search case sensitive when there are uppercase chars in the search bar. Currently only works with ASCII.
      • projects_sorting_order: most_recent_first (default), alphabetical or alphabetical_no_case. Determines the sorting order for projects in the Switch To Project dialog. (thanks @Roman-Skabin for the fix)
    • Option strip_trailing_whitespace_on_save now accepts the following values: all (strip all trailing whitespace), except_lines_with_cursor (leave cursors where they are), and disabled (don't strip)
    • Pressing the close active editor shortcut in the Open Files dialog will close the selected file
    • When reloading workspace the user will be able to kill any running build command via a confirmation dialog
    • Build commands can be killed and restarted via a confirmation dialog (previously any running commands had to be manually killed before starting another one)
  • Bug fixes:
    • Fixed a problem with undoing auto-modified colors using the color picker
    • Made dialog chains more robust. We no longer leave the editor in an inconsistent state if a switch to project is cancelled halfway.
    • Fixed the go-to-line dialog position for panels (color preview and the build panel)
    • macOS:
      • Fixed an issue with not being able to exit the editor if there are unsaved buffers
      • Fixed a bug with typing the letter 'q' when trying to exit the editor via Cmd-Q
  • Other changes:
    • Various highlighting improvements (thanks @simonvallz)
    • Temporary unsaved buffers will disappear from file lists when closed. If you accidentally closed one, go back in editor history
    • The delete_to_start_of_line command will now delete to the indentation level first, not to the very start of the line right away
    • Many internal changes to reduce the memory footprint and improve the cache friendliness of internal data structures
    • Files larger than the limit of 2,147,483,647 bytes will now no longer be loaded with an error message rather than crashing
    • Hitting save when in the color preview editor will save the target config file, instead of attempting to save the color preview sample text somewhere

Focus 0.3.6

26 Aug 05:35
Compare
Choose a tag to compare
  • New features:
    • New option: status_bar_position. Allows changing the position of the status bar to either the top or bottom of the editor window. Defaults to bottom.
    • Code colors have been revamped. There are now more colors available in the config, which roughly correspond to the code tokens produced by language tokenizers.
      • Configs and themes will be migrated to version [5] with the new colors automatically derived from the old colors
      • You can always check the default config for the full list of available colors (use the Show Default Config command)
      • Do note that not all tokens are present in all languages. For example, code_enum_variant only works with Jai, Odin and Zig at the moment.
      • A new color preview widget will be automatically displayed to help with color selection (code samples contributed by Numina)
        • The color preview widget now has a color picker (thanks to @onelivesleft)
      • New option color_preview_popup was added to control the popup behaviour. Variants: enabled, minimized, disabled (defaults to enabled)
    • New commands: close_all_editors and close_other_editors. Can be used to clean up the most recent files dialog (Ctrl-Tab by default). (thanks @maxamundsen)
    • New command: strip_trailing_whitespace. Use to strip trailing whitespace in the currently open file (thanks @maxamundsen)
    • New command: choose_language. Allows to select a language for a buffer (thanks @maxamundsen)
    • New command: build_clear_output. Use to manually clear the build output panel. Note that there is already a build option to clear it on every run, which may be preferable.
    • New config subsection under [[workspace]]: [file associations]. Can be used to assign syntax to buffers using wildcards. See the default config for examples
    • Basic highlighting for Markdown (thanks @JakWolf) - however it's not complete and not always correct
    • Basic CSS highlighting (thanks @simonvallz)
    • C and C++ highlighters are now separate from each other
    • Workspace changes:
      • Workspace will now reload in a non-destructive way. Whenever possible it will try to preserve open editors unless they don't belong to the workspace any more
      • The [[workspace]] section in the config has changed. It should auto-migrate to version [5]. Please refer to the comments in the default config for more details
        • Allow/ignore sections now expect one line per rule, not many rules on one line separated by space
      • Individual files can now be added to workspace alongside directories
      • The first directory in the workspace member list will be considered the working directory
      • Paths relative to the config file location can now be used in the workspace member list
    • Any projects opened using any means (e.g. by launching the editor with a -project parameter or passing in a dir with a .focus-config file) will be remembered, and you can can then switch to them using the Switch to Project dialog (Ctrl-Alt-P by default)
    • New build command variable: %PROJECT_CONFIG_DIR%. Expands to the path of the directory containing the active project config.
    • New option: load_most_recent_project_on_start. Set to true to load the last loaded project on startup.
    • New option: highlight_matching_brackets. Set to true to highlight the bracket matching the one the cursor is on.
    • New command: jump_to_matching_bracket. Defaults to Ctrl-M.
  • Bug fixes:
    • Linux: Fixed a bug that caused inconsistent trackpad scrolling on Wayland (thanks @Mythique)
    • Rust: enabled comment toggling that was missing initially
    • Fixed a few memory leaks
    • Fixed an out-of-bounds scroll position in scrollable panels in some cases
    • Fixed a crash when parsing build output with certain regexes
    • Fixed a crash when outputting invalid UTF-8 in the build output window
    • Fixed a glitch with changing scroll position in some cases (thanks @Sanian-Creations)
    • Fixed search result highlighting when there are tab characters used for alignment in the middle of text
    • linux/macos: invalid directories in the config should now highlight the incorrect chunk, not the whole path (on windows it has always worked like this)
    • UPD. 0.3.6.1 Fixed a crash when trying to pick a color and spamming cursor movement keys at the same time
  • Other changes:
    • macOS: add support for dead keys/key composition
    • Text inputs now also support deleting text to underscore (Alt+Backspace, Alt+Delete by default) (thanks @jejikeh)
    • It is now possible to add a comment to an empty line by using the toggle_comment action (thanks @polgartom)

Focus 0.3.5

04 May 19:32
Compare
Choose a tag to compare
  • New features:
    • New option: insert_final_newline_on_save. Set to true to auto-add missing final newlines to saved files.
    • New command: copy_current_line_info. Copies a string <current-file-path>:<line> to clipboard. Useful for setting breakpoints.
    • Basic HLSL highlighting (thanks @Roman-Skabin for many improvements)
    • Basic JSON highlighting (thanks @simonvallz)
    • Rust highlighting
  • Bug fixes:
    • Fixed the Jai code samples highlighting in build output in some cases
    • Fixed build output highlighting glitch when using the clear build output option
    • Fixed a crash in some cases when selecting all occurrences with the search bar open
    • Fixed a massive slowdown on some systems due to problematic OpenGL drivers
    • Fixed buffer duplication when jumping to build errors on Windows
    • Fixed editor freeze on large workspace reloads
    • Fixed wrong local search results after stripping trailing whitespace in some cases
  • Other changes:
    • Made the fuzzy search in the command dialog more intuitive
    • CRLF is now stripped from build output before displaying

Focus 0.3.4-3

09 Apr 20:34
Compare
Choose a tag to compare
  • Build system bug fixes and improvements:
    • Fixed a crash when trying to jump to error in a file we can't open
    • Fixed build output parsing in some situations
    • Added relative build error path support (relative to the build_working_dir of the build command)
    • Improved error messages

Focus 0.3.4-1

07 Apr 13:04
Compare
Choose a tag to compare

Bug fixes:

  • fix a crash when auto-indenting C/C++ code

Focus 0.3.4

07 Apr 01:43
Compare
Choose a tag to compare
  • New features:
    • Jumping to build errors is now supported. See the default config for examples and more information (thanks @jlami for the initial implementation)
      • Use the new commands go_to_next_build_error (F8 by default) and go_to_previous_build_error (Shift-F8 by default)
      • Double-clicking the file name in the build output will also jump to the error location (provided it matched the error regex)
      • You can add Ctrl to your key combo or double-click to open on the side, as usual (when the default keybinds are used)
    • Closing an editor will now remove the corresponding file from the open files list (only if it's not modified)
    • New Handmade Hero theme (thanks @Sokus)
    • Basic JS highlighting (thanks @simonvallz)
    • It is now possible to use variables in build and run commands: %FILE%, %FILE_DIR%, %FILE_NAME%, %FILE_NAME_NO_EXTENSION%, %BUILD_WORKING_DIR%, %RUN_WORKING_DIR% (see more information in the default config)
    • New options: window_width, window_height, window_x, window_y. Can be used to configure the initial size of the editor window.
    • Focus now allows auto loading projects at startup in one of the following ways:
      • By passing a project name as a parameter: focus -project "Project Name" or focus -project path/to/project.focus-config.
      • By passing in a directory path which contains a file named .focus-config. This file will be loaded as a Focus project.
      • By launching Focus from a directory containing a file named .focus-config.
  • Bug fixes:
    • C highlighting now supports identifiers which start with a UTF8 letter
  • Other changes:
    • Column number shown in the footer will now count the number of characters, not the visual offset (previously it would take tab size into account)
    • Configs will be migrated to version [3]. New settings, colors and keybinds will be automatically added.
    • C highlighting has been slightly improved

Focus 0.3.3

21 Mar 03:22
Compare
Choose a tag to compare
  • New features:
    • macOS: Drag files into the window to open them.
    • C/C++ highlighter will now accept most common unicode letter characters in identifiers
    • Added highlighting for the Uxntal language (thanks @LainLayer)
    • C# highlighting: support nested string interpolation (thanks @audV)
    • New option: show_selected_text_length. Set to true to display the number of selected chars (and bytes) in the footer (thanks @CELLTH)
    • New command: open_another_editor_instance. Defaults to Ctrl-Shift-Alt-N. Opens a new editor instance as a subprocess (thanks @LainLayer)
    • In Jai, #string literals will now support highlighting text. E.g. #string STR_PYTHON will highlight the contents as python. The name needs to end with the desired language name. The string block can have a special background color (called region_heredoc in the config)
  • Bug fixes:
    • Fixed a bug with cursor positioning when using the align_cursors action through the command dialog
    • Fixed a visual glitch when attempting to draw tabs as characters in a new buffer name
    • After switching to a new project the Navigate to File dialog should no longer persist paths from the previous project
    • Fixed a crash when opening the global search widget immediately after switching projects
    • Fixed incorrect cursor positioning when redoing with multiple cursors in some cases
  • Other changes:
    • Improved the scanning speed by ignoring large binary files quicker
    • Windows: improved the startup times by avoiding the use of heavy Win32 API calls
    • It is now possible to select all occurrences of the selected text while the search bar is open
    • Build commands will now appear in the command palette. There's no need to assign each command a key binding any more.

Focus 0.3.2

21 Feb 01:28
Compare
Choose a tag to compare
  • New features:
    • New build option: clear_build_output_before_running. Set to true to clear the build output window every time a command is run.
    • New option: disable_viewport_chasing_cursor_near_the_edge. Set to true to prevent the viewport from smoothly scrolling to the new cursor position when it moves near the edge by a small amount.
    • macOS: Opt is now allowed in keybinds rather than Alt.
    • macOS: colored title bars are now used by default
  • Bug fixes:
    • macOS: added NSHighResolutionCapable to Info.plist which should fix blurry rendering when installing Focus via the .dmg package.
    • macOS: keyboard shortcuts should now work correctly on non-QWERTY layouts (#29)
      • NOTE: key composition still does not work correctly, this fix is only about the base keyboard layout being respected
    • Fixed a crash when attempting to override key mappings in a project config
    • Fixed the double shift search action not registering on Linux consistently
    • It shouldn't now be allowed to switch projects while a build command is running, to prevent freezing
    • Go-to-line now works when you press enter to jump to an already entered line number
  • Other changes:
    • macOS: Installing the editor from the .dmg package will register it as a handler for text files. This means that:
      1. you will see Focus as an entry in the "Open With" list in the context menu for text files in Finder
      2. you can use Focus to open files from the terminal by running open -a Focus file
    • macOS: Some default keyboard shortcuts were changed to remove conflicts with system shortcuts.
    • macOS: The oldest OS that can launch Focus is now macOS 10.13 High Sierra.
    • Continuous scroll actions such as scroll_viewport_up, scroll_viewport_down etc. now should work with multipart combos.
    • Cursor positioning when undoing/redoing has been improved. You should now be able to use undo/redo to jump to the position of the last edit without actually applying it.

Focus 0.3.1

27 Jan 09:49
Compare
Choose a tag to compare
  • New features:
    • New options: save_current_buffer_on_build and save_all_file_backed_buffers_on_build. Enable to auto-save files before running build commands (thanks @jlami)
    • Zig highlighting
  • Bug fixes:
    • Previewing themes will now change window border color as well as it should (thanks @jmpstar)
    • Regex search should no longer crash the editor on certain inputs
    • Close current editor when animations are disabled should now focus the remaining editor
    • Binary files should now be auto-ignored again
    • Fixed a memcpy-related memory corruption bug which manifested in some rare Linux distros
  • Other changes:
    • Various theme improvements (thanks @jmpstar, @leonader, @maxamundsen)
    • Crash reports now print stack traces in release mode where possible (thanks @Sanian-Creations)
    • Upgraded to Jai 0.1.83+ (thanks @valignatev)
    • C highlighting improvements
    • Linux: the editor now uses libxcb to interact with an X11 server by default. The old X11 backend (Xlib) is still around and can be activated by running the editor with FOCUS_LD_BACKEND=x11 set in the environment
      • NOTE: the xcb backend is currently missing drag-and-drop support. If that is important to you please use the old Xlib backend as described above.
    • Platform support enhancements for macOS:
      • the editor no longer consumes CPU when idle
      • implemented the refresh timer (2024, year of the blinking cursor)
      • smoother trackpad scrolling
      • the maximize_on_start option now actually maximizes the main window instead of making it full-screen