Coder Social home page Coder Social logo

davisriedel / obsidian-typewriter-mode Goto Github PK

View Code? Open in Web Editor NEW
68.0 68.0 2.0 36.03 MB

Typewriter Mode is a plugin that adds typewriter scrolling (current line stays at a fixed position on the screen), a highlight for the current line, dimming of unfocused paragraphs and more to Obsidian.

License: MIT License

Shell 0.70% JavaScript 0.21% TypeScript 89.22% SCSS 9.87%
markdown obsidian plugin typewriter

obsidian-typewriter-mode's People

Contributors

davisriedel avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

jobedom jiyee

obsidian-typewriter-mode's Issues

Set max amount of characters per line

Obsidian already has a "readable line length" but it does not allow to specify how many characters a line should have at the most. This can easily be added with CSS.

Typewriter mode does not work after switching to different file, console error "addClasses is not a function"

Hey there, I've tried to reproduce this on a new vault, tried disabling all the plugins etc but could not get it to happen in other vaults, but in this vault, typewriter mode doesn't work.

On first load, typewriter mode works, but once you switch to another file, this error throws in console, and typewriter mode stops working:

app.js:1 TypeError: r.addClasses is not a function
    at f.loadPerWindowProps (plugin:typewriter-mode:1:5656)
    at f.onReconfigured (plugin:typewriter-mode:1:5392)
    at f.onLoad (plugin:typewriter-mode:1:5237)
    at new f (plugin:typewriter-mode:1:1876)
    at new eval (plugin:typewriter-mode:1:5066)
    at e.create (app.js:1:361676)
    at e.update (app.js:1:362106)
    at e.setState (app.js:1:462573)
    at t.set (app.js:1:1358863)
    at t.set (app.js:1:2068898)
    at t.setViewData (app.js:1:2083288)
    at t.setData (app.js:1:1757849)
    at t.<anonymous> (app.js:1:1757752)
    at app.js:1:237258
    at Object.next (app.js:1:237363)
    at a (app.js:1:236081)

This throws every time you switch to a different file.

I've tried everything I could think of to identify if there was a plugin that caused the conflict, but had no luck! I copied out the .obsidian folder to a new vault, and can confirm that the problem exists there as well. I've attached a copy, hopefully you can help me identify what the problem is?

Steps:

  • Open the vault and console.
  • Use the arrow key to scroll up and down; observe that the cursor stays centered.
  • Switch to the other file. Observe in console the error is logged. Use arrow key to scroll: cursor no longer stays centered, typewriter mode stops working.

reproduce.zip

Full screen Zen mode / Writing focus mode

A command that opens the active editor in fullscreen, similar to the ProZen plugin. Maybe we should rename the Zen mode we already have to something more descriptive.

«Only activate after first interaction» not really working

The issue

When I open a file, Obsidian takes focus of the note automatically, and «Typewriter Mode» does instantly dim my other lines.

What I expected

Despite automatic focus, «Typewriter Mode» shouldn't dim other lines until I do any action, like inputting characters or selecting other characters or lines. Therefore, when I click through my files – all my notes should be visible as normal. Until I manually touch them.

More thought

My guess is that someday in the past Obsidian didn't focus the note right-away, so plugin worked as expected. But I just started using Obsidian now and a selected note get instantly focused – which is actually convenient, and I don't want to disable it. Probably a new feature or idk. Whether it is, I want «Only activate after first interaction» feature work properly, taking into consideration the auto-selection – it shouldn't count as an actual interaction, from this feature's point of view.

Vim mode compatibility

Plugin seems to not work when vim mode is toggled on, when in insert mode it works just fine

Apparently the old version this plugin forked had a similar issue, maybe look into that?

sorry if comment seems a bit weird i'm new to opening issues and contributing to open source lol

Page scrolls to top when entering Edit Mode

When I switch from Reading View to Edit Mode, I have noticed that the cursor is always positioned at the top of the page while the view is also scrolled back to the top. This means that I have to scroll down again to find the position where I was previously reading in Reading View. Ideally, I would like the view to stay in the same position as it was in Reading View so that I can easily resume editing from where I left off. I believe this issue is caused by the cursor being initialized at the first line of the page. To fix this, it would be great if the cursor could be positioned in the middle of the current viewport when switching to Edit Mode.

