Closed mawww closed 7 years ago
Just for reference, I made this info public in (sorry, it's not in English - let the Google translate be your companion :smiley:): http://www.root.cz/zpravicky/kakoune-novy-textovy-editor-inspirovany-vimem/ http://www.abclinuxu.cz/zpravicky/kakoune-novy-textovy-editor-inspirovany-vimem
Regarding additional ideas - I have actually a feature-request list already cca half a year old as I was afraid to propose it too early. Here you are:
\
before entering insert mode will disable hooks during the whole insert session?)''
which loops over only 2 such positions)Already reported/planned somewhere:
I. restore session after opening (cursor position, search history, command history) II. kakdiff - really important feature deserving priority raising :)
:echo %opt{filetype}
but I guess you mean in the status line, in which case that might require a more general status line customization system.\
before entering insert mode will disable hooks for this insert session (\
before any command disable hooks for the command) so that replace vim's :set paste
:new
will create a window, using a vsplit by default in tmux, or just a new terminal under x11. Integrated window management is a non goal, however with tmux (and x11 if you have xdotool installed), Kakoune is already able to switch focus to a given client (see make.kak
or grep.kak
for example)ctags.kak
provides jump to function decl for most languages, it requires the readtags
command (available in exuberant ctags source, but not installed by default). the https://github.com/fishman/ctags version already install it by default and will probably become the official exuberant ctags soon.m
does jump to matching char.:hook buffer InsertChar \( 'exec )<left>'
show_matching
highlighter does that, enable it for all windows with hook global WinCreate .* %{ addhl show_matching }
in you kakrc<c-s>
saves push the current selection on the jump list, <c-i>
goes forward in it, <c-o>
backward.map global user y '<a-|>putclip<ret>:echo -color Information "yanked to win32 clipboard"<ret>'
map global user p '<a-!>getclip<ret>:echo -color Information "pasted from win32 clipboard"<ret>'
map global user P '!getclip<ret>:echo -color Information "pasted from win32 clipboard"<ret>'
map global user R ':reg w "%sh{getclip}"<ret>"wR:echo -color Information "replaced from win32 clipboard"<ret>'
I. restore session is not supported, however on crash, kakoune will try to save all modified buffers to .${buf_name}.kak.XXXXXX
II. yep, kakdiff is totally missing as it depends on something similar to folding.
So to recap, what is really missing here is:
Thanks a lot for your feedback !
3 . line wrapping highlighter should also support a customization of the indentation width (by default the same as indentwidth
?)
:hook buffer InsertChar <backspace> 'exec ???only_if_it_was_opening_brace_and_the_character_on_the_right_side_is_a_closing_brace???<right><backspace>'
(hope that it's not recursive)show_matching
doesn't highlight anything for me after putting the hook to my kakrc<c-i>
<c-o>
and limited to only a small number of items (user-configurable)HT
and b) depending on the file type either LF
or CRLF
) using caret notation and/or color highlighting.
I. restore session is discussed in https://github.com/mawww/kakoune/issues/74; but the unsaved file content recovery is an absolute must - it happens surprisingly often to close accidentaly window or experience failed wake-up from hibernation etc.Thanks for your patience!
Hi there, first let me say I'm enjoying using kakoune a lot and wish it good luck conquering the world! :) I'd have a few questions/suggestions:
<c-f>
and <c-b>
work but are not documented in the readme. Maybe <c-d>
and <c-u>
could be implemented as well?:e
.
E.g. if I start kakoune in ~
and :e code/cpp/kakoune/rc/c-family.kak
upon next :e
I'd expect to be in code/cpp/kakoune/rc
but I find myself in ~
.<a-l>
and gl
select to line end couldn't one of them go there without selecting?
This would reduce key strokes in some cases (e.g. <a-l>li
or <a-l>;i
would become <a-l>i
.
For me it makes sense to have both instead of having 2 mappings for one.show_matching
doesn't seem to be working.*
could show as information what is the search pattern that is being saved.onkey
) use registers to store information. Is there or could there be a hidden register for such commands?
What register should I use to store something? If it is publicly available my code could mess up someone's register if one happens to use the same the command did.
This is unhygienic.That's all from the past 2 days, I'm sure more will come as I start using the editor more. Best of luck and thanks for this great project!
- Edit directory. I'd expect to find myself in the current buffer's directory upon pressing :e. E.g. if I start kakoune in ~ and :e code/cpp/kakoune/rc/c-family.kak upon next :e I'd expect to be in code/cpp/kakoune/rc but I find myself in ~.
IMHO I think this is good behavior I think it's more meaningful to open kakoune in one place and open files from this one place instead of moving it between places. I'm seeing this as good behavior mostly for programming where you open root folder src
and opening files from there instead of thinking where I must go from this position...
- Go to line begin/end. Since e.g. both
and gl select to line end couldn't one of them go there without selecting?
I have the same opinion but I thought that I missed some keys.
- Map only for keys. Would/is it possible to map commands to keys?
I'm using this in my kakrc and it's working like a charm.
map global user n ':eval %{nextbuffer}<ret>'
in other words, you have eval
mechanism for this.
I would like to add one question. I was trying to create my highlighter (I will add it to repository when it's done) but I find out that almost every highlighter using instead of color names some inner variables like meta
,value
... but I didn't find that in documentation and they are not highlighted as colors.
Are these variables for common use and if they are please add them to documentation.
Thank you @mawww it's really super editor ;).
I'm seeing this as good behavior mostly for programming where you open root folder
src
and opening files from there instead of thinking where I must go from this position...
I guess everyone has a different approach :) I often launch kak from home and open files from within it instead of cd
ing to the right place first. That leaves me retyping the path/to/src
everytime. Also this doesn't scale well if you want to open 2-3 projects from different places, then you'll be really lost. I just realized that this could be implemented through hooks on WinCreate/WinDisplay with cd, so I'll play around with that. I still think this would be a more reasonable default, but that's just my opinion.
I'm using this in my kakrc and it's working like a charm.
map global user n ':eval %{nextbuffer}<ret>'
in other words, you have eval mechanism for this.
I see, thanks for that!
I find out that almost every highlighter using instead of color names some inner variables like
meta
,value
...
I might be wrong ( @mawww correct me if I am ) but if you look at share/kakrc
you'll see some default faces being defined, like value
, comment
etc. These faces are used in rc/your-language.kak
to define highlighting. With this setup you can change the color scheme easily since all language highlighters are using the same faces. In short you should be using these faces for highlighting your language instead of baking in some colors.
- New title. I think experiment should be dropped and a short and interesting title picked. Example ideas:
We could eventually change that at some point yeah, not a very big priority though.
- Paging.
and work but are not documented in the readme. Maybe and could be implemented as well?
Yep, documentation fixes are welcome ;), not sure what
- Edit directory. I'd expect to find myself in the current buffer's directory upon pressing :e. E.g. if I start kakoune in ~ and :e code/cpp/kakoune/rc/c-family.kak upon next :e I'd expect to be in code/cpp/kakoune/rc but I find myself in ~.
I'd rather have that implemented as hooks than in core
- Go to line begin/end. Since e.g. both
and gl select to line end couldn't one of them go there without selecting?
done as of 66866aafd3941cb8fdd03343c46e0d9f94cd99fa
- Highlighter show_matching doesn't seem to be working.
It only highlights when the cursor is on the character, and use bold by default, which might not work with your terminal.
- Map only for keys. Would/is it possible to map commands to keys?
@jkonecny12 answered that
- Search selection with * could show as information what is the search pattern that is being saved.
Good idea, could you open an issue for that (so that I do not forget)
- Some commands (e.g. onkey) use registers to store information. Is there or could there be a hidden register for such commands?
Good point, could you open an issue about that
- Prioritize folding and diffing. These are commonly used in other editors and new users will be looking and asking for them.
Agreed
- Plugins. New users will be looking for a surround, paredit, powerline, snipmate/yasnippet, fugitive/magit clone
Let the users do the work !
More seriously, I prefer to work on support scripts for the features I actually use, but I will happily lend a hand if someone wants to write/improve a plugin for his use case.
I might be wrong ( @mawww correct me if I am ) but if you look at share/kakrc you'll see some default faces being defined...
Yep thats the case, these default faces should be documented properly though.
Yep, documentation fixes are welcome ;), not sure what and would do, do you mean as in emacs to move cursor down/up ?
If I remember correctly [f]orward/[b]ackward (i.e. <c-f>
and <c-b>
) move a whole page and [d]own/[u]p (i.e. <c-d>
and <c-u>
) move half a page in vim. Sometimes it's easier to follow the code if you move by half pages only. Not a big priority but shouldn't be hard to implement.
It only highlights when the cursor is on the character, and use bold by default, which might not work with your terminal.
Could it be configurable? Or at least have a background color, bold is hard to notice.
I opened the issues you asked me to. I'd be happy to contribute more once I have a bit more time.
Could it be configurable? Or at least have a background color, bold is hard to notice.
It is the MatchingChar builtin face, so you can set it to whatever you fancy.
Hi, I just learned about this project, since it just hit the front page of hackernews. Perhaps this is the wrong place for the discussion, but if the following is true:
Kakoune is now quite mature, with no major feature missing
why not consider having a proper release version? It's not exactly "advertising" per se, in the sense of other things listed here. But having a normal release cycle allows you to drop the headline Kakoune <minor version bump> released!
on hackernews/reddit/etc every once in a while. And some people will only want to download and run a stable version, rather than run from the bleeding edge.
@mawww
How about a twitter account?
Hello,
I've started a collaborative news about Kakoune on the french community site LinuxFr:
https://linuxfr.org/redaction/news/kakoune-un-editeur-de-caractere
Feel free to join me to improve and enrich information given in this article.
Done, the published article is here Kakoune, un éditeur de texte qui a du caractère - LinuxFr.org
I also think that a version https://github.com/mawww/kakoune/issues/315 would help a lot in getting adopted by distros and thus promoting to the spread of kakoune.
I think it's perfectly usable at this point and totally deserves a release.
Since I am just learning the editor now, I would be happy to build a small "tutor" as I figure things out.
That would be super nice @rennis250 . Thank you
Hello,
Any news about a "kaktutor"? Did you get the chance to start something @rennis250?
I am currently discovering kakoune and I thought it would really help.
This issue thread is becoming quite long, and turning in a general feature request / discussion thread. As far as I understand there are five remaining issues described in this thread:
I'd like to propose that we create separate issues for these items and continue in depth discussion there. Whats your thought on this @mawww
I think we already have issues regarding wrapping, folding, and the diff support.
These dont strike me a blockers, they are nice features, but should not prevent other progress.
I think our main blocker here is the lack of good starting tutorial, especially for users not familiar with Vi or modal text editing at all. We did not get any news from @rennis250 recently, so it might be time to have somebody else take a stab at that.
Regarding reviews by vim news sites, we dont have much control on that, but in general it would be nice to get a few blog posts/articles from users, giving their perspective on Kakoune.
The Why Kakoune
article came out from a talk I did a few times, but gives
a perspective from the design side of things, having some users explaining
how they use Kakoune would be pretty nice, especially if we can show various
workflows around different technologies/languages (Someone explaining how
they works on server side go code with Kakoune, somebody else on how they
work on frontend...)
@mawww Thanks for your quick response, Because a lot of the issues described here have already been tackled or filed in separate issues, how do you feel about closing this issue and creating a separate issue about the kakoune tutor. The reason I'm asking is because for new contributors this issue isn't really clear and actionable.
Yeah, I think we are at a point where that issue can be closed. I cannot do it right now, as I am using some in flight wifi, and for some reason github times out, but will do. Another issue can be opened for the tutorial.
I think we already have issues regarding wrapping, folding, and the diff support.
Cross refs:
Hello Kakoune users,
I feel Kakoune is now quite mature, with no major feature missing. It seems the interaction interface is good enough for most of the use cases I thrown at it, with a good example being
clang.kak
providing code completion and syntastic like diagnostics in ~120 lines.We have basic syntax highlighting for most common programming language (perl being the main lacking one), reasonable make and grep interaction, even a proof of concept YouCompleteMe support script (https://github.com/mawww/kak-ycmd) .
All that to say, I think it is now time to try to get more users, and hence more use cases.
This issue is there to list the different things that would help Kakoune get noticed, and hopefully attract users.
Off the top of my head:
Any additional idea/comments ?
Cheers,
Maxime.