vim-linux-coding-style
vim-linux-coding-style copied to clipboard
Vim plugin to respect the Linux kernel coding style http://www.vim.org/scripts/script.php?script_id=4369
80 character limit is now deprecated[1][2]. This patch extends the character limit to 100 characters. [1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=bdc48fa11e46f867ea4d75fa59ee87a7f48be144 [2] https://lkml.org/lkml/2020/5/29/1038 Signed-off-by: Raphaël Gallais-Pou
setlocal textwidth=80 -> setlocal textwidth=100 syn match LinuxError /\%>100v[^()\{\}\[\]]\+/ " virtual column 81 and more https://linux.slashdot.org/story/20/05/31/211211/linus-torvalds-argues-against-80-column-line-length-coding-style-as-linux-kernel-deprecates-it
From Christos Kollintzas: I tried using linuxsty.vim (with and without a plug in manager) and every time that I try to open a .c file I get the following error...
The following snippet from phylink.c: ```` c if (pl->cur_link_an_mode == MLO_AN_INBAND && !test_bit(PHYLINK_DISABLE_STOPPED, &pl->phylink_disable_state)) { phylink_mac_config(pl, &pl->link_config); phylink_mac_an_restart(pl); } ```` causes linuxsty.vim to highlight the { } around this with...
E.g. the GNU has different style, so is it possible to implement different scheme(like color scheme) and switch between them?
So the corresponding pairs of braces aren't detected properly. http://www.vim.org/scripts/script.php?script_id=3772 > syntax region cBlock matchgroup=Operator start="{" end="}" contains=ALLBUT,cCurlyError,@cParenGroup,cErrInParen,cCppParen,cErrInBracket,cCppBracket,cCppString,@Spell fold
Exclusions can be used to exclude the style from being applied to paths, even if they would match linuxsty_patterns