diff options
author | watiko <service@mail.watiko.net> | 2016-02-15 23:22:24 +0900 |
---|---|---|
committer | watiko <service@mail.watiko.net> | 2016-02-17 21:04:20 +0900 |
commit | 0b67bb8c25781205e7404ba9541124ffa0c0a0e4 (patch) | |
tree | 7791554e112492275c6803cb450fe1483c3d32fe | |
parent | 46128219462b44d4a5ae964b41812f6953753fed (diff) | |
download | rneovim-0b67bb8c25781205e7404ba9541124ffa0c0a0e4.tar.gz rneovim-0b67bb8c25781205e7404ba9541124ffa0c0a0e4.tar.bz2 rneovim-0b67bb8c25781205e7404ba9541124ffa0c0a0e4.zip |
option_defs.h: Improve coding style
-rw-r--r-- | src/nvim/option_defs.h | 54 |
1 files changed, 33 insertions, 21 deletions
diff --git a/src/nvim/option_defs.h b/src/nvim/option_defs.h index 19edc14ed6..85068dfb69 100644 --- a/src/nvim/option_defs.h +++ b/src/nvim/option_defs.h @@ -151,27 +151,39 @@ #define COCU_ALL "nvic" /* flags for 'concealcursor' */ -/* characters for p_shm option: */ -#define SHM_RO 'r' /* readonly */ -#define SHM_MOD 'm' /* modified */ -#define SHM_FILE 'f' /* (file 1 of 2) */ -#define SHM_LAST 'i' /* last line incomplete */ -#define SHM_TEXT 'x' /* tx instead of textmode */ -#define SHM_LINES 'l' /* "L" instead of "lines" */ -#define SHM_NEW 'n' /* "[New]" instead of "[New file]" */ -#define SHM_WRI 'w' /* "[w]" instead of "written" */ -#define SHM_A "rmfixlnw" /* represented by 'a' flag */ -#define SHM_WRITE 'W' /* don't use "written" at all */ -#define SHM_TRUNC 't' /* trunctate file messages */ -#define SHM_TRUNCALL 'T' /* trunctate all messages */ -#define SHM_OVER 'o' /* overwrite file messages */ -#define SHM_OVERALL 'O' /* overwrite more messages */ -#define SHM_SEARCH 's' /* no search hit bottom messages */ -#define SHM_ATTENTION 'A' /* no ATTENTION messages */ -#define SHM_INTRO 'I' /* intro messages */ -#define SHM_COMPLETIONMENU 'c' // completion menu messages -#define SHM_RECORDING 'q' ///< short recording message -#define SHM_ALL "rmfixlnwaWtToOsAIcq" ///< all possible flags for 'shm' +/// characters for p_shm option: +enum { + SHM_RO = 'r', ///< Readonly. + SHM_MOD = 'm', ///< Modified. + SHM_FILE = 'f', ///< (file 1 of 2) + SHM_LAST = 'i', ///< Last line incomplete. + SHM_TEXT = 'x', ///< Tx instead of textmode. + SHM_LINES = 'l', ///< "L" instead of "lines". + SHM_NEW = 'n', ///< "[New]" instead of "[New file]". + SHM_WRI = 'w', ///< "[w]" instead of "written". + SHM_WRITE = 'W', ///< Don't use "written" at all. + SHM_TRUNC = 't', ///< Trunctate file messages. + SHM_TRUNCALL = 'T', ///< Trunctate all messages. + SHM_OVER = 'o', ///< Overwrite file messages. + SHM_OVERALL = 'O', ///< Overwrite more messages. + SHM_SEARCH = 's', ///< No search hit bottom messages. + SHM_ATTENTION = 'A', ///< No ATTENTION messages. + SHM_INTRO = 'I', ///< Intro messages. + SHM_COMPLETIONMENU = 'c', ///< Completion menu messages. + SHM_RECORDING = 'q', ///< Short recording message. +}; +/// Represented by 'a' flag. +#define SHM_A ((char_u[]) { \ + SHM_RO, SHM_MOD, SHM_FILE, SHM_LAST, SHM_TEXT, SHM_LINES, SHM_NEW, SHM_WRI, \ + 0, \ +}) +/// All possible flags for 'shm'. +#define SHM_ALL ((char_u[]) { \ + SHM_RO, SHM_MOD, SHM_FILE, SHM_LAST, SHM_TEXT, SHM_LINES, SHM_NEW, SHM_WRI, \ + SHM_WRITE, SHM_TRUNC, SHM_TRUNCALL, SHM_OVER, SHM_OVERALL, SHM_SEARCH, \ + SHM_ATTENTION, SHM_INTRO, SHM_COMPLETIONMENU, SHM_RECORDING, \ + 0, \ +}) /* characters for p_go: */ #define GO_ASEL 'a' /* autoselect */ |