Skip to contentSkip to conversation

vim: linux-kernel: Add "fallthrough" as a keyword

PATCH Joe Perches 2 participants 2 messages Mar 15, 2020 – Jun 9, 2020

lore
Share & tools
lore
#0 lore raw

Add fallthrough as a keyword for source code highlighting as fallthrough was added as a pseudo-keyword macro to replace the various forms of switch/case /* fallthrough */ comments.

---
 plugin/linuxsty.vim | 1 +
 1 file changed, 1 insertion(+)
plugin/linuxsty.vim +1 -0
index 18b28..44824 100644
@@ -69,6 +69,7 @@ function s:LinuxFormatting()
 endfunction
 
 function s:LinuxKeywords()
+    syn keyword cStatement fallthrough
     syn keyword cOperator likely unlikely
     syn keyword cType u8 u16 u32 u64 s8 s16 s32 s64
     syn keyword cType __u8 __u16 __u32 __u64 __s8 __s16 __s32 __s64
#1 lore raw

Hi Joe,

Quoted 15 lines · Joe Perches

Add fallthrough as a keyword for source code highlighting as fallthrough was added as a pseudo-keyword macro to replace the various forms of switch/case /* fallthrough */ comments.

---
 plugin/linuxsty.vim | 1 +
 1 file changed, 1 insertion(+)
plugin/linuxsty.vim +0 -0
index 18b28..44824 100644

plugin/linuxsty.vim function s:LinuxFormatting() · line 75

Quoted 7 lines
plugin/linuxsty.vim +1 -0
@@ -69,6 +69,7 @@ function s:LinuxFormatting()
 endfunction
 
 function s:LinuxKeywords()
+    syn keyword cStatement fallthrough
     syn keyword cOperator likely unlikely
     syn keyword cType u8 u16 u32 u64 s8 s16 s32 s64
     syn keyword cType __u8 __u16 __u32 __u64 __s8 __s16 __s32 __s64

I've applied the patch, sorry for the delay.

Thanks,

Vivien