Live data from Hacker News

Kakoune – An experiment for a better code editor

kakoune.org

31–36 of 36 posts

Re: Kakoune – An experiment for a better code editor

#31

Kakoune seems great and I hope I will eventually make the switch from vim but there are currently 3 things holding me back. 1. Slime-like interaction: In vim I'm used to [vim-slime]( https://github.com/jpalardy/vim-slime ) for interactive languages such as python but I couldn't yet find an equivalent way to do it in kakoune. I suspect there is an easy way to do something like this using `:new` or the tmux integration…

Hello,

1. that is missing, but mostly because nobody needed it yet, and I am not very familiar with repl style languages. I expect it to be implementable with current features.

2. The simplest way to do that is to set the makecmd option, options can be set per buffer, so each C++ buffer can have it set to the compile command for it. You'll get output in the make buffer.

3. I use ctags a lot, and it is well supported, it requires the readtags command that is provided by default in universal-ctags, and needs to be installed manually with the older exuberant ctags. There is no cscope support script AFAIK (although should be possible).

Re: Kakoune – An experiment for a better code editor

#32
post #26
post #25

Earlier quoted context omitted.

Thanks a lot for you reply, I try to be reactive to feature requests, especially easy ones like making something configurable through an option (I expect most of these to be resolved in a day or so). Some people are using kakoune with fzf, using tmux to open a split, which is very simple to implement with fzf-tmux. Interacting with Kakoune interface ought to be possible but possibly more tricky.

Yeah, I can't see how I would do it. I could open a tmux pane with fzf and run another kak window but that's not really the goal. I'd like to use fzf to open a found file in the current kak window. The plugin architecture just really limits this kind of thing, and this fzf example was just a simple one I wanted to use to demonstrate the point. But again, the stuff you have in this editor is absolutely fantastic, real…

Thanks a lot for you feedback, if you use tmux, interacting with fzf is easy as you can run fzf-tmux, that will open a tmux pan for fzf to run in.

There is an example script for that in https://github.com/mawww/kakoune/issues/383

Its more tricky if you do not use tmux, as due to Kakoune client/server nature, fzf will be launched by the server, which might not even have a terminal. That said I really enjoy fuzzy matching, and most built-in completions do fuzzy matching already.

Thanks again for giving feedback on your experience with Kakoune, always much appreciated !

Re: Kakoune – An experiment for a better code editor

#33
One piece of feedback about the website itself: the actual reading area is unusably small when viewed on a mobile device. Here's a screenshot:http://imgur.com/yvOGc02. Note that the menu doesn't hide, so >50% of the screen is occupied by a static menu that's irrelevant to the actual content I'm trying to read.

Re: Kakoune – An experiment for a better code editor

#34
First impressions with this editor are very good.

One thing I'm not 100% sure how to do is substituions with references

so if I want to change the all the strings "foo(5, bar)" to "baz(bar).foo(5)"

with 5 and bar being arbitrary strings. How could I do that? In vim I would use a regex expression and refer to matching sections with "%s/foo(\([^,]+\), \([^)]+\))/baz(\2).foo(\1)/gc". In Kakoune it seems I might have to do some multiselect shenanigans, the regex has better escaping for my taste, but I can't match on specific selections. So I can't shuffle them arbitrarily.

I looked through the vim golf challenges and couldn't find Kakoune doing an operation like this.

mawww, do you have some screencasts of you using this editor? I would be nice to have some live demonstrations showing off useful and common usage patterns for it.

Re: Kakoune – An experiment for a better code editor

#35
post #29

Earlier quoted context omitted.

well intentioned nit-pick: vim commands starting with a g are NOT chords, and that's very important from am usability standpoint. For the most part vim avoids chords, while E-macs embraces them. It's a question of whether you want to strain your hands (chords/emacs) or your brain (modal/vim) for triggering infrequent commands.

I would like to see an option for both in a text-editor - they are not as far apart as people assume. In emacs there are not enough chorded options for everything so after a while they switched to dead-key like operations. That is basically a modal interface where you have to keep the mode key depressed. My dream editor would feature: * Three modes: insert, quick commands, a searchable palette for everything. * Confi…

> * Configurable switch between modal/non-modal use of the command key.

This one is also provided in Spacemacs which is called editing style (vim, emacs or hybrid). It is possible to switch between them dynamically.

Re: Kakoune – An experiment for a better code editor

#36

First impressions with this editor are very good. One thing I'm not 100% sure how to do is substituions with references so if I want to change the all the strings "foo(5, bar)" to "baz(bar).foo(5)" with 5 and bar being arbitrary strings. How could I do that? In vim I would use a regex expression and refer to matching sections with "%s/foo(\([^,]+\), \([^)]+\))/baz(\2).foo(\1)/gc". In Kakoune it seems I might have to…

Hello,

If you get your selections through a regex, you will have access to capture groups in registers 0..9 (which will store the correct match for each selections), so to do the change you wanted, you'll type (in normal mode, no ':'):

%sfoo\(([^,]+), ([^)]+)\) # select whole buffer, then select all regex matches

cbaz(2).foo(1) # enter insert mode, recalls a register

I have been meaning to do a screencast at some point, or maybe I could do a twitch Q/A session.

Post reply on HN