Comments (2)
In your examples, open_buffer_picker
is a command which accepts no arguments, but Kakoune is told to use buffer-completion anyway. Because of the -menu
option, Kakoune will force you to choose a buffer name to add to the command-line, guaranteeing a "wrong argument count" error.
When the command is invoked without an argument (such as from a user-mode mapping), it runs the prompt
command, which uses a similar user-interface, but which asks the user for a string which will be handled by a user script, rather than being executed by Kakoune as a command. As a result, it has its own, independent settings.
declare-command
options like -buffer-completion
have been deprecated in favour of the separate complete-command
command, which modifies the completion settings for a specific user-declared command. However, prompt
is a built-in command, not a user-declared command. It still requires options like -buffer-completion
to control what kind of completion it provides, they have not been deprecated, and complete-command
does not affect it.
Long story short, the "old" code you present under "Expectations" is still correct, and still the way to achieve the result you want with modern versions of Kakoune.
Incidentally, I assume this is a simplified test-case meant to demonstrate the problem, and not something you actually use in your kakrc. If you want a buffer picker, you could just use map global user b :b<space>
since the buffer
command already uses buffer-completion and already switches to the selected buffer when you hit <ret>
.
from kakoune.
declare-command options like -buffer-completion have been deprecated in favour of the separate complete-command command, which modifies the completion settings for a specific user-declared command. However, prompt is a built-in command, not a user-declared command. It still requires options like -buffer-completion to control what kind of completion it provides, they have not been deprecated, and complete-command does not affect it.
Got it, thank you! Closing the issue.
If you want a buffer picker, you could just use map global user b :b since the buffer command already uses buffer-completion and already switches to the selected buffer when you hit .
This! Exactly, thank you once again.
from kakoune.
Related Issues (20)
- [QUESTION] Remote Events aync ?
- [BUG][CRASH] ctags-search crashes kakoune after trying to browse autocomplete options. HOT 2
- [BUG] %val{buflist} does not produce quoted output by default HOT 1
- [BUG] :w write paste wl-clipboard contents HOT 4
- [BUG] mv operation should not interfere with HOT 3
- [QUESTION] Text file busy make: *** [Makefile:181: install] Error 1 HOT 1
- [QUESTION] Cursor up/down navigation in soft-wrapped text (gj/gk in Vim) HOT 7
- Adding keybinding for `<c-/>` does not work HOT 2
- [BUG] markdown highlighting cannot parse `` correctly
- [BUG] cannot use <ret> in *lint-output* buffer HOT 2
- [REQUEST] `close-daemonized-session` command HOT 4
- [BUG] Receiving `'vfork' is deprecated:` warnings while compiling Kakoune from source HOT 2
- [BUG] 2024.05.09 tests failing on Alpine Linux HOT 16
- [BUG] Tests failing on OpenBSD HOT 10
- [BUG] Files getting created when using autocomplete HOT 3
- [BUG] HOT 1
- [REQUEST] revert f26d4ea4 for putting tmux into background again HOT 7
- [BUG] Viewport motion no longer takes scrolloff into account
- [BUG] WhitespaceIndent face overridden by language highlighting HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from kakoune.