Comments (6)
No problem! I'll message you on Discord about it.
from obsidian-editor-shortcuts.
Thanks for the detailed explanation đ this issue seems like it could be solved with a slight change to your workflow though?
If I'm understanding correctly, the difference in behaviour is because in the first case, you're using the QuickAdd macro with a cursor selection, whereas in the second case, you're using it after selecting the text yourself via the keyboard.
What if you change the macro to only perform Apply u tag
? Then you can have more flexibility with the content you wish to apply it to. Some examples:
- Select word with
Ctrl
+D
and then run the macro - Select line with
Ctrl
+L
and then run the macro - Select part of line with
Shift
+ arrow keys and then run the macro
Or if you really want to keep one where it expands to the current word, maybe create another version of the macro to do that.
(I'd also prefer to avoid keeping and maintaining bespoke commands where possible)
from obsidian-editor-shortcuts.
Thanks for the detailed explanation đ
đ and thanks for using your time to reply and to suggest a different approach :)
If I'm understanding correctly, the difference in behaviour is because in the first case, you're using the QuickAdd macro with a cursor selection, whereas in the second case, you're using it after selecting the text yourself via the keyboard.
100% Correct.
The command Select Word would select a word when the caret cursor is placed between two characters AND keep the selection if something was already selected.
This way I had four situations covered:
- Nothing Selected with the caret cursor placed between two characters;
- 1 word select;
- 2 or more words selected;
- Nothing Selected with nothing near the caret cursor -> QuickAdd opens a modal for me to type the words and apply the decoration.
This way I could have one hotkey for 4 workflows different workflows.
this issue seems like it could be solved with a slight change to your workflow though?
I really appreciate the suggestion. Some info just to see the problem is a more dangerous than looks :)
I have 8 commands with this behavior. I don't have more hotkeys :(
What if you change the macro to only perform
Apply u tag
? Then you can have more flexibility with the content you wish to apply it to. Some examples:
I already have hotkeys that only applies to situations where I need to apply the decoration to the Selected Line
.
âšī¸ As you know I use your other command Select Line
to apply the decoration to the line instead to words.
Or if you really want to keep one where it expands to the current word, maybe create another version of the macro to do that.
(I'd also prefer to avoid keeping and maintaining bespoke commands where possible)
Before creating this FR I tried for weeks everything possible to avoid creating this FR (Templater, Shell Commands, changing the Macro) but we don't have another plugin that selects the word, just yours used to be.
That's why I put a lot â¤ī¸ to create an detailed FR that would show to you how this new command is important to workflows that rely on selection as the first step of a command with multiples step.
You were my last chance :)
I created the FR and đ for Obsidian gods for an answer :)
(I'd also prefer to avoid keeping and maintaining bespoke commands where possible)
100% understood đ
from obsidian-editor-shortcuts.
I see, I appreciate the effort you went to in trying to find workarounds! I'll revisit this if there ends up being more demand for it, or at least after I've addressed some of the other pending feature requests first.
For now â the select word command was updated in c88b861. Could you potentially look into changing your copy of the plugin by restoring the deleted lines in main.ts
and actions.ts
?
from obsidian-editor-shortcuts.
I see, I appreciate the effort you went to in trying to find workarounds! I'll revisit this if there ends up being more demand for it, or at least after I've addressed some of the other pending feature requests first.
I really appreciate @timhor for some hope in the future. Thanks for caring @timhor ! It means a lot
Could you potentially look into changing your copy of the plugin by restoring the deleted lines in
main.ts
andactions.ts
?
I am not a developer but I am a hard worker. If you give some guidance and help on how to do this I will try my best.
My questions from my first attempt:
1ī¸âŖ Restore = addition ?
by restoring the deleted lines in
main.ts
andactions.ts
Do you mean by this that I have to ADD the red lines without EXCLUDE of the GREEN lines ?
2ī¸âŖ How to find main.ts
and actions.ts
?
On my end (my plugin folder) I only have .js
files
Forgive for my lack of knowledge :)
from obsidian-editor-shortcuts.
No problem! I'll message you on Discord about it.
Thank you very much @timhor !!!
I got your message on discord and I will reply there!
from obsidian-editor-shortcuts.
Related Issues (20)
- Can't update to 1.13.1 HOT 1
- Failed to install HOT 1
- click with option HOT 1
- "Go to line number" goes to the last line if entering a number larger than the last line HOT 4
- [Feature Requests] Additional key binding suggestions HOT 5
- Select line unusual (moves cursor to end of line) HOT 5
- [FR] Delete Word Forward/Backward
- [FR] Undo and Redo HOT 3
- FR: Next/Previous Heading in Reading Mode HOT 1
- Target line for "Duplicate line" HOT 2
- [FR] Shortcut to select whole line excluding list or bullet points HOT 2
- [FR] Commands for Text selection und Text deletion
- [FR] Scroll up/down
- when i uninstall this plugin the insert new line still work. HOT 1
- Add plugin name to installation instructions in README.md (Plugin name is not mentioned in the installation instructions) HOT 1
- "Smarter Insert New Line" doesn't work anymore HOT 2
- FR: Page up / Page down
- [Feature Request] Keyboard shortcuts to navigate foldables
- Multiple cursors doesn't work correctly with Japanese HOT 1
- [Bug] Unable to type accented words with multiple cursors
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
đ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google â¤ī¸ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from obsidian-editor-shortcuts.