Skip to content

a-bentofreire/editortoix

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Code Editor Utility Belt

Visual Studio Marketplace Version GitHub Repo stars

EditorToIX are open-source text utilities available for multiple code editors in form of extension or plugins.

If you find this project useful, please, read the Support this Project on how to contribute.

Availability

Id Old Name Code Editor
vsx VscToIX Visual Studio Code
Cursor AI
Google Project IDX
open-vsx.org
vscode.dev
github.dev
linux XedToIX Linux Mint Xed Editor
Pluma Code Editor
Gedit
phoenix BracketsToIX Phoenix Code

Available Languages

  • English
  • Portuguese
  • German

Utilities

General Selection Policy Code Editor
Extract Text Document vsx, phoenix
Header To Bookmark Document vsx, phoenix
Mixer Document vsx, phoenix
Regnize Document vsx, phoenix
Replace Recipes Document vsx
Reverse Assignment Document vsx, phoenix
Change Case Selection Policy Code Editor
Add Space before Uppercase Word vsx, phoenix
Camel Case Word vsx, phoenix
Capitalize Word vsx, phoenix
Cycle Case Word vsx, linux, phoenix
Dash Case Word vsx, phoenix
Dash To Underscore Word vsx, phoenix
LowerCase Word phoenix
Underscore To Dash Word vsx, phoenix
UpperCase Word phoenix
Encoders/Decoders Selection Policy Code Editor
Html Decode Line phoenix
Html Encode Line phoenix
Url Decode Line vsx, phoenix
Url Encode Line vsx, phoenix
Change Slash Selection Policy Code Editor
Double To Single Slash Line vsx, phoenix
Single To Double Slash Line vsx, phoenix
Unix To Win Slash Line vsx, phoenix
Win To Unix Slash Line vsx, phoenix
Line Selection Policy Code Editor
Break Line At Document vsx, phoenix
Indent One Space Document vsx, linux, phoenix
Join Lines Document vsx, phoenix
Outdent One Space Document vsx, linux, phoenix
Remove Duplicated Lines Document vsx, linux, phoenix
Remove Empty Lines Document vsx, linux, phoenix
Reverse Lines Document vsx, linux
Sort Numerically Ascending Document vsx, linux, phoenix
Sort Numerically Descending Document vsx, linux, phoenix
Split Lines Document vsx, phoenix
Trim Trailing Document linux, phoenix
Insert Selection Policy Code Editor
Insert ISO Date Document vsx, phoenix
Insert ISO TimeDate Document vsx, phoenix
Insert UUID Document vsx, phoenix
Insert Text At End Document vsx, phoenix
Insert Text At Start Document vsx, phoenix
Change Quote Selection Policy Code Editor
Double To Single Quote Line phoenix
Single To Double Quote Line phoenix
Toggle Quote Line phoenix
Spacing Selection Policy Code Editor
Tab To Space Document phoenix
Space To Tab Document phoenix

Project Status

This is a stable project with utilities being available on brackets code editor since 2016, however, since more editors have been supported, there is still work in progress to support the same extensions and policies across all code editors. Linux Mint Xed Editor has the smaller subset of extensions.

Demos - All Editors

  • IX: Cycle Case: Add a shortcut and cycle between different case modes in a breeze.

Cycle Case

  • IX: Indent One Space, IX: Outdent One Space: Insert or remove one space only at the start of every line regardless of indention mode.

Indent/Outdent

  • IX: Extract Text : Copy text patterns from a document to clipboard.

Extract Text

  • IX: Insert Text At Start: Insert text with macros at the start of every line.

Insert Text at Start

  • IX: Insert Text At End: Insert text with macros at the end of every line.

Insert Text at End

  • IX: Join Lines: Join text with macros.

Join Lines

  • IX: Break Line At: Splits each line in order to be no longer than Max number of Chars. The words aren't broken unless it's added / at the end the user input. (e.g. 40/).

Break Line At

If you have previously installed xedtoix, you should uninstall first:

sudo apt uninstall xedtoix
sudo add-apt-repository ppa:a-bentofreire/editortoix
sudo apt-get update
sudo apt install editortoix

If you are updating from Linux Mint Software installer, you might have to activate the plugins on: Menu Edit -> Preferences -> Plugins

If you install Xed, Pluma or Gedit later, you can add or remove the plugins with:

sudo editortoix

Interface - phoenix Editor

EditorToIX adds a top-menu called IX. To prevent from cluttering the menu with all the commands, only a few commands were added to the menu. Use Command mapper to add which ones you prefer, and setup the shortcuts. No default shortcuts were define to prevent collision with other plugins.

Utility Description

Utility Description Example
Add Space before Uppercase Useful to transform functions names into documentation before: doActionBefore
after: do Action Before
Break Line At Break lines at a certain position before:
Too long line
after:
too long
line
Camel Case before: ClassNameFunc
after: classNameFunc
Capitalize before: classNameFunc
after: ClassNameFunc
Cycle Case Loops between differet case types before: _ClassNameFunc
after: _classNameFunc -> _CLASS_NAME_FUNC -> _class_name_func -> _class-name-func -> _class name func ->_ClassNameFunc
Dash Case before: ClassNameFunc
after: class-name-func
Dash To Underscore before: find-deep-first
after: find_deep_first
Double To Single Slash before: find\\\nagain
after: find\nagain
Extract Text Copies to the clipboard the captured group of a regular expression.
Each capture is separated by tabs
(\w+) = (\w+)
Header To Bookmark Converts markdown header text to Html Bookmark before: Is this the header 你好?
after: is-this-the-header-你好
Indent One Space Adds one space to the beginning of each line
Insert ISO Date 2018-02-08
Insert ISO TimeDate 2018-02-08 10:12:15
Insert Text At End before:
red
green

