From 7e58e5c64c41b861942f7e307175f86a604cc4df Mon Sep 17 00:00:00 2001 From: Nikos Tsipinakis Date: Thu, 17 Nov 2016 20:27:46 +0200 Subject: [PATCH] Add expandtab to vim modelines & expand abbreviations Add expandtab to vim modelines so that spaces are expanded to tabs, make life easier for people that have vim configured to use tabs by default. Expand modeline abbreviations to improve readability. --- dbus.c | 2 +- dbus.h | 2 +- dunst.c | 2 +- dunst.h | 2 +- dunstify.c | 2 ++ menu.c | 2 +- menu.h | 2 ++ notification.c | 2 +- notification.h | 2 ++ option_parser.c | 2 +- option_parser.h | 2 +- rules.c | 2 +- rules.h | 2 ++ settings.c | 2 +- settings.h | 2 ++ utils.c | 2 +- utils.h | 2 +- x.c | 2 +- x.h | 2 +- 19 files changed, 24 insertions(+), 14 deletions(-) diff --git a/dbus.c b/dbus.c index 0aeff83..f05f56e 100644 --- a/dbus.c +++ b/dbus.c @@ -495,4 +495,4 @@ void dbus_tear_down(int owner_id) g_bus_unown_name(owner_id); } -/* vim: set ts=8 sw=8 tw=0: */ +/* vim: set tabstop=8 shiftwidth=8 expandtab textwidth=0: */ diff --git a/dbus.h b/dbus.h index 56f1dc7..a98baed 100644 --- a/dbus.h +++ b/dbus.h @@ -15,4 +15,4 @@ void actionInvoked(notification * n, const char *identifier); #endif -/* vim: set ts=8 sw=8 tw=0: */ +/* vim: set tabstop=8 shiftwidth=8 expandtab textwidth=0: */ diff --git a/dunst.c b/dunst.c index 4c9591e..a0debc0 100644 --- a/dunst.c +++ b/dunst.c @@ -434,4 +434,4 @@ void print_version(void) exit(EXIT_SUCCESS); } -/* vim: set ts=8 sw=8 tw=0: */ +/* vim: set tabstop=8 shiftwidth=8 expandtab textwidth=0: */ diff --git a/dunst.h b/dunst.h index a27a9fa..805cb50 100644 --- a/dunst.h +++ b/dunst.h @@ -45,4 +45,4 @@ char *extract_urls(const char *str); void context_menu(void); void wake_up(void); void pause_signal_handler(int sig); -/* vim: set ts=8 sw=8 tw=0: */ +/* vim: set tabstop=8 shiftwidth=8 expandtab textwidth=0: */ diff --git a/dunstify.c b/dunstify.c index 5a6fafe..f2f109f 100644 --- a/dunstify.c +++ b/dunstify.c @@ -312,3 +312,5 @@ int main(int argc, char *argv[]) die(0); } + +/* vim: set tabstop=8 shiftwidth=8 expandtab textwidth=0: */ diff --git a/menu.c b/menu.c index fb05798..d3e4fb4 100644 --- a/menu.c +++ b/menu.c @@ -257,4 +257,4 @@ void context_menu(void) free(dmenu_input); } -/* vim: set ts=8 sw=8 tw=0: */ +/* vim: set tabstop=8 shiftwidth=8 expandtab textwidth=0: */ diff --git a/menu.h b/menu.h index 01dda4a..86491f1 100644 --- a/menu.h +++ b/menu.h @@ -6,3 +6,5 @@ char *extract_urls(const char *to_match); void open_browser(const char *url); void invoke_action(const char *action); void regex_teardown(void); + +/* vim: set tabstop=8 shiftwidth=8 expandtab textwidth=0: */ diff --git a/notification.c b/notification.c index ede5593..41f5389 100644 --- a/notification.c +++ b/notification.c @@ -623,4 +623,4 @@ int notification_get_ttl(notification *n) { int notification_get_age(notification *n) { return time(NULL) - n->timestamp; } -/* vim: set ts=8 sw=8 tw=0: */ +/* vim: set tabstop=8 shiftwidth=8 expandtab textwidth=0: */ diff --git a/notification.h b/notification.h index f7c3858..b15a6ac 100644 --- a/notification.h +++ b/notification.h @@ -67,3 +67,5 @@ char *notification_quote_markup(char *str); void notification_update_text_to_render(notification *n); int notification_get_ttl(notification *n); int notification_get_age(notification *n); + +/* vim: set tabstop=8 shiftwidth=8 expandtab textwidth=0: */ diff --git a/option_parser.c b/option_parser.c index 6de5a76..ea822a3 100644 --- a/option_parser.c +++ b/option_parser.c @@ -473,4 +473,4 @@ char *cmdline_create_usage(void) return g_strdup(usage_str); } -/* vim: set ts=8 sw=8 tw=0: */ +/* vim: set tabstop=8 shiftwidth=8 expandtab textwidth=0: */ diff --git a/option_parser.h b/option_parser.h index 873897f..1b1d9df 100644 --- a/option_parser.h +++ b/option_parser.h @@ -33,4 +33,4 @@ int option_get_bool(char *ini_section, char *ini_key, char *cmdline_key, */ char *next_section(char *section); -/* vim: set ts=8 sw=8 tw=0: */ +/* vim: set tabstop=8 shiftwidth=8 expandtab textwidth=0: */ diff --git a/rules.c b/rules.c index 8687f07..dc8e465 100644 --- a/rules.c +++ b/rules.c @@ -78,4 +78,4 @@ bool rule_matches_notification(rule_t * r, notification * n) && (!r->category || !fnmatch(r->category, n->category, 0)) && (r->msg_urgency == -1 || r->msg_urgency == n->urgency)); } -/* vim: set ts=8 sw=8 tw=0: */ +/* vim: set tabstop=8 shiftwidth=8 expandtab textwidth=0: */ diff --git a/rules.h b/rules.h index f7fc734..218ce37 100644 --- a/rules.h +++ b/rules.h @@ -34,3 +34,5 @@ void rule_init(rule_t * r); void rule_apply(rule_t * r, notification * n); void rule_apply_all(notification * n); bool rule_matches_notification(rule_t * r, notification * n); + +/* vim: set tabstop=8 shiftwidth=8 expandtab textwidth=0: */ diff --git a/settings.c b/settings.c index 88229b9..857cb8f 100644 --- a/settings.c +++ b/settings.c @@ -402,4 +402,4 @@ void load_settings(char *cmdline_config_path) } #endif } -/* vim: set ts=8 sw=8 tw=0: */ +/* vim: set tabstop=8 shiftwidth=8 expandtab textwidth=0: */ diff --git a/settings.h b/settings.h index 517922b..290291f 100644 --- a/settings.h +++ b/settings.h @@ -66,3 +66,5 @@ typedef struct _settings { extern settings_t settings; void load_settings(char *cmdline_config_path); + +/* vim: set tabstop=8 shiftwidth=8 expandtab textwidth=0: */ diff --git a/utils.c b/utils.c index 7d07ffe..4e6821c 100644 --- a/utils.c +++ b/utils.c @@ -147,4 +147,4 @@ void die(char *text, int exit_value) exit(exit_value); } -/* vim: set ts=8 sw=8 tw=0: */ +/* vim: set tabstop=8 shiftwidth=8 expandtab textwidth=0: */ diff --git a/utils.h b/utils.h index 1009f96..5e09550 100644 --- a/utils.h +++ b/utils.h @@ -26,4 +26,4 @@ void die(char *msg, int exit_value); int digit_count(int i); #endif -/* vim: set ts=8 sw=8 tw=0: */ +/* vim: set tabstop=8 shiftwidth=8 expandtab textwidth=0: */ diff --git a/x.c b/x.c index 49e7099..caa1b7b 100644 --- a/x.c +++ b/x.c @@ -1420,4 +1420,4 @@ void x_shortcut_init(keyboard_shortcut * ks) free(str_begin); } -/* vim: set ts=8 sw=8 tw=0: */ +/* vim: set tabstop=8 shiftwidth=8 expandtab textwidth=0: */ diff --git a/x.h b/x.h index cc366b9..767190b 100644 --- a/x.h +++ b/x.h @@ -82,4 +82,4 @@ gboolean x_mainloop_fd_check(GSource * source); gboolean x_mainloop_fd_prepare(GSource * source, gint * timeout); #endif -/* vim: set ts=8 sw=8 tw=0: */ +/* vim: set tabstop=8 shiftwidth=8 expandtab textwidth=0: */