Code Monkey home page Code Monkey logo

Comments (11)

AtlcatlQ avatar AtlcatlQ commented on June 16, 2024 1

Or, you can simply use Minimal Theme and Style Settings.

image

You can edit that and another lot of things directly

from cm-typewriter-scroll-obsidian.

davisriedel avatar davisriedel commented on June 16, 2024 1

I like having the line in which the cursor is positioned highlighted. I also found several snippets using .cm-line.cm-active on the web, but those highlight the whole paragraph and not just the line where the cursor is (and where the scroll is fixed to). Since I thought I could save myself some time by putting the feature in this plugin, I started implementing this on my fork https://github.com/davisriedel/cm-typewriter-scroll-obsidian.

Does that type of line highlight sound interesting to anyone else? Then I could polish the feature a bit more and open a PR.

from cm-typewriter-scroll-obsidian.

gbraad avatar gbraad commented on June 16, 2024

The following works for me

body.plugin-cm-typewriter-scroll-zen .CodeMirror-lines.selecting .CodeMirror-code > .CodeMirror-activeline {
  background-color: #333333;
}
                                                                                                                 
body.plugin-cm-typewriter-scroll-zen .cm-editor.cm-focused .cm-line.cm-active {                                   
  background-color: #333333;
}

Screenshot from 2023-02-19 15-33-18

Besides the color I also played around with padding and scaling which gives some nice results.

  transform: scale(1.05);
  padding-top: 8px;
  padding-bottom: 8px;

Screenshot from 2023-02-19 15-28-57

Options for this would be nice to have. WDYT?

from cm-typewriter-scroll-obsidian.

gbraad avatar gbraad commented on June 16, 2024

Another set of plugins is not always the solution. Already have 60MB+ of plugins compared to a few kilobytes of actual text files.

Minimal Theme

I am not using the Minimal theme

Style Settings

This might be an option, however I believe these changes go well with the Typewriter plugin as they concern the same. (Style Settings will ONLY allow this when Minimal is also used).

from cm-typewriter-scroll-obsidian.

FelipeRearden avatar FelipeRearden commented on June 16, 2024

@davisriedel

Fantastic idea. I would like to have this feature too !!!!

from cm-typewriter-scroll-obsidian.

davisriedel avatar davisriedel commented on June 16, 2024

I now have a working example of this in my fork in the highlight-typewriter-line branch. Feel free to check it out!

Since I needed to disable the typewriter line highlight while scrolling I was able to reuse the code to also implement issue #28. You can find this in my fork in the zen branch and in main.

Note that now the text snaps into the typewriter offset when clicking the text again after scrolling. This only makes sense if a fixed typewriter line is displayed. But I could easily implement a toggle to preserve the old behavior unless using the highlighted typewriter line. Do you want me to do so before submitting a PR?

Furthermore, because everything started to increase in complexity I also refactored and restructured the code quite a bit - would that be a problem if I open a PR?

from cm-typewriter-scroll-obsidian.

FelipeRearden avatar FelipeRearden commented on June 16, 2024

Furthermore, because everything started to increase in complexity I also refactored and restructured the code quite a bit - would that be a problem if I open a PR?

Let me just share an idea that I had while I was reading your post...

How about creating a new plugin instead of a PR?

This plugin is not updated for almost a year and we dont have a feedback fro the developer on issues in this plugin and in other plugins from this developer for many many years.

→ The same thing occurred with the Maximised Active Panel that was integrated inside the Pane Relief plugin.

My humble opinion is that we have an amazing plugin BUT we need some updates/adjustments/refactor that are vital to the long term. Since you are interested in develop these updates/adjustments/refactor, I think the best way to continue this is in a new plugin :)

from cm-typewriter-scroll-obsidian.

davisriedel avatar davisriedel commented on June 16, 2024

This is a good idea. Creating a new plugin would give me even more freedom for adjustments. I will start working on it as soon as my time allows :)

from cm-typewriter-scroll-obsidian.

FelipeRearden avatar FelipeRearden commented on June 16, 2024

This is a good idea. Creating a new plugin would give me even more freedom for adjustments. I will start working on it as soon as my time allows :)

Thats great news @davisriedel !!!! Let me know when you have a release that can help you with the tests :)

from cm-typewriter-scroll-obsidian.

davisriedel avatar davisriedel commented on June 16, 2024

@FelipeRearden thanks for offering your help with testing.

I used the last few days to completely rework the plugin in order to make it more extensibale and I introduced several new features. I published a first pre-release beta in my new repo: https://github.com/davisriedel/obsidian-typewriter-mode. Feel free to try out the plugin and open issues if you find any bugs.

I also intend to implement a few other features that were requested here in this repo.

The plugin is not yet submitted to Obsidian. I want to take some time using and testing it myself before I publish it to Obsidian.

from cm-typewriter-scroll-obsidian.

FelipeRearden avatar FelipeRearden commented on June 16, 2024

Hello @davisriedel !

Thank yuo very much for this first pre-release ! I saw your message and I am playing for a few hours in a test vault to get some first impressions.

What I have to say from my end is that things are fantastic !

I am in love with underline it is exactly what I need :) 💙

I think this plugin is gonna be a huge success . I think you are gonna receive many FRs because there are many variations of workflows :)

Let me continue to play for a few days and after the merge in my main vault and I get back to you.

Looking at this release and looking for the roadmap, I think you have an amazing plugin that could be a game changer for Obsidian users.

Let keep talking (now in your repo) and thank you very for creating this project !

I wish you a fantastic day ☀️

from cm-typewriter-scroll-obsidian.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.