jrymk / restore-tab-key Goto Github PK
View Code? Open in Web Editor NEWAn Obsidian plugin to make the tab key insert a tab, and make it feel like any other IDE regarding tabs and indentation.
License: GNU General Public License v3.0
An Obsidian plugin to make the tab key insert a tab, and make it feel like any other IDE regarding tabs and indentation.
License: GNU General Public License v3.0
When using the plug in "Restore Tab Key" and "Obsidian Outliner" together, it results in errors whenever indenting a group of bullet points.
An example of this is by trying to indent the following group of bulletpoints which do not indent.
instead it result into a large amount of repeating errors of 34 identical errors.
The following is he error message.
RangeError: Maximum call stack size exceeded
at t.getCursor (app.js:1:1250775)
at MyEditor.getCursor (index.ts:65:19)
at OperationPerformer.perform (OperationPerformer.ts:32:21)
at ListsMovementCommands.indentList (ListsMovementCommands.ts:86:63)
at Object.eval [as editorCallback] (createEditorCallback.ts:8:35)
at e.mobileOnly.Mt.isMobile.e.checkCallback (app.js:1:1835420)
at o_ (app.js:1:1834718)
at e.executeCommand (app.js:1:1836282)
at e.executeCommandById (app.js:1:1836189)
at run (plugin:restore-tab-key:62:24)
If you try to indent the group of bullet points even after failing, Obsidian eventually crashes.
Hello,
Thank you for this plugin. It really saved my life by not forcing me to change a very deep muscle memory.
Anyway, if you hold TAB to insert several tabs, it goes back to the original behavior and indents the whole line, even though nothing is selected. Is there a way to fix this?
In #3 ,
you are provided Plugin's setting Use with Obsidian Outliner plugin
i tried this setting .
It looks like below when Outliner plugin.
1.
isn't input .
(but tab is input in bullet point text.)
This may be especially troublesome when you want to insert a tab in a code block.
i think feel this needs to be fixed.
Thank you so much for adding this feature!
I normally type out tables by hand, with the pipe characters lined up so they "look right" in the markdown source as well as the rendered output. I use the TAB key to space things out for this.
I have to turn off the "Only activate in code blocks" setting for this, but this also disables the TAB key's functionality when typing bulleted lists (where I want the TAB key to indent the whole line rather than adding spaces or a TAB character).
It might make sense to offer separate toggles for different "typing states", such as ...
I personally would use "yes, yes, no, no" for these, but I can see where others might want different settings, especially if they're using other plugins that I don't use (or have never heard of).
In some cases, users who want to use spaces to replace tabs, meanwhile can have same align behavior like tab, like vscode does.
take Space count=4
for example:
# before
abc[tab]
# after
abc
^ cursor
rather than:
abc
^ cursor
So the Space count
option in plugin setting will be defined as Max Space Count
.
This issue may improve user experience.
Thanks for your efforts to make obsidian operates as we expect !!!
Normally the plugin works fine.
The problem is when we select some texts, the tab
behaviors as it used to do: indent who lines selected.
select between []
:
app.service.[include]()
press tab
:
app.service.include()
select between []
:
app.service.[include()
app.flow create]()
press tab
:
app.service.include()
app.flow.create()
When we use VSCode, tab
on multiple lines behavior the same, but on single line, tab
will use tab or spaces to replace the selected text, I hope we can change for such pattern.
Tab
is used in the popular Advanced Tables plugin to jump into the next column of a table.
This obviously conflicts with the intended use of restore-tab-key.
I suggest an option to disable the restore-tab-key behaviour when the cursor is inside a markdown table.
Many thanks for the great plugin btw!
Hi!
Your plugin is great, but it come to be conflict with tabout.
It will be cool if the plugin can be "disabled" (aka no indent, no space) if we are in between all markdown markup.
Another solution is to set the plugin on another key, for example shift+tab
, or alt+space
.
I might be wrong, and sorry if this is presumptuous. But the link you use in the forum seems quite different to what this plugin does.
I wonder if you actually meant to link to this FR post? https://forum.obsidian.md/t/option-to-disable-tab-to-indent/40868
That was the thread where you first announced this plugin. And it has a much larger discussion including different use cases related to typing tab mid-sentence, or inside bar-codes.)
The Help thread you linked in your description doesn't seem exactly related to your plugin.
Chris (rigmarole)
"Tabs" and "tab character" added would make this easier to find.
Many thanks!
Hey,
thanks at first for the great plugin, the default tab behavior in obsidian is absolutely not to my taste.
The plugin causes one problem though:
If line in a bullet list ends with ' " ', the next line will not have a bullet, as expected:
actual result with plugin enabled:
With Restore Tab Key disabled, it works as expected.
Kind Regards, Lichtwitzig
Hi, and thank you for your work on this plugin. Unfortunately it doesn't seem to work, as I assume it would, for me.
I have the latest version (updated just now) with the default settings. However, when I press tab on a line (not selecting anything), it indents instead of putting in spaces (as per the configuration).
Additionally i have enabled use with Advanced Tables, but when I tab in a cell it indents that entire line (as seen in source code view), instead of navigating to the next cell.
Apologies if I'm misunderstanding the purpose of this mod. However, if my understanding is correct, is there any reason why the plugin might not be working for me? I'm a new obsidian user and don't have many plugins installed other than: Advanced Tables, Jelly Snippets, Emoji Shortcodes, and of course yours.
Cheers.
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.