-
Hi, I have such a workflow that I have to copy some text (parameters) from json that is display on a webpage. Currently, I enter visual mode, then use / to search for start of the param (in bellow example that would be /Value1). Example:
Now I am interested if somehow I can improve this? For example could I with usage of map or runKey do something better? Ideally, how would I love this to work would be in the same manner as find (f) works where I would get chars I need to type to get value in-between " " to clipboard. I believe to achieve my ideal scenario would required new feature to be implemented all together? If possible I would be interested to help with implementation if that's something that is seen as useful. P.S. Thanks for the great tool! I just started using it yDay and I already love it so much. |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 4 replies
-
is the json a plain text node, or rendered in color using many div elements?
…---Original---
From: ***@***.***>
Date: Thu, Apr 7, 2022 18:13 PM
To: ***@***.***>;
Cc: ***@***.***>;
Subject: [gdh1995/vimium-c] Need to copy param values from json (copy text inside quotes " ") (Discussion #600)
Hi,
I have such a workflow that I have to copy some text (parameters) from json that is display on a webpage.
Currently, I enter visual mode, then use / to search for start of the param (in bellow example that would be /Value1).
And then select everything up until end of line with $ and then return a couple of chars back hit enter and I have it in the clipboard.
(I feel I should be able to do this better, to somehow jump to end of " but I was not able to figure that out - if anyone knows please help)
Example:
{
"Param1" : "/Value1INeedToCopy/with/some/path/blabla",
"Param2" : "/Value2INeedToCopy/with/some/other/path"
..etc
}
Now I am interested if somehow I can improve this? For example could I with usage of map or runKey do something better?
Ideally, how would I love this to work would be in the same manner as find (f) works where I would get chars I need to type to get value in-between " " to clipboard. I believe to achieve my ideal scenario would required new feature to be implemented all together? If possible I would be interested to help with implementation if that's something that is seen as useful.
P.S. Thanks for the great tool! I just started using it yDay and I already love it so much.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
The most generic way is to use If you just want to remove the
|
Beta Was this translation helpful? Give feedback.
-
Hey @gdh1995 . I saw that 1.98.0 was out and this works. Huge thanks! I improved it a bit:
This will replace everything before and including " and everything after and including " with the content inside " ": And this is great. Now I want to improve on this even more but I am stuck I spent a couple of hours looking at wiki: https://github.com/gdh1995/vimium-c/wiki/Map-a-key-to-different-commands-on-different-websites and trying things out but I see huge potential to make 2) single key however unable to understand the wiki how to do it? Could you please help? Thanks a lot! |
Beta Was this translation helpful? Give feedback.
-
The 2nd step can be replaced by such mapping rules:
Wiki of the BTW, the regexp is not so optimal, and can be replaced by:
|
Beta Was this translation helpful? Give feedback.
The 2nd step can be replaced by such mapping rules:
Wiki of the
run
directive: https://github.com/gdh1995/vimium-c/wiki/Auto-run-a-tree-of-commands .BTW, the regexp is not so optimal, and can be replaced by: