Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Setting Plugin Options

Screwtapello edited this pageJan 19, 2020 ·1 revision

Many Kakoune plugins, both third-party and ones that come with Kakoune, can be configured by setting options in yourkakrc. However, sometimes when you add something to yourkakrc like:

set-option global termcmd "gnome-terminal -e"

...Kakoune will throw an error at startup like:

'set-option' option not found: 'termcmd'. Use declare-option first

This might be because you've mistyped the option name, but it's also possible that the plugin isa module, which is especially likely if the plugin isn't always applicable - for example, a plugin for a specific filetype might not be loaded until a file of that type is opened, and a plugin to integrate with an external tool might not be loaded unless that tool is available. Thetermcmd option in the example above is created by thex11 plugin, which isn't loaded unless Kakoune is running inside an X11 windowing environment.

If this is the case, the first thing you need to do is figure out the name of the module that defines the option you want to set. That information should be listed in the documentation for the plugin, but as a last resort you can search through all your plugins to find the.kak file that defines the option, then search within that file for theprovide-module command that defines the module.

Once you know the name of the module you'll need, you'll need to add a hook to set the option once the module is loaded. Following our example above, thetermcmd option is set in thex11 module, so we would add the following snippet to ourkakrc:

hook global ModuleLoaded x11 %{    set-option global termcmd "gnome-terminal -e"}
Clone this wiki locally

[8]ページ先頭

©2009-2025 Movatter.jp