News for hackers. Stuff that matters.
Re:VSCode-Neovim: Use embedded Neovim in VSCode without emul... by capableweb on Tuesday November 22, 2022 @02:54PM (#33710494)
Personally, my problem with trying to use Vim keybindings in VS Code is not about the motions of moving around/editing the code itself, but everything else. You end up in plenty of situations where you have to resolve using the mouse because you ended up on some sub-page or whatever, where you either need to resolve using the mouse or keep pressing Tab until you get to where you want to go.

Installing plugins is one good example of this, where even if you use a Vim plugin (or this, it seems), you still need to resolve to using the mouse/Tabbing to actually install the plugin itself.

While with Neo/Vim itself, you never need to reach for the mouse, because the entire thing, not just the editing/writing, is meant to facilitate keyboard-only usage.

Re:VSCode-Neovim: Use embedded Neovim in VSCode without emul... by Tyr42 on Tuesday November 22, 2022 @03:09PM (#33710738)
I guess I am the target market. I don't mind using the mouse when I'm not in the "flow" of editing. Even browsing code, scroll wheels are pretty expressive, and clicking to jump to definition is fine. Ok not typing, so I don't need to keep my hand on the home row.

But the actual editing doesn't use the mouse.

Re:VSCode-Neovim: Use embedded Neovim in VSCode without emul... by eric-hu on Tuesday November 22, 2022 @06:07PM (#33712841)
If you have the proper jump to definition set up, vscode-neovim actually has a keybinding (that matches vim/neovim)

gd (go to definition)

You'll also like

gh (peek definition)

Re:VSCode-Neovim: Use embedded Neovim in VSCode without emul... by wilsonnb3 on Tuesday November 22, 2022 @03:33PM (#33711095)
perhaps onivim would be a good VSCode alternative for you, I think they have a mode like the browser vim extensions that labels everything on screen with a key you can press instead of clicking.

https://onivim.io/

Re:VSCode-Neovim: Use embedded Neovim in VSCode without emul... by satvikpendem on Tuesday November 22, 2022 @03:37PM (#33711139)
Onivim development has stopped, it is now abandonware: https://github.com/onivim/oni2/issues/3811#issuecomment-9103...
Re:VSCode-Neovim: Use embedded Neovim in VSCode without emul... by cfuendev on Tuesday November 22, 2022 @10:40PM (#33714866)
Woah, that really sucks. I checked their website some time ago and though they still had momentum.. :( Hope that rewrite people are talking about in the issue replies does happen at some point.
Re:VSCode-Neovim: Use embedded Neovim in VSCode without emul... by nulld3v on Tuesday November 22, 2022 @03:37PM (#33711132)
Onivim is no longer being developed :(
Re:VSCode-Neovim: Use embedded Neovim in VSCode without emul... by rzzzt on Tuesday November 22, 2022 @05:55PM (#33712726)
SpaceVim is also a fine contender with its LSP support: https://spacevim.org/
Re:VSCode-Neovim: Use embedded Neovim in VSCode without emul... by coldtea on Tuesday November 22, 2022 @03:55PM (#33711384)
>Installing plugins is one good example of this, where even if you use a Vim plugin (or this, it seems), you still need to resolve to using the mouse/Tabbing to actually install the plugin itself.

Sounds like a minor annoyance at best... Where vim-mode is important to me is editing and navigating code, not when installing plugins...

Re:VSCode-Neovim: Use embedded Neovim in VSCode without emul... by capableweb on Tuesday November 22, 2022 @05:41PM (#33712586)
As I said, it's one example. Anything outside the code window suffers from the same problem, not just installing plugins...
Re:VSCode-Neovim: Use embedded Neovim in VSCode without emul... by DiggyJohnson on Tuesday November 22, 2022 @06:06PM (#33712834)
I didn’t expect to disagree with you at first because I also struggle with vim -Code plug-ins, but it really never occurred to me that it would cover the entire functionality of Vim outside the editor and file navigation.
Re:VSCode-Neovim: Use embedded Neovim in VSCode without emul... by lanza on Tuesday November 22, 2022 @08:51PM (#33714105)
It's not just installing plugins. It's the VCS view, the symbol list, the terminal, the file browser, the search pane, the debugger pane, any pane added by any extension, etc.
Re:VSCode-Neovim: Use embedded Neovim in VSCode without emul... by tuukkah on Wednesday November 23, 2022 @12:30AM (#33715595)
> the terminal

Ctrl+`

Re:VSCode-Neovim: Use embedded Neovim in VSCode without emul... by rendall on Tuesday November 22, 2022 @04:26PM (#33711736)
Ctrl+shift+p puts the cursor in the command search where you can find all the commands including extension related commands. Ctrl+w j puts the cursor in the terminal.

VS code is entirely navigable with key strokes even with Vim emulator

Re:VSCode-Neovim: Use embedded Neovim in VSCode without emul... by capableweb on Tuesday November 22, 2022 @05:48PM (#33712660)
As mentioned, extensions is one example. How do you resize the sidebar? Or resizing the vertical size of the "Outline" pane?

To be honest, guess it was a long time ago I last used VS Code, but when I did, I ended up in situations where it wasn't suitable to use the keyboard too many times.

Re:VSCode-Neovim: Use embedded Neovim in VSCode without emul... by Lio on Tuesday November 22, 2022 @04:30PM (#33711781)
It's worth pointing out that while Vim/Neovim can be fully used without a mouse you can still use one if you want to.

That includes mouse wheel, clicking tabs, resizing windows, balloon help amongst others.

That works over SSH too.

Re:VSCode-Neovim: Use embedded Neovim in VSCode without emul... by FeistySkink on Tuesday November 22, 2022 @05:03PM (#33712178)
Not sure if you know, but you can install plugins from terminal.
Re:VSCode-Neovim: Use embedded Neovim in VSCode without emul... by gabrielgio on Tuesday November 22, 2022 @05:18PM (#33712365)
That is the reason why I moved from eMacs to neovim. Emacs on itself is amazing piece of software, but I had to fight my way to setup vim binding on everything.

With neovim you just get that by default. Everything is thought around that.

Re:VSCode-Neovim: Use embedded Neovim in VSCode without emul... by ngai_aku on Tuesday November 22, 2022 @05:35PM (#33712529)
In what scenarios were you reaching for your mouse within emacs?
Re:VSCode-Neovim: Use embedded Neovim in VSCode without emul... by forgotpwd16 on Tuesday November 22, 2022 @07:12PM (#33713353)
Seems like they meant using vim bindings everywhere requires much work to configure.
Re:VSCode-Neovim: Use embedded Neovim in VSCode without emul... by eric-hu on Tuesday November 22, 2022 @06:06PM (#33712826)
I do now have memorized some mix of vim and vscode keybindings, but to me it's worth it. I'm not at 100% keyboard navigation because in some cases I've burned 5-10 minutes looking up a shortcut, repeatedly 1/mo for 3 months. After so many (overly) spaced repetitions, I recognize the shortcut isn't worth memorizing.

> Installing plugins is one good example of this, where even if you use a Vim plugin (or this, it seems), you still need to resolve to using the mouse/Tabbing to actually install the plugin itself.

I agree with you here, but I rarely need to install new plugins. It's certainly not a task I repeat for a given plugin. Plugins are actually the reason I do primary development in VSCode instead of Neovim natively. I can set up linters, language highlighters, etc in VSCode much faster than I can in Neovim. The ecosystem in VSCode also seems to be bigger for what I've done in the last few years.

---

Anyways, here are some VS Code keybindings I've found essential to go hand-in-hand with vscode-neovim. These few probably get me to 90% keyboard navigation for day-to-day editing.

cmd-shift-m: toggle the bottom tray problems (works as a universal way to show/hide the bottom)

cmd-b: toggle the left sidebar (in whatever context it was last in)

cmd-shift-e: show the current file in the left sidebar

cmd-0: move context/focus to the left sidebar cmd-1: move context/focus to the editor cmd-2: move context/focus to the right editor (or open an editor split, if not yet split)

ctrl-1,...9: highlight Nth tab from the left ctrl-0: highlight rightmost tab

cmd-p: fuzzy find file cmd-shift-p: fuzzy find any installed action by description

Re:VSCode-Neovim: Use embedded Neovim in VSCode without emul... by FPGAhacker on Tuesday November 22, 2022 @08:21PM (#33713880)
Thank you for posting these!
Re:VSCode-Neovim: Use embedded Neovim in VSCode without emul... by eric-hu on Tuesday November 22, 2022 @08:58PM (#33714163)
My pleasure! This plugin is hands down my favorite VSCode plugin. I worked mostly in vim before, and this plugin made me comfortable doing project work in VSCode.

I'll keep an eye on this thread for a day or two and try to add more essential hotkeys if I think of them.

Re:VSCode-Neovim: Use embedded Neovim in VSCode without emul... by satvikpendem on Wednesday November 23, 2022 @12:52PM (#33722347)
All that `cmd`ing makes me feel like I'm in Emacs ;). I wonder if there's a way to bind those actions to vim-like keybindings.
Re:VSCode-Neovim: Use embedded Neovim in VSCode without emul... by cagmz on Tuesday November 22, 2022 @11:07PM (#33715050)
cmd-p is an absolute must if you use this plugin. Thanks for sharing!
Re:VSCode-Neovim: Use embedded Neovim in VSCode without emul... by eric-hu on Wednesday November 23, 2022 @05:46AM (#33717551)
I’ll add onto this, cmd-shift-p is the reason to use VS Code over neovim/vim.

For every plug-in I’ve installed in vim, I used about 5% of their behavior. I’ve spent time looking through plug-in utilities and thought “oh that’s useful” and then forgotten about them by the next day. I’m aware that in vim, I can type :substring<tab> and get a list of commands. As far as I recall, I only get name matches. VSCode’s action search massively improves the user experience of this, allowing me to scan descriptions of plug-in commands.

Re:VSCode-Neovim: Use embedded Neovim in VSCode without emul... by nkit on Tuesday November 22, 2022 @09:26PM (#33714380)
VspaceCode might help you and others: https://vspacecode.github.io/.

It allows you to execute arbitrary VScode commands in fewer keystrokes using Emacs like menu (never used Emacs myself, so might be off a little). Along with default <space> key, I've also mapped ctrl+g as a global binding to trigger VspaceCode. So almost anywhere in the UI, I can always use keyboard to navigate.

EDIT: formatting

Re:VSCode-Neovim: Use embedded Neovim in VSCode without emul... by kamaal on Tuesday November 22, 2022 @10:36PM (#33714841)
>>While with Neo/Vim itself, you never need to reach for the mouse, because the entire thing, not just the editing/writing, is meant to facilitate keyboard-only usage.

Exactly, most python plugins like black, code formatters, auto complete etc don't even work with these plugins.

Re:VSCode-Neovim: Use embedded Neovim in VSCode without emul... by snthpy on Wednesday November 23, 2022 @12:02AM (#33715426)
Exactly this!
Re:VSCode-Neovim: Use embedded Neovim in VSCode without emul... by WirelessGigabit on Wednesday November 23, 2022 @02:55AM (#33716395)
If only there was some sane oob setup for neovim with decent file exploring, and debugging.
Re:VSCode-Neovim: Use embedded Neovim in VSCode without emul... by 0x008 on Thursday November 24, 2022 @06:13AM (#33730015)