after:
expr: = \c{1}
red = 1
green = 2
Insert Text At Start before:
red
green

after:
expr: const \e{upper} =
const RED = red
const GREEN = green
Insert UUID 7fff60f8-91e8-40ba-9053-56b0f3a487f0
Join Lines Joins lines adding the computed expression at the end of every line before:
red
green

after:
expr:(x\c{X0A}),
red(x0A),green(x0B)
LowerCase before:classNameFunc
after:classnamefunc
Mixer Mixes lines of different sections. before:
// section
abc
cde
// end-section
// section
123
345
// section
after:
abc
123
cde
345
Outdent One Space Removes one space to the beginning of each line
Regnize Adds slash to regular expression metachars before: (\w+)[A-Z]a*b+text
after: \(\\w\+\)\[A-Z\]a\*b\+text
Remove Duplicated Lines Removes consecutive duplicated lines before:
first
second
second

after:

first
second
Remove Empty Lines Removes empty lines before:
first

second

after:

first
second
Replace Recipes Replaces text from a list of pre-defined recipes
Reverse Assignment Reverses the terms of assignments or equal/different comparisons before: x == y[x] + 5
after: y[x] + 5 == x
Reverse Lines Reverse lines before:
first
second
third
after:
third
second
first
Single To Double Slash before: find\nagain
after: find\\\nagain
Sort Numerically Ascending For each line uses the first number as sort key before:
10. red
2. green

after:

2. green
10. red
Sort Numerically Descending For each line uses the first number as sort key before:
10. red
`2.
Space To Tab Space to Tab only works with leading spaces
Split Lines Split lines by an expression. Dynamic values aren't supported before:
red,green

after:
expr: = \c{1}
red = 1
green = 2
Tab To Space Space to Tab only works with leading spaces
Trim Trailing Removes trailing spaces of each line
Underscore To Dash before: find_deep_first
after: find-deep-first
Unix To Win Slash Converts slashes to backslashes before: chocolate/candy
after: chocolate\candy
UpperCase before:classNameFunc
after:CLASSNAMEFUNC
Url Decode before: https%3A%2F%2Fgithub.com
after: https://github.com
Url Encode before: https://github.com
after: https%3A%2F%2Fgithub.com
Win To Unix Slash Converts backslashes to slashes before: chocolate\candy
after: chocolate/candy
Double To Single Quote before:find"again
after:find'again
Html Decode before:<h1>Title</h1&gt
after:<h1>Title</h1>
Html Encode before:<h1>Title</h1>
after:&lt;h1&gt;Title&lt;/h1&gt
Single To Double Quote before:find'again
after:find"again
Toggle Quote before:find"again'
after:find'again"

Selection Policies

Every utility supports multiple cursors and multiple line selections. However, It differs in the way each utility category handles the selections. For every cursor, each line is process individually and the counter is increased per line.

  • Line Utilities:
    • If no text is selected then all the document text is used.
    • If part of the line is selected then all the line is used
  • Transform Text Utilities:
    • If no text is selected then all the document text is used.
  • Insert Text Utilities:
    • If no text is selected then the cursor is the insertion point.
    • If multiple lines are selected then is inserted at start/end of every line.

Most of the commands operate on selected text. If no text is selected, a command will use: word - The nearest word (before and after the cursor) sentence - The nearest text until a whitespace or newline line - The text line where the cursor is located. document - All the editor text function - A function determines the text to use. Ex: Quote functions will use all the text between quotes that surrounds the cursor.

  • Document Plugins:
    • If no text is selected then all the document text is used.
    • If part of the line is selected then all the line is used
  • Word plugins:
    • If no text is selected then word surrounding cursor is used.

Expressions - vsx

Some of the utilities support expressions An expression is a text supporting the following metachars:

  • \n - newline

  • \t - tab

  • \c{start-value} - counter with optional start value

    • \c 0,1,2,...
    • \c{10} 10,11,12,...
    • \c{x00a} x00a,x00b,x00c,...
    • \c{XF} xF,x10,x11,...
  • \e{func} - transforms the selected text (line by line) function list:

    • upper - UpperCase
    • lower - LowerCase
    • length - Selected text length
    • capitalize
    • isodate
    • isotimedate
    • uuid

Replace Recipes - vsx

Replace Recipes must be added manually to the settings.json. This tool is still in beta phase.

Field Type Description
name string Recipe name
pattern string Find Expression (RegExp or String)
replaceWith string Replace Text
isRegExp boolean if false then pattern is a static string
isExpression boolean if false then result doesn't exec the expression engine
ignoreCase boolean if true and isRegExp uses ignore case option

ex:

"vsctoix.replaceRecipes": [
    {
      "name": "repl with let",
      "pattern": "\\b(var|const)\\b",
      "replaceWith": "let"
    },
    {
      "name": "Remove starting dash",
      "pattern": "^\\s*-",
      "replaceWith": ""
    },
  ],

Support this Project

If you find this project useful, consider supporting it:

  • Donate:

Donate via PayPal

Buy me a Coffee

License

MIT License - vsx and phoenix Editors

GPLv2 License - Linux Code Editors

Copyrights

© 2014-2024 Alexandre Bento Freire