The page doesn't scroll up and the wrong line is highlighted

Hi,

I tried using your plugin with Obsidian v1.3.7 and I noticed this issue:

image

The line I'm typing on does not scroll up to the top of the page (I've set it to 10%), although the highlight line is on the 10% mark.
But this also means that the line being highlighted is not the line I'm typing on.

Bug when using vim mode in long notes

Edit a note of about 5000 lines content, whenever I use "j" or "k" to move, the plugin will behave very stuck, there is no way to use.
“typewriter scorll” Although the function of this plugin is simple, it does not cause stalling, I hope it can be optimized.(obsidian version: v1.4.16)

By translation software !

No backspace mode

We could consider adding a "no backspace" mode like in a real typewriter, but this may be out of scope of this plugin.

Enhancement request: Quick enable/disable toggle for Typewriter mode

Enhancement request: The ability to quickly enable/disable Typewriter mode

Scenario / Use case: I like to have the plugin enabled / certain features on (ex. dim paragraph, typewriter scroll, and highlight line) when I'm writing but I don't like the plugin enabled / those features on when I'm not doing heads down writing. As is, to switch between the two modes I'd either have to click into Obsidian settings and enable / disable the plugin entirely OR toggle on / off the three features I like to have on while the plugin is enabled by clicking in, using the command palette, or using hot keys. Both seem onerous and I default to just turning off the plugin entirely and doing without it. Possible solve could be a parent toggle that I can use when the plugin is enabled to switch between the modes... Maybe I could assign a hotkey or something to this too :)

Thanks for all the work developing this!

Extra Extra space at top still

Sorry, I know this is your beta release, I followed your link from the original "Typewriter Scroll" when you replied to this issue on there (the issue of the extra space)

But the issue still exists 😞:
image

Blurred text in .canvas files

I recently got this plugin because I like the look of it, but now when I type in a card in a canvas file, it blurs the text. Below is a picture of what it looks like.
image
I want to use this plugin, but having to turn it off every time I'm editing a canvas will get a little annoying. Is there a fix?

Cannot access command palette from fullscreen

Hi Davis,

I can't access the command palette from fullscreen mode. Let me know if there's other info you need that would help solve this. Thanks!

Also: I was trying to access the palette because I wanted to split the screen to see two notes at once. I left fullscreen mode, split the screen, and reactivated fullscreen. One of the notes closed. So it seems that you can't split the screen in fullscreen mode. Let me know if you'd like me to open a separate issue thread for this. Thanks again!

Line highlighting not rendering in light mode

Hey Davis, love the plugin! I'm having a weird issue with the line highlighting. In dark mode it works fine, but in light mode, the text is highlighted instead of its background.

Screenshot 2024-01-09 at 11 01 09 AM Screenshot 2024-01-09 at 11 01 21 AM

I have a 2023 Macbook and I'm using the Minimal Theme. I can show you my settings files if you think there might be a conflict there. Let me know if there's any other info that might be helpful. Thanks!

Typewriter offset not working

Anything above Typewriter offset > 55 is not working.

If I put any value bigger than that, it just stops doing anything.

There are no errors in the console.

[Bug] The whole Obsidian interface shakes like crazy when typing (see demo)

When I type with typewriter scroll toggled on, the whole Obsidian interface shakes about with every keystroke. See demo:

Obsidian_pm6iFQHLUW

Note that the framerate of the gif is too slow to show how bad it truly is. This, of course, renders the plugin unusable. I had the same issue with the original plugin by deathau, as reported here, which is what prompted me to try this for. But the situation is the same.

Info:
Version: 0.0.2

[Bug] Problem with the New Table Editor in Obsidian 1.5

Obsidian 1.5 introduced a new table editor.

When in Live Preview and trying to edit text inside a table, the text is always moved to the top of the screen. If one edits the text inside a table in Source Mode, the Typewriter Mode Plugin behaves as expected.

Animation

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.