Live data from Hacker News

What's New in Neovim 0.10

gpanders.com

121–130 of 134 posts

Re: What's New in Neovim 0.10

#121
post #36

I have been transitioning my workflow from macOS to Linux. Discovered it’s kind of pain in the ass to get a gui based editor like Intellij to work correctly, especially within a VM. Happened to have discovered neovim, and so far it’s been a delight to use. Much faster and much lighter on resource use. Do any neovim veterans have recommendations on plugins to enable? Or even hidden features that would improve workflow…

Btw, while I use Neovim myself and love it, Intellij Idea is available as a Flatpak, which should just work™

https://flathub.org/apps/com.jetbrains.IntelliJ-IDEA-Communi...

Re: What's New in Neovim 0.10

#122
post #6

I love seeing the development of an amazing modern replacement for Vim. I look forward to the moment where it has tons of plugins that are as easy to install as VSCode extensions are.

> I look forward to the moment where it has tons of plugins that are as easy to install as VSCode extensions are.

There is already a ton of plugins. As for the ease of installation, the "traditional" plugin managers just require you to add one like to your config to install a plugin, which is pretty simple. But there's also a new plugin manager called Rocks.nvim, which installs plugins from Luarocks with a single command (eg ":Rocks install telescope")

Re: What's New in Neovim 0.10

#123
post #102
post #79

Earlier quoted context omitted.

I used to want multicursor as well. But I heard a recommendation that multicursor is not "the vim way", and instead to use macros or regex search-and-replace or visual-block mode. That's worked for me. Of course multicursor must be commonly requested for a reason. Just passing along some alternatives.

I think multicursor vs macro is basically a case of whether the feedback is instant, rather than delayed. Multicursor (in other editors) is a lot better, because you don’t have to think about which exact motion to use as much (since you can see it as you do them). On the other hand, macros and vim motions are a lot more general, but require you to think about the exact motions a lot more ahead of time. I think substi…

Doesn’t multicursor also require thinking about the exact motion, since if you do it wrong, there is no way to undo?

Re: What's New in Neovim 0.10

#124
post #123
post #102

Earlier quoted context omitted.

I think multicursor vs macro is basically a case of whether the feedback is instant, rather than delayed. Multicursor (in other editors) is a lot better, because you don’t have to think about which exact motion to use as much (since you can see it as you do them). On the other hand, macros and vim motions are a lot more general, but require you to think about the exact motions a lot more ahead of time. I think substi…

Doesn’t multicursor also require thinking about the exact motion, since if you do it wrong, there is no way to undo?

I’m fairly sure VS Code supports undo whilst using multicursor? Why do you say that undo is not possible?

If it’s an inbuilt feature, the editor can definitely support undos.

Re: What's New in Neovim 0.10

#125
post #124
post #123

Earlier quoted context omitted.

Doesn’t multicursor also require thinking about the exact motion, since if you do it wrong, there is no way to undo?

I’m fairly sure VS Code supports undo whilst using multicursor? Why do you say that undo is not possible? If it’s an inbuilt feature, the editor can definitely support undos.

I meant undo for motions, not edits. I’m pretty sure Neovim does not have that. (There is , but only for large motions.)

Re: What's New in Neovim 0.10

#126
post #113

Earlier quoted context omitted.

Kitty keyboard protocol does indeed support modifier sides.

No it doesn't, and the author rejected the proposal to add them https://sw.kovidgoyal.net/kitty/keyboard-protocol/ Modifiers are encoded as a bit field with: shift 0b1 (1) alt 0b10 (2) ctrl 0b100 (4) super 0b1000 (8) hyper 0b10000 (16) meta 0b100000 (32) caps_lock 0b1000000 (64) num_lock 0b10000000 (128)

Yes modifiers are a state, not a key. The kitty keyboard protocol does indeed send events for left and right modifier key press/releas as you can easily see for yourself by running

kitten show-key -m kitty

in a kitty terminal and pressing the left and right modifier keys.

Re: What's New in Neovim 0.10

#127
post #113

Earlier quoted context omitted.

No it doesn't, and the author rejected the proposal to add them https://sw.kovidgoyal.net/kitty/keyboard-protocol/ Modifiers are encoded as a bit field with: shift 0b1 (1) alt 0b10 (2) ctrl 0b100 (4) super 0b1000 (8) hyper 0b10000 (16) meta 0b100000 (32) caps_lock 0b1000000 (64) num_lock 0b10000000 (128)

Yes modifiers are a state, not a key. The kitty keyboard protocol does indeed send events for left and right modifier key press/releas as you can easily see for yourself by running kitten show-key -m kitty in a kitty terminal and pressing the left and right modifier keys.

