deathau / cm-typewriter-scroll-obsidian Goto Github PK
View Code? Open in Web Editor NEWTypewriter Scroll Obsidian Plugin
Typewriter Scroll Obsidian Plugin
When using the action "move line up/down", the display should scroll with the moving line.
This is a great plug-in, thank you.
I was wondering if there is an option to have it turned off as default and be able to toggle it when needed. I love it when writing, but when browsing through notes and copy-pasting it can be a little cumbersome. If I enable the plugin in Obsidian, then it is automatically on in every note I open; I would rather have it off by default and toggle it with a keyboard shortcut. (Now the shortcut only works if it's on by default.)
Regardless, thank you!
Zen mode is very helpful for writing, but distracting for reading.
Similar to the original feature in IA Writer, is it possible to pause Zen mode when scrolling? And then restart Zen mode on a mouse click or key press?
Unlike this previous issue, it seems that live preview tables does not respect the typewriter offset defined (with typewriter scroll toggled on). It is mildly annoying but bearable for now.
Either way, thx for making such a great plugin!
Attached is a video of what I am talking about.
Hey,
I love the plugin - sometimes I absolutely hate it, especially for editing longer notes, the page jumps to much I get confused and it breaks my focus.
So: Could you add an option to add a hotkey to turn it on and off quickly :)
(Don't take the "I hate it" to literally, I could not resist describing my experience in such a nice contradicting way. The moments I love the plugin greatly outweigh the times I don't like it so much)
This is a wonderful plugin! I use Vim mode and I noticed when I'm in insert mode it works as expected, but when I'm in normal mode it behaves like normal and the cursor doesn't stay in the center of the screen. When I return to insert mode and move the cursor, the current line is centered as expected.
I would really appreciate if a type writer icon, or a "Typewriter Scroll" text appeared in the status bar whenever the plugin is in use, since if you don't use zen mode I find it hard to know if typewriter scroll is enabled or not.
Awesome plugin! Would love a beautiful typewriter sound effect while typing. Is this possible?
When I write with the focus mode of the plugin, then sometimes using the spacebar deletes backwards, sometimes just one character, sometimes several.
I use Samsung S4 tablet with Android.
If you need more info, feel free to refer back to me. (Also for the other issue I posted.)
I find that commenting out the onCursorActivity function creates a more enjoyable experience while navigating through my documents. It would be great to have a toggle for that in the Obsidian Plugin Panel.
Causes tables to expand wildly in every direction and makes them unusable in the pre-release versions, and probably will continue to when it becomes official.
It does seem like development has discontinued but this plugin has been enabled pretty much from day 1 that I started using Obsidian. So either way, thanks for almost a year of making my Obsidian experience better!
When a note is not very long (like when it starts empty) and is entered in a "tall" window, each typed character makes the whole not text "shake". This is not very convenient.
In case this matters:
Thanks!
Hey,
it would be very nice, if it is possible to implement that.
Right now the scrolling is more an instaneaous jump to the line when clicking. This is a bit confusing as there is a high load of perceptive change. It would be better, if there is a brief delay and then a smooth scrolling movement to the clicked line. This would help the brain to comprehend the change because there would be a lesser cognitive load.
HI, Thank you for great plug in.
I'm using your plugin, and in korean scroll up a line after enter or . or , .. etc not another line.
I captured screen.
The scrolling of the live preview is way out of sync.
At the top of the document for example, the edit side starts at the middle, but the preview text starts at the top.
Sadly this makes the plugin mostly unusable.
This repository doesn't have topics set such as obsidian
, obsidian-md
, obsidian-plugin
which leads to less reach. Please add these topics, so Obsidian users can easily find the repository for this great plugin! ๐
I'm using Plugin: v0.1.1, Obsidian: v0.13.19. Already turned on "Toggle Typewriter Scrolling" but the plugin not work. The cursur still on top of note. Can someone help me?
It seems like this plugin does not work at the moment with obsidian mobile (can be enabled, but doesn't seem to have any effect) - would love to see support for it!
Hello thanks for your plugin, I use it daily and very much appreciate the work you put in.
Just a small feature request:
Possible solutions:
I cannot turn off the focus mode of the plugin. Just by turning off or deinstalling the plugin.
I use Samsung s4 Tablet with Android.
Using version 0.1.0 of the plugin and v0.12.19 of Obsidian I have following issue:
I can install the plugin, but when activating I get the message: "Failed to load." Samsung S4 Tablet.
I'd like to add a feature where the number of visible lines above or below the current line always present during scrolling, here is a demo of the expected behaviour if a scrolloff
option is set to 5:
notice that the number of lines above the cursor is always 5 when scrolling up. The same effect for scrolling down is not yet implemented.
The following modification to typewriter-scrolling.js
's CodeMirror.commands.scrollSelectionToCenter
will implement this effect:
const ALWAYS_CENTRE = false; // turn off scroll offset, always centre the line // TODO add to settings
const SCROLL_OFFSET_LINES = 5; /* TODO add to settings */
CodeMirror.commands.scrollSelectionToCenter = function (cm) {
var cursor = cm.getCursor('head');
var charCoords = cm.charCoords(cursor, "local");
var scrollInfo = cm.getScrollInfo();
var top = charCoords.top;
var halfLineHeight = (charCoords.bottom - top) / 2;
var halfWindowHeight = cm.getWrapperElement().offsetHeight / 2;
/* TODO define as global var on plugin load, cuz each line height is different and will lead to inconsistent offset sizes */
var scrollOffset = 2 * halfLineHeight * SCROLL_OFFSET_LINES;
var scrollTo = null;
if (ALWAYS_CENTRE || scrollOffset >= halfWindowHeight - halfLineHeight) {
scrollTo = Math.round((top - halfWindowHeight + halfLineHeight));
}
else if (top < scrollInfo.top + scrollOffset) {
scrollTo = Math.round(top - scrollOffset);
}
else if (top + 2 * halfLineHeight > scrollInfo.top + scrollInfo.height - scrollOffset){
/* this part is not working properly */
scrollTo = Math.round(top + 2*halfLineHeight + scrollOffset - 2 * halfWindowHeight);
}
cm.scrollTo(null, scrollTo);
};
If it's okay, I will open a pull request and work on it.
SCROLL_OFFSET_LINES
above) and "Always centre (current Typewriter scrolling behaviour)"Per dy-sh/obsidian-remember-cursor-position#16, Typewriter Scroll breaks this other plugin's primary function by resetting the position to the head of the file. I don't know enough about JS to know if there is an elegant way to make these plugins interact, but I have personally commented out line 79 in My bad---didn't test this properly and it does not work after all.main.js
, where it reads var cursor = cm.getCursor('head');
and it solved my problem. Obviously this will be reset the next time Typewriter updates, but it would be great if there were a solution to this conflict built-in.
Typewriter Scroll makes my writing much more pleasant, thank you for your hard work!
Upgraded Obsidian from v0.9.19 to v0.10.0 and once Toggle Typewriter Scrolling is on, switching it off has no effect. Switching plugin off has also no effect (functionality stays on). Closing Obsidian helps.
In VS Code I use keyboard shortcuts for scrollLineDown/scrollLineUp commands.
They allow to scroll in typewriter style from any row, leaving cursor in that row.
Would it be possible to expose these commands in this plugin?
Instead of darkening the rest of the text, is it possible to use a background color for the line? Perhaps even scale the line a little to increase visibility even more?
to extend on the typewriter user experience, having a mode that disables the backspace and arrow keys would be nice. I've seen this in some editors and it is quite useful when you want to force yourself to write without editing. Not sure how it is called though.
When writing a new note I sometimes look at other notes and may want to copy a text snippet or footnote. With the plugin enabled switching between panes is rather annoying. Therefore it'd be great to only toggle the plugin for a specific pane.
I've just noticed this bug, and through a process of elimination have found that Typewriter Scoll is causing it. Essentially, when I click on a link to a block from another file, I jump to the top of the file instead of to the linked block. Would this be because the cursor defaults to the top of the file and so the view automatically adjusts?
I use this plugin to let me scroll past the end of a file so that I can keep the current line centered even while adding to the end of a file.
However, now I can also scroll past the top of a file which is a bit visually jarring! Granted, some might like that but it would be great to disable that.
Typewriter scrolling hasn't been working for me anymore since I deactivated the Legacy mode.
Are there any plans to get this plugin working for the newest Obsidian version and possibly with Legacy mode deactivated?
I enjoyed using this plugin a lot but cannot use it anymore.
When engaged, Typewrite Mode hides the bottom half of the standard file explorer plugin. I have turned typewriter mode on/off, and it consistently does this. I am surprised that no one else has reported this. So, I can only assume that typewriter mode is interacting with some other plugin or set of plugin that is unique to my setup.
I don't know if this will be of any use, but here is the list of my installed plugins:
With the new LP update I need to reload Obsidian to toggle off the scrolling feature.
Cause the plugin can't show content when preview a card. Thanks lots
G'day Gordon,
I couldn't see a Discussion area on your github so posting here. Just letting you know I have done an article and video on your plugin. Youtube, my site and Medium.
https://ricraftis.au/obsidian/discover-typewriter-scroll-plugin-a-hidden-gem-for-obsidian-users/
Cheers from Wedderburn, Vic.
Ric
I love this plugin! I use vim-scripts/scrollfix in Vim as well.
Will you please add a configuration for the line number that the cursor sits on.
I have Vim setup so that 1/4 of the page is above the cursor and 3/4 is below.
While opening a file from a link to a section ([[The Page#Section]]
), due to this plugin, scroll location always ends up being at the top of the page. If the page is already open in other pane, and I click on the link again, it works fine and takes me to that section.
Definitely this is undesired. It should go to the desired section upon the first landing too.
Attached is the gif. Please see to it if it can be fixed :)
Create a new file on the left. Right click it. Delete it. It will trigger typewriter mode.
Can this be fixed? Thanks. Love this plugin but it's annoying me
Hello, it seems like there was a rather verbose console.log() left in the most recent release, specifically in the typewriter-scrolling.js
file.
It seems like this was removed in commit 31f47b2 and just needs to be pushed to release.
When Typewriter Scroll is used in combination with Fastkeys(an Autohotkey alternative), it deletes the word I'm currently typing. Not always, and I couldn't find a pattern, but often enough to be announced. I had to turn it off.
I would like to continue to use it, but unfortunately, I can't in this state.
Please, let me know if you need additional info.
the plugin only works in legacy mode.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.