d-akara / vscode-extension-transformer Goto Github PK
View Code? Open in Web Editor NEWFiltering, Selection and Text Transformations
License: MIT License
Filtering, Selection and Text Transformations
License: MIT License
Hello @d-akara
There is a teeny-tiny problem with loading Align To Cursor screenshot on the marketplace page.
Look at this:
I think when you rename their names, you forget to capitalize the first letter of the "Align To Cursor"s name. Based on your directory it must be: https://raw.githubusercontent.com/d-akara/vscode-extension-transformer/master/readme-images/Align-to-cursor.png
Regards.
I would really like to see this option so save me from having to do two things. 🗡
Love the extension - great work.
Rob
:)
Create new document with a count of occurrences for each line.
Useful for determining how many duplicates
From the documentation it is not clear how to invoke the "Align CSV".
From the animated screenshot it is not clear where to click for the magic to happen.
I tried many left and right clicks on every imaginable and non-imaginable places but none duplicated the screenshot.
Please help....
Meir
I would like to request a way to sort in Natural sort order (i.e., sort alphabetically but group multi-digit numbers).
My use case is when I have a column of numbers that I want to sort numerically. For example a sort result might be the following:
foo 2 bar 2
foo 2 bar 11
foo 11 bar 2
foo 11 bar 11
In theory, a "Sort by number" instead of "Sort by natural order" could also satisfy my use case, but I think "Sort by natural order" is more general.
Is it possible to control whether the sort is case-sensitive or case-insensitive and whether it is ascending or descending?
Nice extension which works well for my purpose.
One feature which will save me even more time, is to SplitBeforeDelimiter or SplitAfterDelimiter. It means that the delimiter will stay at Begin or End of Line, respectively.
My example:
When I wrap a list on multiple lines, I want to keep the comma. I know I can add it back with a search& replace, but it will be better if it is not eaten at all.
{plenty_of_long, but_variable_in_length, name_for_a_useful_project}
after SplitAfterDelimiter(",") would give
{plenty_of_long,
but_variable_in_length,
name_for_a_useful_project}
-e one=two -e three=four -e do_it=again -v -t 30
after SplitBeforeDelimiter(" -") would give
-e one=two
-e three=four
-e do_it=again
-v
-t 30
Thanks for reading
I don't know if there is any log file that I can provide here.
VSCode currently does not support recordable macros.
We also can not implement this as an extension since the API's don't let us track all user activity.
This is an attempt at hopefully providing the next best option, macros as scripts.
Feature ideas:
escape does not undo
Add new command and change existing command to Lines as JSON Array
I find that I use line transformations all the time, but I use multi-selection even more. I often want to transform a number of selected regions, but I always have to copy/paste or manipulate them into a set of lines, do the transform, and then return them to their original locatinos/structure.
If the simpler line operations (sort, reverse, randomize, and maybe trim) could be performed on multiselected regions instead of just lines, that would be a game changer for multiselection manipulation.
For example, consider reversing the order of the color codes in the following:
plotLine1 = Line(
color="green",
----- <---- selection
legend="Revenues"
)
plotLine2 = Line(
color="yellow",
------ <---- selection
legend="Costs"
)
plotLine3 = Line(
color="red",
--- <---- selection
legend="Profits"
)
Or sorting the city names alphabetically in the following (a little contrived since it could be done trivially in the code itself, but this could be a list in a text document or a non-contiguous selection):
cities = ["Stockholm", "Copenhagen", "Oslo", "Helsinki", "Reykjavik", "Nuuk"]
--------- ---------- ---- -------- --------- ---- <---- selections
Could you write some additional lines of documentation to explain the
Filter Lines As New Document/ Parent levels
command, because I still do not understand it. Seems does nothing for me. If I use it with the positive number then it gives back the whole text and with negative do some changes.
What would be the section level?
Thank you!
Reverse order of lines selected
I tried to merge this extension to Transformer but i can't. Can you do it pls?
Make the existing command the advanced version.
Create new command for only doing regex filtering to make it quicker and easier.
With multiple lines (or multiselect regions) selected, the ShiftRight / ShiftLeft commands would 'rotate' the lines/selections. E.g. selecting the following lines:
Jerry Cobb
Laura Ortega
Owen Castillo
Randall Boone
then invoking ShiftRight once, would become:
Randall Boone
Jerry Cobb
Laura Ortega
Owen Castillo
I select multiple lines leaving the cursor on the next line which is not part of the selection.
Then I run "Transform: Unique Lines" and the line on which the cursor was becomes duplicated.
It happens every time I launch the action.
2 new commands:
I would rather have the transformation action never reuses an open editor but instead create a new one with a unique name.
The current behaviour makes it harder to work with text in unsaved documents.
When values contain a text delimiter like ", with a separator character inside like , then the text delimiter is not considered, and the delimiter inside is used.
https://github.com/dakaraphi/vscode-extension-transformer#align-csv
Input
Company Name,Address 1
"fill,buz","foo,bar"
Actual Output
Company Name ,Address 1
"fill ,buz"
Expected Output
Company Name ,Address 1
"fill,buz" ,"foo,bar"
Hello, I've been using your extension for almost a year and I find it very useful.
I'm Italian and unfortunately we have, like many other languages, accents!
It would be very useful to have a command like: "Remove accented characters"
If you are interested in the past I have updated an existing list in an extension called "accent-neutralise", here you can find the most common characters that need to be replaced.
Another useful thing would be replacing spaces with underscores.
In database tables i use lowercase names separated with underscores and they should not contain accented or special characters.
Example: Quantità art. -> quantita_art
If you think this could be implemented in your extension I could try to fork it and provide some help, just tell me if you think it's possible 👍
Thank you for your work! Have a nice day
I suggest a new command, "Unmatched Lines As New Document"
like "Filter Lines As New Document" but...
A new document is created with lines that do not match the filter.
Thanks!
This extension would be great if you could do align csv and unalign csv. This would allow me to see the data in columns and even do some edits and then put everything back together.
Also, why do you remove the comma when doing the align? That breaks the csv.
What is the intended license of this project?
Publishing this extension to the Open VSX Registry in addition to the Visual Studio Marketplace would allow it to be used with apps such as VSCodium and Gitpod as well. Details on this process can be found here.
Edit, for anyone coming across this until it is solved: I found a similar extension called Text Power Tools, which is available on Open VSX.
Transformer is really a good extension. However, The align csv function does not support Chinese well. I hope you could fix this:
test-case:
this,中,some
is,国(备注),other
a,语(其他),key
test,言,contents
then, choose "Transform Align CSV" and the result is:
this ,中 ,some
is ,国(备注) ,other
a ,语(其他) ,key
test ,言 ,contents
Nice wiki, with all features but I could not find how to use it.
I love this extension and use it daily. Thank you for your hard work.
A helpful feature would be the ability to select lines and add one character to the end of each line - like a comma.
1
2
3
4
1,
2,
3,
4,
Another helpful feature be the ability to select lines and add characters before and after each line (example below).
1
2
3
4
array.Add("1");
array.Add("2");
array.Add("3");
array.Add("4");
It would be great to be able to specify a different delimiter,
possible delimiters: \t
, ,
, and ;
.
Remove all whitespace from lines
Provide commands for common escapes, encodings or other value conversions
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.