You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Feature Request: Improve <ESC> Behavior in Comment Windows
Issue Description
I've been exploring gitlab.nvim, and it's been a fantastic tool. However, I've encountered a significant issue that hinders my workflow: inadvertently losing comment text by pressing <ESC>. In Vim (or Neovim), <ESC> is habitually used to ensure one is in Normal mode, often pressed multiple times just to be certain. Unfortunately, in gitlab.nvim, an extra press of <ESC> results in losing all the written comments — erasing thoughts and efforts instantaneously.
This behavior is contrary to the Vim philosophy, where it's challenging to lose work unintentionally. Vim safeguards against potential loss, allowing for undo actions, reopening closed buffers, and warning users about unsafe actions like quitting without saving. The current <ESC> functionality in comment windows breaks from this safety net, forcing users to adopt new habits that may detract from their experience.
Proposed Solution
Save Unfinished Comments: Similar to how the GitLab web interface retains comments even if the tab is closed, gitlab.nvim could automatically save drafts of unfinished comments. This feature would prevent data loss and align with the expected Vim behavior of safeguarding user input.
Redefine <ESC> Keybinding: Removing <ESC> as the default method for closing comment windows would adhere more closely to Vim traditions. Instead, adopting commands like :q! for closing without saving and :wq for saving and submitting comments could offer a more Vim-centric approach. This method is reminiscent of Fugitive's handling of commit messages, providing a familiar workflow for Vim users.
Conclusion
Adjusting the <ESC> key's functionality to protect user input and align with Vim's user-protection philosophy would greatly enhance the usability of gitlab.nvim for the Vim community. These changes would mitigate the risk of losing valuable input and help maintain the muscle memory and habits formed by long-time Vim users.
The text was updated successfully, but these errors were encountered:
I've merged the <esc> keybinding removal into develop, you're welcome to use that branch, but just be aware it's not always stable. Once I've had time to use develop for a while I'll ship it into main. I'm going to close this ticket and track your second request (saving buffer edits) in the other MR.
Feature Request: Improve
<ESC>
Behavior in Comment WindowsIssue Description
I've been exploring
gitlab.nvim
, and it's been a fantastic tool. However, I've encountered a significant issue that hinders my workflow: inadvertently losing comment text by pressing<ESC>
. In Vim (or Neovim),<ESC>
is habitually used to ensure one is in Normal mode, often pressed multiple times just to be certain. Unfortunately, ingitlab.nvim
, an extra press of<ESC>
results in losing all the written comments — erasing thoughts and efforts instantaneously.This behavior is contrary to the Vim philosophy, where it's challenging to lose work unintentionally. Vim safeguards against potential loss, allowing for undo actions, reopening closed buffers, and warning users about unsafe actions like quitting without saving. The current
<ESC>
functionality in comment windows breaks from this safety net, forcing users to adopt new habits that may detract from their experience.Proposed Solution
Save Unfinished Comments: Similar to how the GitLab web interface retains comments even if the tab is closed,
gitlab.nvim
could automatically save drafts of unfinished comments. This feature would prevent data loss and align with the expected Vim behavior of safeguarding user input.Redefine
<ESC>
Keybinding: Removing<ESC>
as the default method for closing comment windows would adhere more closely to Vim traditions. Instead, adopting commands like:q!
for closing without saving and:wq
for saving and submitting comments could offer a more Vim-centric approach. This method is reminiscent of Fugitive's handling of commit messages, providing a familiar workflow for Vim users.Conclusion
Adjusting the
<ESC>
key's functionality to protect user input and align with Vim's user-protection philosophy would greatly enhance the usability ofgitlab.nvim
for the Vim community. These changes would mitigate the risk of losing valuable input and help maintain the muscle memory and habits formed by long-time Vim users.The text was updated successfully, but these errors were encountered: