*Not* continue comment on enter #12815
-
In the newest Helix version, if I am in insert mode in a comment line and hit enter, it continues the comment, e.g. using Haskell line comments for illustration (^ denotes cursor position): -- a comment.^ Hitting enter, produces -- a comment.
-- ^ But I want: -- a comment.
^ Backing out to normal mode and hitting o also produces the same effect; in other words, the only way now is to "undo" the comment. Is there a keybinding available which I managed to not find? Or can one be made? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
You can turn the feature off: https://docs.helix-editor.com/master/editor.html#editor-section # ~/.config/helix/config.toml
[editor]
continue-comments = false |
Beta Was this translation helpful? Give feedback.
-
You can also create keybindings to create a newline without adding a comment token: [keys.normal.g]
O = ["open_above", "delete_word_backward"]
o = ["open_below", "delete_word_backward"]
[keys.insert]
A-ret = ["insert_newline", "delete_word_backward"] This is what I use and it's quite effective |
Beta Was this translation helpful? Give feedback.
You can also create keybindings to create a newline without adding a comment token:
This is what I use and it's quite effective