-
|
I'm getting started with scroll, and trying to figure out how to setup my default mode settings. The command |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
|
There used to be a command local scroll = require("scroll")
local function on_create_ws(workspace, _)
-- For example
scroll.workspace_set_mode(workspace, { insert = "before", center_horizontal = true})
end
scroll.add_callback("workspace_create", on_create_ws, nil)and every time you create a new workspace, it will modify the mode settings. This also allows you to do much more complicated things, like filtering by workspace name or output, etc., and that is why I deprecated To enable the script at startup, set in your config: |
Beta Was this translation helpful? Give feedback.
There used to be a command
workspace <name> exec <command>which worked like a simple workspace rule, but since I added Lua scripting, I saw you could do much more interesting things with it. In the case you mention, you would create amy_set_mode.luascript:and every time you create a new workspace, it will modify the mode settings. This also allows you to do much more complicated things, like filtering by workspace name or output, etc., and that …