dance icon indicating copy to clipboard operation
dance copied to clipboard

[question] Which feature from vscode are you missing the most from kakoune ?

Open sucrecacao opened this issue 5 years ago • 9 comments

Hello dance community ! ( dancers ? )

I know vscode is a whole IDE and as nothing to do with kak etc.. but I wonder what are the most import feature that you find vscode and that are missing from kakoue ?

Cheers :)

sucrecacao avatar Dec 23 '20 20:12 sucrecacao

I never thought about it... I guess it's the right name, yeah...

Personally:

  • UI: Hover-for-definition and autocompletions are just very good in VS Code, and no terminal-based UI can display that amount of information in such a way. Inline Git information and the code map are also very nice.
  • Extensions: VS Code just has way more extensions than Kakoune, many of which are officially supported.
  • Debugging: You can debug most languages with breakpoints, conditional breakpoints and whatnot, and the debugging UI is great as well.
  • Performance: I can't talk about Kakoune, but before I switched to VS Code I had used Vim, Emacs and NeoVim, and all of them would heavily struggle with some of my projects (particularly in Rust). VS Code is not more efficient per-se, but for such large projects it can certainly manage without breaking the way they did.

I still use Kakoune for simple editing, but anytime debugging, a language or Git is involved I turn to VS Code.

71 avatar Dec 24 '20 11:12 71

Native UIs for major platforms: I have considered switching to Kakoune several times but always bounced back to gVim because I can install it everywhere and don't need to use terminal emulators as my editor windows. Dance is the most promising alternative I've seen so far.

I had used Vim, Emacs and NeoVim, and all of them would heavily struggle with some of my projects (particularly in Rust).

Vim and NeoVim are extremely fast; were you using a slow plugin for completions or something? (YCM is excellent but slow, and IIRC the slowness of the official Rust LSP implementation was a big part of the motivation for rust-analyzer.)

BatmanAoD avatar Jan 05 '21 18:01 BatmanAoD

Vim and NeoVim are extremely fast; were you using a slow plugin for completions or something? (YCM is excellent but slow, and IIRC the slowness of the official Rust LSP implementation was a big part of the motivation for rust-analyzer.)

It was several years ago, and the problems were mostly with Rust. In Emacs, my 10,000 lines project would trigger GCs around once per minute, and each GC would last around 20 seconds (during which Emacs was completely unresponsive). {Neo,}Vim weren't as bad, but still had occasional freezes (though I used them far much than Spacemacs). They're snappier overall, but had more significant freezes.

71 avatar Jan 05 '21 19:01 71

I would say <C-a> and <C-x> and the visual block trick of creating a list!

endowdly avatar Mar 19 '21 23:03 endowdly

I would say and and the visual block trick of creating a list!

What's the "visual block trick of creating a list"? Tricks are always fun to learn!

tshort avatar Mar 20 '21 11:03 tshort

@tshort I am probably not using the right terminology.

Say you have an incremental variable of some kind. I'm really terrible with examples, and I can't think of a good example for when this comes up. But, when it does it's such an amazing feature. So let's do something you wouldn't do with .NET to keep it to something I can explain. Let say you want to create a dictionary with string keys and a value index--normally to do this, you'd just create an array of strings and get the indexes with the IndexOf() method.

Dictionary<string, int> incExample = new Dictionary() {
    { "string", 0 },
};

Lets say in our example we want 10 things, and all we want to do is change the string name and the value from 0 to 9, incrementally. So in vim, you can Y9p on { "string", 0 },. Then, go to your second 0 (f0 because it should be on the same line) and <C-v>8j to select that column of zeros (minus the first). Then, while in visual block mode, press g<C-a>. Magic! You now have this:

Dictionary<string, int> incExample = new Dictionary() {
    { "string", 0 },
    { "string", 1 },
    { "string", 2 },
    { "string", 3 },
    { "string", 4 },
    { "string", 5 },
    { "string", 6 },
    { "string", 7 },
    { "string", 8 },
    { "string", 9 },
};

Now you can go through and change your "string"s to the keys you need.

In vim, the <C-a> operator will increment a number--or characters/strings with special settings--<C-x> will decrement and the g prefix will linearly inc/dec a selection!

endowdly avatar Mar 21 '21 15:03 endowdly

@endowdly I think the confusion here is that the post originally asks what features are available in VS Code, but not in Kakoune, and the feature you're mentioning is in Vim.

FYI I don't know about real Kakoune, but you can also achieve what you mentioned by selecting all the 0s in Dance (with /0<enter>9C or 10Xs\d<enter>) and then replacing them with an incrementing variable with |i<enter>.

71 avatar Mar 21 '21 20:03 71

@71 yup, absolutely misread that. I mentally replace vscode with vscode vim -- Dance operates in vscode so how can you miss anything when it is still available! And then I realize it's because I also mentally replaced kakoune and Dance. Yesterday was a tough day apparently.

You also just blew my mind. I didn't realize you reworked how piping works and I think that's amazing functionality. Digging into it now!

endowdly avatar Mar 22 '21 00:03 endowdly

code folding

BeastyBlacksmith avatar Jun 02 '21 15:06 BeastyBlacksmith