-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Vim Support #700
Comments
change - c key. |
Those are just the ones I noticed within 5 minutes of opening the editor. |
|
|
|
Buffer split commands like :sp and :vs |
Deal with lapce#700 (comment)
• ctrl-w - – decrease split height by 1 line |
In addition to @dakata1337 : |
Also I really want to show my appreciation for the work you all do, because a text editor like Lapce is something that I was looking for, for a while. I really want it to see in a daily-drivable state, so please keep up the awesome work you guys already did! ❤️ |
|
Technically a plugin, but infinitely useful: |
Use HJKL to move the cursor in the folder tree (CTRL/CMD + Shift E) |
As a colemak + vim user, I wish there could be |
It would be really helpful to be able to add command palette commands that execute an editor action, so Vim has a lot of weird legacy decisions that influence how its commands behave, so allowing a flexible approach that users can tailor to their internal model of how it works would IMO be a good direction to go. |
colorcolumn Maybe word wrap? Regex search and replace |
using |
The dot operator Also |
|
I believe this is plugin specific, not native vim functionality. |
targets.vim replace.vim: Allows replacing of a text object with text from a register Comment.nvim: Allows commenting a text object Honorable mentions, but rather hard to implement: lightspeed and telescope |
Speaking as somebody who primarily uses vim, and wants "everything to be just exactly like vim please" (which is probably not your target demographic): In order of usage for me, this is what I've noticed missing that I haven't seen in this thread so far:
Of the ones already mentioned, |
Didn't find |
I came with the question similar to @awilkins': is it reimplementing Vim motions just for reimplementing it in Rust or it really brings benefits? To me, integrating a library or the Vim itself sounds a reasonable solution. Speaking of the original question, I would rather have full support but I don't know how much straightforward it is. I've check a PR, and have to agree with @DakshG07: the implementation seem to lack context in which Vim motions operate. Let me explain:
I find those kind of keystrokes important for my productivity and noticed that many people find them very helpful too. In general, Vim motions follow the following structure:
When both N and M are present, the command is executed
Vim motions are straightforward having this structure in mind, they are very well explained in the documentation. On the linked page, commands and motions are broken down into logical pieces. The biggest problem I see at the moment is that motions are highly configurable. This is important for people who use different keyboard layout such as Dvorak, Colemak, Workman, any other or even a custom one, but want to preserve natural motions. For example, a Colemak user might want to replace I hope, these links and explanations are any helpful. I admire Lapce and work of all its contributors 🙂 |
What that library is supposed to do? |
My problem with people who suggest "just use library X" or "just run X with lapce" is that they don't know how much work we would have to do to rewrite keymapping, actions and the core of the editor to fit or at least allow the model of such a library or program, just for the sake of using it, and what the implications would be for editor performance, API dependency, code complexity and distribution.
This is not about language. Although it is a factor. |
@panekj I see you point, thank you for explaining this 🙂 I think, it might be worth defining to what extent Lapce should support Vim commands in general. I can guess that the work towards supporting external library is somewhat comparable to work towards supporting (more/other/all) motions. A scope definition and a roadmap might help with this. |
If you're gonna state built in vim support on the lapce.dev site, and not actually support this stuff ppl will think it's misleading. |
i have stuff in my config like |
I don't think it would be realistic to implement every single Vim feature inside of Lapce, so I'm currently just using Vim. |
Markers are important to me. Especially markers that work between files. |
I've noticed that the |
Alright, this is probably going to be really tough, since you'd pretty much have to re-architect most of the codebase, which is why it's nothing but a thought. In the perfect ideal world, the editing interface itself would swappable. As in, the default Of course, I can't really speak here, I have no idea how tough that would be. Would probably be a nightmare to implement. |
This seems totally unrelated to supporting the commands and keyboard shortcuts that vim supports. Furthermore, Lapce is already architected such that there's a frontend (ui) and backend (lsp, filesystem, plugins, etc) which are separate components. the issue with this suggestion isn't so much whether its possible to put slap a different ui into lapce, as much as is the entire benefit of lapce and what makes it fast IS the frontend; (lapce-data) which is where all the rope stuff is. putting a different frontend defeats the entire point of lapce in the first place. |
If the lapce keybinding would support various modes it would be perhaps be possbile to emulate other editor modes like kakoune / vim etc. but not sure how flexible this is at the moment. |
My 2 cents here : "search to " I also miss search and replace but that should be covered by a search&replace feature, not vim-like specific thing. |
|
I found two lacking bindings
|
A quick thing I noticed is that in the current implementation, |
I've also noticed that the lack of the other visual modes (line and block) has disrupted my usual workflow. And the missing |
W, E, B - it works similiar to w, e, b but it stop only on places splited by space |
Why not use Neovim as a backend for vim mode? AFAIK, this is an expected (intended?) use of Neovim, so would seem sensible to capitalise on it. Here's a very good VSCode plugin which does something similar: https://github.com/vscode-neovim/vscode-neovim. |
Ah, thanks, I missed that. But, I do think it's worth seriously considering, as the benefits would be significant. I've used vim motions in various editors, but haven't yet found anything that comes close to the speed or featureset of an actual vim backend. I find it hard to imagine that rebuilding vim would be an easier option, but I suppose that depends on how much feature parity you're seeking for. |
Isn't Lapce trying to be a browser written in pure Rust? I feel like using neovim would undermine that. Unless I'm mistaken and non-Rust backends are used elsewhere anyway. |
Support for vimrc files and vim plugins. |
|
i've switched to neovide because its literally actually vim and solves my problems with using vim in the terminal; (scrolling is annoying) and issues i have with actual vim; eg no lsp etc. can do stuff like I think overall lapce doesnt intend to support vim commands in a real way any time soon, and the benefits of ropes dont outweigh the negatives of the change in ergonomics. |
I don't quite understand this objection. NeoVim itself is a "backend" component, in the sense that it's designed to be a server with no GUI, and that's exactly what makes it possible to embed, e.g. via the above-mentioned plugin for VSCode. Though, looking at the Lapce architecture, I see that buffer management is in the "frontend" bit. So is the issue essentially that this would split Lapce into three core components, "frontend", "buffer handler", and "backend"? (And/or that the buffer handling in Lapce is the main thing in the "frontend" that makes it fast?) |
Currently Lapce only has implemented a very small set of Vim keys/features, mainly because I'm not a very powerful Vim user.
Feel free to comment on what Vim features you wish to support in Lapce.
The text was updated successfully, but these errors were encountered: