Skip to content

Focus 0.3.8

Latest
Compare
Choose a tag to compare
@focus-editor focus-editor released this 27 Feb 01:52
· 3 commits to main since this release
  • 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), the editor will notice that and "undelete" the buffer
    • The Navigate To File dialog will now show whether a file is modified and/or modified on disk
    • The editor will now refresh at regular intervals, so that it shows any changes happened externally without waiting for user input
    • The Basic Light theme has been improved (thanks @maxamundsen)
    • macOS: the dark_titlebar and colored_titlebar settings are now respected (thanks @maxamundsen)
    • Made horizontal scrolling with a horizontal mouse wheel more smooth
    • Errors in failed "run commands" output will also be detected (previously only "build commands" would have their output checked for errors)
    • Build output panel is no longer limited by max_editor_width (because you can already control its width easily by dragging)
    • Build output panel will no longer cover the status bar