Skip to content
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

marker are not save ? #5

Closed
jonlepage opened this issue Jan 1, 2017 · 15 comments
Closed

marker are not save ? #5

jonlepage opened this issue Jan 1, 2017 · 15 comments

Comments

@jonlepage
Copy link

Ryuichi Inagaki
14 hours ago

Happy New Year to you and thank you for your plugin.
I'd like to use your plugin to improve my js codes in a game engine developer context.
I would like to know, if will be possible do similar highlight of what [notepad++] allowed.
Here is a rough example to highlight and separate some line of code. in [notepad++]
Your plugin is ideal for me, but highlight does save when closed?
http://imgbox.com/ONUBaWcn

I would like to be able to highlight with a white background color and saved. :)
I'm new to VBC and I love it, I only regret marker layout, but your plugin will seem able to offer this context
Thank you friend

@ryu1kn
Copy link
Owner

ryu1kn commented Jan 2, 2017

Thanks for your suggestion. The image was very helpful 👍

Let me first explain what are my main motivations for developing this extension. They are:

  • Help me understand what's going on in the system by highlighting multiple keywords (like certain user id, ip address, ...) in log files (like access log, application log, ...)
  • Help me be sure if system is correctly configured by highlighting multiple keywords through multiple source code or configuration files
  • Help me understand which bit of code has reference to which variables while I read rather complex source code

Now, It seems like what you want to achieve is to always emphasise certain statements (like console.log debug statements) or comments that start with certain sequence (like ##).

Adding the save functionality to the extension would be useful so that I can close the editor and resume the log reading later. Supporting regex to highlight would also be great. It allows me to highlight not only the texts beginning with ## but also texts with slight variation such as date string. I'll think supporting it.

But perhaps, as what you want is more like customisation of your syntax highlighting, if you're only thinking about js, it might be faster if you write your own js syntax highlighting and replace the default one. cf. Adding Language Colorization 😉

@jonlepage
Copy link
Author

jonlepage commented Jan 2, 2017

comments that start with certain sequence (like ##).

Adding the save functionality to the extension

I was afraid, not to be understood but you seem to have all understood !!
for the Adding Language Colorization,
I am an elder of (notepad ++).
At the moment I still find it super complicate the methods of custom syntax Colorization, .
But, I hope a pro like you, is able to help me with your plugin.
For now, I still find super complicating methods of personal syntax on VBC.
I will be very happy with your plugin, if we can highlight a few lines of code and save it.

Example: Key:
CTRL + H [set highlight code select] , and CTRL + ALT + H [switch++ background highlight color].

Thank you very much friend, for your attention, I remain alert of your updates.
Your plugin is really helpfull for me .

If my request does not seem to use you.
It does not matter, I was simply suggestion hoping for a positive answer.

have nice day

@thomasf
Copy link

thomasf commented Mar 22, 2017

It would maybe be a good thing to be able to add highlights to user or workspace settings to manually persist some hl's.

@ryu1kn
Copy link
Owner

ryu1kn commented May 17, 2017

@thomasf Sorry, somehow I missed your comment...

Cool, seems we can use WorkspaceConfiguration#update introduced in code v1.6

@ryu1kn
Copy link
Owner

ryu1kn commented May 17, 2017

I use this issue for persisting highlights. Supporting regular expressions will be done in #8

@jonlepage
Copy link
Author

yes it work thank

@Otiel
Copy link

Otiel commented Oct 23, 2017

Any progress on the save highlights functionality? Are you still considering adding it or has it been dropped?

@ryu1kn
Copy link
Owner

ryu1kn commented Oct 24, 2017

Not dropped. I think this feature is useful. I just haven't got enough time to work on this at the moment

@ryu1kn
Copy link
Owner

ryu1kn commented Dec 3, 2017

Things to consider

On saving highlights

  • Which settings (user/workspace/workspace folder) to save highlights to?
    a. Ask user which settings to save all highlights to
    b. Ask user which highlight to save to which settings
    c. Save to workspace settings
    • If there is no workspace settings file yet, it will create a .vscode/settings.json. That's not great.
  • Replace saved highlights or add highlights?
    a. ➡️ Replace
  • What if a highlight is already saved in user settings when saving into workspace settings?
    a. Do not save into workspace settings
  • What if a highlight is already saved in user settings and now it's toggled off and then save to workspace settings triggered?
    a. Leave the highlight in user settings
    b. Remove the highlight from user settings

On restoring highlights

  • When to restore highlights?
    a. On extension start
    b. On restore highlights command invocation
  • How to read settings?
    a. Only read the most specific settings (workspace settings if it exists)
    b. Merge all settings (read both workspace and user settings), like search.exclude setting.
    • What if user doesn't want to inherit the user level highlights?

@ryu1kn
Copy link
Owner

ryu1kn commented Dec 3, 2017

Let's get this feature out with the simplest functionality. After getting feedback, we'll decide how to evolve it from there.

  • User selects which settings all highlights should be saved to
  • Overwrite existing highlights in settings on save
  • Do not save a highlight if one is already saved in some settings Dropped
  • Read highlights from the most limited scope settings
  • Read highlights on extension startup

ryu1kn added a commit that referenced this issue Dec 4, 2017
ryu1kn added a commit that referenced this issue Dec 4, 2017
As current stable one doesn't support async/await syntax
@mjunaidch
Copy link

Hello,

This is great plugin . I am waiting for Save Highlight feature. I think it comes soon... @ryu1kn

Regards

@ryu1kn
Copy link
Owner

ryu1kn commented Feb 16, 2018

Hi @mjunaidch . I started working on Dec but got distracted by other stuff. I should resume the work, thanks for reminding me 😄

ryu1kn added a commit that referenced this issue Feb 17, 2018
ryu1kn added a commit that referenced this issue Feb 17, 2018
ryu1kn added a commit that referenced this issue Feb 17, 2018
ryu1kn added a commit that referenced this issue Feb 17, 2018
@ryu1kn
Copy link
Owner

ryu1kn commented Feb 17, 2018

Finally published as v0.11.0! 🎉

Sorry that it took me a year. @djmisterjon @Otiel @thomasf , if you're still using TextMarker, please try it out 😉

@ryu1kn ryu1kn closed this as completed Feb 17, 2018
@Otiel
Copy link

Otiel commented Feb 19, 2018

It works fine according to my few tests. Thanks for your work! ❤️

At first I thought it didn't work because I didn't think I was supposed to call "Save All Highlights" before restarting VS code. Hence #10.

@ryu1kn
Copy link
Owner

ryu1kn commented Feb 21, 2018

Cool, thanks for testing it out @Otiel !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants