-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feature Request] - Pretty print only selection of text #43
Comments
I've been thinking about that for some time now. I'll try to come up with
something soon.
…On Thu, Aug 3, 2023, 2:02 PM Rodney Beede ***@***.***> wrote:
It'd be nice to have an option to only pretty print the currently selected
text in a document. I may have a .log file with a mix of plain-text and
some JSON lines in it.
If I could select just some lines of text and only format those that would
be nice.
—
Reply to this email directly, view it on GitHub
<#43>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/ALAQAI5CQGE65VRBS2NJ7ITXTQGVLANCNFSM6AAAAAA3DKJJ44>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
I am going to work on this, but FWIW, a somewhat decent option for dealing with log files containing JSON is to use the For example, consider this fake log file:
Open the find/replace form, select the
which is a JSON lines document. I know this isn't a real substitute, but just something to think about. EDIT: In the above example, if you first do a find/replace of
|
## [5.5.0] - 2023-08-13 ### Added 1. __Add support for [operating on selections](/docs/README.md#working-with-selections)__ (fix [issue 43](#43)). 2. Add method for [selecting every valid JSON element in the file](/docs/README.md#selecting-all-valid-json) 3. Add `D&ump text of current document as JSON string` and `Dump JSON string(s) as ra&w text` convenience methods. 4. Add [`parse`](/docs/RemesPath.md#vectorized-functions), [`type` and `stringify`](/docs/RemesPath.md#non-vectorized-functions) RemesPath functions. 5. Added UI tests. ### Changed 1. Improved RemesPath [boolean indices](/docs/RemesPath.md#boolean-indexing) so that they can be more easily chained together. 2. Removed unneeded RemesPath lexer tests. ### Fixed 1. Bug where `s_slice`, `max_by`, `min_by`, `group_by`, and `sort_by` all did not allow Python-style negative indices. 2. Bug where out-of-bounds negative indices when indexing in an array would throw an error rather than returning an empty array (which is the correct behavior, since RemesPath is not supposed to throw errors for indexing out of bounds). 3. Eliminated huge latency when viewing very long JSON strings in the treeview. 4. Eliminated potential access violation during plugin cleanup. 5. Bug in which the plugin would be mistaken about the position of JSON elements after PPrint-style printing of some JSON containing non-ASCII characters in strings. 6. Bug in which multiple Sort forms could be open. 7. Bug in which running tests in Notepad++ versions older than v8 could cause Notepad++ to crash.
I'm going to leave this open so that people can respond with any bugs in the implementation I made in v5.5. One known bug is that every now and then there's a (harmless but annoying) plugin crash when switching between buffers. If anyone can figure out what's causing that, I would be eternally grateful. |
It'd be nice to have an option to only pretty print the currently selected text in a document. I may have a .log file with a mix of plain-text and some JSON lines in it.
If I could select just some lines of text and only format those that would be nice.
The text was updated successfully, but these errors were encountered: