Comments (7)
@cheap-glitch I've added customizable mappings in a separate branch for now, because I still have some documentation and testing to do, and I might rethink the code organization, it feels a bit non-obvious to me. The branch is custom-mappings
. Could you try it out and let me know if it makes sense to you? Here's where the mappings go in the config: https://github.com/AndrewRadev/quickmd/blob/custom-mappings/res/default_config.yaml#L24-L33
from quickmd.
It's not very vim-like, but I'd love to be able to press q
to quit. It would match the behavior of other lightweight "document viewers" that I use (for images, PDFs, etc.)
from quickmd.
Is this an actual bug, or was it removed but the readme wasn't updated?
I've missed it in the README, I'll give it a refresh once I'm done with the changes.
from quickmd.
It should be possible to omit modifiers entirely. Right now this causes a parsing error.
Yeah, that's true, fixed.
And, since you're imitating the format of Alacritty's config anyway, why not reuse it's nocemclature directly? So mods instead of modifiers, etc. Unless you feel it's not clear or explicit enough.
"Mods" sounds good enough to me 👍
key_name values should probably be normalized, so that e.g. both "escape" and "Escape" work (right now only the second does).
The problem with this is that there doesn't seem to be a consistent normalization. If it was just about lowercasing, that'd be fine, but "Escape" works where "Minus" doesn't -- it's "minus". Really, the core problem both with this and the common "Key" prop is that I'm just delegating to GDK trying to do as little special work as possible 😅. Not just because of the extra work, but also because I don't know about subtleties that GDK handles, like =
is actually shift + +
, for example, but is that going to be the same on non-qwerty keyboards? I feel like I'd rather just give whatever comes in to GDK and tackle problems as they come in, which is why I opted to do it both ways.
Using name
universally would work for the alphabetic keys, I think, but it wouldn't work for +
, -
, I don't know what else. For now, I'd rather not touch this part. Maybe I'll come back to it later.
from quickmd.
I've merged the branch and cut a new release, I added your PR as well (sorry again for missing it). With this, I'll close this issue for the moment. Feel free to reopen if you find any bugs or want to discuss changes, or you could open a new one.
from quickmd.
Side note: the readme mentions that
Pressing escape will close the window.
But it doesn't work for me. Nothing appears in the debug output either.
Is this an actual bug, or was it removed but the readme wasn't updated?
from quickmd.
Could you try it out and let me know if it makes sense to you?
It works well!
Some quick notes/ideas:
-
It should be possible to omit
modifiers
entirely. Right now this causes a parsing error. -
key_name
values should probably be normalized, so that e.g. both "escape" and "Escape" work (right now only the second does). -
In fact, it would be nicer to just have a single attribute named
key
like in Alacritty's config, instead of having to choose betweenkey_name
/key_char
. Though I don't know how tricky it would be for the code to guess which one the user meant. -
And, since you're imitating the format of Alacritty's config anyway, why not reuse it's nocemclature directly? So
mods
instead ofmodifiers
, etc. Unless you feel it's not clear or explicit enough.
All of these are only minor quibbles or "would-be-nice-to-have" features, it still does the job well enough 👍
from quickmd.
Related Issues (13)
- Exploratory: Try porting to web-view
- Provide Binary releases HOT 3
- File watching is broken with NeoVim HOT 3
- Support relative paths for embedded images HOT 1
- Rendering is broken with `glib2-2.72` HOT 14
- Spawn an external editor with a keypress HOT 1
- Autolink URLs HOT 2
- Handle remote links HOT 1
- Scrolling with j/k, maybe others HOT 1
- Themes and/or "dark mode" HOT 1
- Embed highlight.js files
- A help popup on F1, maybe others HOT 1
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 quickmd.