Replies: 2 comments
-
|
Beta Was this translation helpful? Give feedback.
0 replies
-
@zeertzjq |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello
I really like to take notes in nvim. The only problem is the undo command...
If you write a long line and want to undo something it will delete the hole line. To fix that problem there is the command
<c-g>u
.But you have to put it manually ... and that's not really a good workflow...
So my idea was to make a "WRITE-MODE" where you automate the command and i came up with this:
keymap("i", "<space>", "<space><c-g>u", opts)
--undo per wordkeymap("i", "<tab>", "<tab><c-g>u", opts)
--undo per tabkeymap("i", "<bs>", "<bs><c-g>u", opts)
--undo per char when deleted with<bs>
keymap("i", "<enter>", "<enter><c-g>u", opts)
--undo newlineIt would be nice to implement this with a command like this:
set writemode
NOTE!!!
If you wan't to get more info about undo and this
<c-g>u
command go to this website:https://learnvim.irian.to/basics/undo
Beta Was this translation helpful? Give feedback.
All reactions