diff options
-rw-r--r-- | README.md | 21 | ||||
-rw-r--r-- | wee_slack.py | 15 |
2 files changed, 16 insertions, 20 deletions
@@ -324,30 +324,11 @@ or symlink the [`weemoji.json`](https://github.com/wee-slack/wee-slack/blob/master/weemoji.json) file to your WeeChat config directory (e.g. `~/.local/share/weechat` or `~/.weechat`). If doing this after starting wee-slack, you will have to reload -it by running `/python reload slack`. Then append `|%(emoji)` to the -`weechat.completion.default_template` config option, e.g. like this: - -``` -/set weechat.completion.default_template "%(nicks)|%(irc_channels)|%(emoji)" -``` +it by running `/python reload slack`. Emoji names can be completed by typing colon and the start of the emoji name and pressing tab. -### User group tab completions - -To enable tab completions for usergroups append `|%(usergroups)` to the -`weechat.completion.default_template` config option, e.g. like this: - -``` -/set weechat.completion.default_template "%(nicks)|%(irc_channels)|%(usergroups)" -``` - -If you already added `%(emoji)` to this config option, like described in the -last section, make sure not to overwrite that. The usergroup will appear in the -same format as nicks, like the following: `@marketing`, where marketing is the -usergroup handle. - ### Cursor and mouse mode The cursor mode and mouse mode can be used to interact with older messages, for editing, deleting, reacting and replying to a message. Mouse mode can be toggled by pressing `Alt`+`m` and cursor mode can be entered by running `/cursor` (see `/help cursor`). diff --git a/wee_slack.py b/wee_slack.py index 6dae8af..1d18126 100644 --- a/wee_slack.py +++ b/wee_slack.py @@ -1694,6 +1694,11 @@ class SlackTeam(object): w.buffer_set(self.channel_buffer, "localvar_set_slack_type", self.type) w.buffer_set(self.channel_buffer, "localvar_set_nick", self.nick) w.buffer_set(self.channel_buffer, "localvar_set_server", self.name) + w.buffer_set( + self.channel_buffer, + "localvar_set_completion_default_template", + "${weechat.completion.default_template}|%(usergroups)|%(emoji)", + ) self.buffer_merge() def buffer_merge(self, config_value=None): @@ -2421,6 +2426,11 @@ class SlackChannel(SlackChannelCommon): self.channel_buffer, "localvar_set_channel", self.formatted_name() ) w.buffer_set(self.channel_buffer, "localvar_set_nick", self.team.nick) + w.buffer_set( + self.channel_buffer, + "localvar_set_completion_default_template", + "${weechat.completion.default_template}|%(usergroups)|%(emoji)", + ) self.buffer_rename_in_progress = True w.buffer_set( self.channel_buffer, "short_name", self.formatted_name(style="sidebar") @@ -3212,6 +3222,11 @@ class SlackThreadChannel(SlackChannelCommon): self.channel_buffer, "localvar_set_channel", self.formatted_name() ) w.buffer_set(self.channel_buffer, "localvar_set_server", self.team.name) + w.buffer_set( + self.channel_buffer, + "localvar_set_completion_default_template", + "${weechat.completion.default_template}|%(usergroups)|%(emoji)", + ) self.buffer_rename_in_progress = True w.buffer_set( self.channel_buffer, "short_name", self.formatted_name(style="sidebar") |