Mercurial > ~mikael > mcabber > hg
view mcabber/mcabber/utils.h @ 2304:fa8365fb6ac2
[PATCH 1/3] New option: vi_mode
If the new vi_mode option is set to 1, let MCabber's non-chat mode
accept a few commands loosely based on those available in vi(1)'s normal
mode, e.g.:
A Call "/roster unread_first".
a Call "/roster unread_next".
F Call "/roster group_prev".
f Call "/roster group_next".
G Call "/roster bottom".
gg Call "/roster top".
i Enter chat mode.
[<n>]j Call "/roster down [<n>]".
[<n>]k Call "/roster up [<n>]".
n Repeat the previous search (if any).
O Call "/roster unread_first" and open chat window.
o Call "/roster unread_next" and open chat window.
ZZ Call "/quit".
zM Call "/group fold" for all groups.
zR Call "/group unfold" for all groups.
<Space> Call "/group toggle" for the current group.
'' Call "/roster alternate".
! Toggle attention flag for current buddy.
# Toggle unread messages flag for current buddy.
/<str> Call "/roster search <str>".
:q Call "/quit".
:wq Call "/quit".
:x Call "/quit".
:<n> Jump to line <n> in the roster.
:<cmd> Call "/<cmd>" (unless <cmd> matches one of the above commands).
author | Holger Weiß <holger@zedat.fu-berlin.de> |
---|---|
date | Wed, 22 Jul 2015 19:25:22 +0200 |
parents | 377b6a52b25f |
children | e00ae0763468 |
line wrap: on
line source
#ifndef __MCABBER_UTILS_H__ #define __MCABBER_UTILS_H__ 1 #include <mcabber/config.h> extern const char *LocaleCharSet; #define to_utf8(s) ((s) ? g_locale_to_utf8((s), -1, NULL,NULL,NULL) : NULL) #define from_utf8(s) ((s) ? g_convert_with_fallback((s), -1, LocaleCharSet, \ "UTF-8", NULL,NULL,NULL,NULL) : NULL) #define JID_RESOURCE_SEPARATOR '/' #define JID_RESOURCE_SEPARATORSTR "/" #define JID_DOMAIN_SEPARATOR '@' #define JID_DOMAIN_SEPARATORSTR "@" char *jidtodisp(const char *fjid); char *jid_get_username(const char *fjid); char *get_servername(const char *username, const char *servername); char *compose_jid(const char *username, const char *servername, const char *resource); gboolean jid_equal(const char *jid1, const char *jid2); #ifndef LOUDMOUTH_USES_SHA256 void fingerprint_to_hex(const char *fpr, char *hex, size_t fpr_len); gboolean hex_to_fingerprint(const char *hex, char *fpr, size_t fpr_len); #endif void ut_init_debug(void); void ut_write_log(unsigned int flag, const char *data); char *expand_filename(const char *fname); int checkset_perm(const char *name, unsigned int setmode); const char *ut_get_tmpdir(void); int to_iso8601(char *dststr, time_t timestamp); time_t from_iso8601(const char *timestamp, int utc); int check_jid_syntax(const char *fjid); void mc_strtolower(char *str); void strip_arg_special_chars(char *s); char **split_arg(const char *arg, unsigned int n, int dontstriplast); void free_arg_lst(char **arglst); void replace_nl_with_dots(char *bufstr); char *ut_expand_tabs(const char *text); char *ut_unescape_tabs_cr(const char *text); #if !defined (HAVE_STRCASESTR) char *strcasestr(const char *haystack, const char *needle); #endif int startswith(const char *str, const char *word, guint ignore_case); #endif // __MCABBER_UTILS_H__ /* vim: set et cindent cinoptions=>2\:2(0 ts=2 sw=2: For Vim users... */