> Yes modifiers are a state, not a key

So why are you talking about a key then??? Kitty doesn't support left/right modifiers unlike proper keybinding handling apps, the left/right presses for non-modifier keys aren't relevant

How would you bind LeftAlt-A to something different from RightAlt-A in Kitty?

Re: What's New in Neovim 0.10

#128
post #127

Earlier quoted context omitted.

Yes modifiers are a state, not a key. The kitty keyboard protocol does indeed send events for left and right modifier key press/releas as you can easily see for yourself by running kitten show-key -m kitty in a kitty terminal and pressing the left and right modifier keys.

> Yes modifiers are a state, not a key So why are you talking about a key then??? Kitty doesn't support left/right modifiers unlike proper keybinding handling apps, the left/right presses for non -modifier keys aren't relevant How would you bind LeftAlt-A to something different from RightAlt-A in Kitty?

There is no such thing as a left or right modifier STATE in ANY application. All applications, including kitty track only CTRL, SHIFT, ALT, ETC modifier states. left and right alt and control are key events and can be bound in any application supporting the kitty keyboard protocol as key events. If some application tracks a left and right modifier state it has to do so manually using key press and release events, the OS does not supply it any such state.

You seem to be thoroughly confused about what is a modifier and what is a key. Left and right ctrl/alt/shift are KEYS not MODIFIERS. You can track whether they are held down or up by tracking their press and release events just like for any other key.

Re: What's New in Neovim 0.10

#129
post #127

Earlier quoted context omitted.

> Yes modifiers are a state, not a key So why are you talking about a key then??? Kitty doesn't support left/right modifiers unlike proper keybinding handling apps, the left/right presses for non -modifier keys aren't relevant How would you bind LeftAlt-A to something different from RightAlt-A in Kitty?

There is no such thing as a left or right modifier STATE in ANY application. All applications, including kitty track only CTRL, SHIFT, ALT, ETC modifier states. left and right alt and control are key events and can be bound in any application supporting the kitty keyboard protocol as key events. If some application tracks a left and right modifier state it has to do so manually using key press and release events, the…

This rigid simplistic attitude is precisely why we can't have nice keyboard things and have been stuck in the same state of bad defaults for decades

The only differentiator for a modifier state is that it... modifies! Here is a wiki common sense definition

> In computing, a modifier key is a special key (or combination) on a computer keyboard that temporarily modifies the normal action of another key when pressed together

So your limitations don't make conceptual sense, not only can you have LShift vs RShift modifier state, but also you can have an F modifier state when you hold down the F key to modify the behavior of other keys

> OS does not supply it

Unless it does?

> VK_LSHIFT VK_RSHIFT VK_LCONTROL VK_RCONTROL VK_LMENU VK_RMENU These left- and right-distinguishing constants are available to an application only through the GetKeyboardState, SetKeyboardState, GetAsyncKeyState, GetKeyState, and MapVirtualKey functions.

https://learn.microsoft.com/en-us/windows/win32/api/winuser/...

Re: What's New in Neovim 0.10

#130
post #129

Earlier quoted context omitted.

There is no such thing as a left or right modifier STATE in ANY application. All applications, including kitty track only CTRL, SHIFT, ALT, ETC modifier states. left and right alt and control are key events and can be bound in any application supporting the kitty keyboard protocol as key events. If some application tracks a left and right modifier state it has to do so manually using key press and release events, the…

This rigid simplistic attitude is precisely why we can't have nice keyboard things and have been stuck in the same state of bad defaults for decades The only differentiator for a modifier state is that it... modifies ! Here is a wiki common sense definition > In computing, a modifier key is a special key (or combination) on a computer keyboard that temporarily modifies the normal action of another key when pressed to…

ROFL you are saying that kitty the program that finally broke the keyboard logjam with terminals of preventing you from having nice things!! Good luck to you.

And lets apply some common sense to your common sense, follow up on it a little. If a modifier is defined by the fact that it modifies the actions of other keys, then left and right modifer keys modify the action in exactly the same way and thus are the same modifier. Common sense indeed.

And if you want to reference windows, a platform kitty does not support, here you go: https://developer.apple.com/documentation/appkit/nseventmodi...

no left and right modifier state on macOS. And neither does X11/Wayland have them, though I dont have a link handy, so I will just leave you with a couple of links to the documentation for cross platform toolkits instead:

https://doc.qt.io/qt-6/qt.html#KeyboardModifier-enum https://www.glfw.org/docs/latest/group__mods.html

And in case the common sense didnt make it past your mental barriers, a terminal keyboard protocol has to work on all platforms not just windows. The good lord alone knows what windows does, probably synthesizes that state based on press and release events.

Post reply on HN