GramEditor/gram
37
981
Fork
You've already forked gram
88

three usability issues #346

Open
opened 2026年06月19日 11:43:40 +02:00 by complete_loser_1 · 4 comments

hi

I tried using Gram to edit my Rust code. I got Clippy yelling at me after copying some JSON from some commented-out default configuration, and rustc telling me about unused variables. great. all good so far.

I'm in Vim mode. version: app-editors/gram-2.2.0::gram

Problem one (renaming is broken)

I tried to rename FrameOrColor to just Frame:

enum FrameOrBg{Color(u32),DisplayList(Vec<Option<(u16,Object,Option<swf::Matrix>)>>),}

in my first attempt, I right-clicked it, then the menu had a button "Rename Symbol", suggesting that the keycombo was "grn". Either clicking the button or performing the keycombo, a textfield pops below FrameOrBg, which allows me to edit it to Frame. however, I find myself unable to press Enter to confirm the change, and Esc and Tab also does nothing. the only thing possible is to click outside, which does not finish the renaming action

Problem two (giving up on code action menu)

I learned that the keycombo "g." open a menu with code actions, for example, when I have an unused variable let foo = 1;, it will pop a menu with four options: rename, add explicit type i32, "Promote local to constant" and prefix with underscore. great. I can use arrow keys to select one option, press Enter, and it will change things accordingly.

my problem is: if I look at the options, and I'm no longer interested in them, I'd like to leave the menu. I can't press ESC, so my only alternatives are to click with the mouse somewhere, or alt-tab twice.

Problem three (code completion)

I learned to configure code completion to pop-up when I type zero or more characters. however, the list of suggestions is non-sensical, it seems to follow alphabetical order. when I'm typing if let Some(b) = b, I hope it suggest in first place background which is of type Option and makes sense there, but rather, it suggests B which only appears inside string literals, BROKEN which appears in a comment, Bitmap and BufReader which are types (so far four items that don't even respect my choice of lowercase/uppercase letter), baby which is inside a string of a commented-out print statement, and THEN it suggests background.

anyway. after using arrows keys to select the correct option, it does complete after pressing Enter, but does not if I press Tab. I tried to enable the Supertab on keymap.jsonc, but it didn't budge.

hi I tried using Gram to edit my Rust code. I got Clippy yelling at me after copying some JSON from some commented-out default configuration, and rustc telling me about unused variables. great. all good so far. I'm in Vim mode. version: `app-editors/gram-2.2.0::gram` ### Problem one (renaming is broken) I tried to rename `FrameOrColor` to just `Frame`: ```Rust enum FrameOrBg { Color(u32), DisplayList(Vec<Option<(u16, Object, Option<swf::Matrix>)>>), } ``` in my first attempt, I right-clicked it, then the menu had a button "Rename Symbol", suggesting that the keycombo was "grn". Either clicking the button or performing the keycombo, a textfield pops below `FrameOrBg`, which allows me to edit it to `Frame`. however, I find myself unable to press Enter to confirm the change, and Esc and Tab also does nothing. the only thing possible is to click outside, which does not finish the renaming action ### Problem two (giving up on code action menu) I learned that the keycombo "g." open a menu with code actions, for example, when I have an unused variable `let foo = 1;`, it will pop a menu with four options: rename, add explicit type `i32`, "Promote local to constant" and prefix with underscore. great. I can use arrow keys to select one option, press Enter, and it will change things accordingly. my problem is: if I look at the options, and I'm no longer interested in them, I'd like to leave the menu. I can't press ESC, so my only alternatives are to click with the mouse somewhere, or alt-tab twice. ### Problem three (code completion) I learned to configure code completion to pop-up when I type zero or more characters. however, the list of suggestions is non-sensical, it seems to follow alphabetical order. when I'm typing `if let Some(b) = b`, I hope it suggest in first place `background` which is of type `Option` and makes sense there, but rather, it suggests `B` which only appears inside string literals, `BROKEN` which appears in a comment, `Bitmap` and `BufReader` which are types (so far four items that don't even respect my choice of lowercase/uppercase letter), `baby` which is inside a string of a commented-out print statement, and THEN it suggests `background`. anyway. after using arrows keys to select the correct option, it does complete after pressing Enter, but does not if I press Tab. I tried to enable the Supertab on keymap.jsonc, but it didn't budge.
Owner
Copy link

I suspect that all of these issues are down to using the minimal base keymap. It’s minimal! You’ll have to provide basically every keybinding that isn’t vim mode specific yourself.

I suspect that all of these issues are down to using the minimal base keymap. It’s minimal! You’ll have to provide basically every keybinding that isn’t vim mode specific yourself.

how unfortunate. I'm a maximalist myself, and allergic to configuring anything. I will meditate about it in six months

how unfortunate. I'm a maximalist myself, and allergic to configuring anything. I will meditate about it in six months

yes I clearly see now.

I clicked the hamburguer menu on top-left, "Help"->"Show Welcome"->"Return to Onboarding" and it clearly shows I previously selected "Minimal (for vim/helix)" for "Base Keymap", while there is also below a toggle for "Vim Mode" described as "Modal editing, vim style". when opening Gram for the first time, I didn't think twice as for why there were two options related to Vim, I just saw the keyword "Vim" and I clicked on both. I will experiment keeping the "Vim Mode" and changing the "Base Keymap"

I will report back with more information July 11th or earlier

yes I clearly see now. I clicked the hamburguer menu on top-left, "Help"->"Show Welcome"->"Return to Onboarding" and it clearly shows I previously selected "Minimal (for vim/helix)" for "Base Keymap", while there is also below a toggle for "Vim Mode" described as "Modal editing, vim style". when opening Gram for the first time, I didn't think twice as for why there were two options related to Vim, I just saw the keyword "Vim" and I clicked on both. I will experiment keeping the "Vim Mode" and changing the "Base Keymap" I will report back with more information July 11th or earlier
Owner
Copy link

I also realized the (for vim/helix) is confusing, I agree!

I will change the label and also add some more basic keymaps to the minimal set just so things aren’t broken by default.

I also realized the (for vim/helix) is confusing, I agree! I will change the label and also add some more basic keymaps to the minimal set just so things aren’t broken by default.
Sign in to join this conversation.
main
main
test/wgpu-on-mac
test-ci/failing-test-mac
test/failing-test-mac
test/build-on-22-04
test/wgpu-present-mode-mailbox
v2.1
test/altgr-fix-again
test/2.0.0-rc1
test/linux-build
test/objc2
v1.2.1
3.0.1
3.0.0
2.2.0
2.1.2
2.1.1
2.1.0
2.0.0
1.2.1
1.2.0
1.1.0
1.0.0
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
GramEditor/gram#346
Reference in a new issue
GramEditor/gram
No description provided.
Delete branch "%!s()"

Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?