GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - vivien/vim-linux-coding-style: Vim plugin to respect the Linux kernel coding style http://www.vim.org/scripts/script.php?script_id=4369

BranchesTags
Open more actions menu

Latest commit

 

History

29 Commits
29 Commits

Folders and files

NameName
Last commit message
Last commit date
plugin
plugin
 
 
README.md
README.md
 
 

Repository files navigation

linuxsty.vim

This plugin is meant to help you respecting the Linux kernel coding style, described at: https://www.kernel.org/doc/Documentation/process/coding-style.rst

It will automatically apply known rules to kernel related files, such as .c, .h, Kconfig and patch files. The main rules are about indentation and syntax error highlighting (like exceeding 80 chars).

If you have any comments, fixes or requests, feel free to contact me or send me a patch. The development also takes place on its official Github repository.

The plugin is also available at vim.org, script ID 4369.

Installation

You can just drop the linuxsty.vim file in your ~/.vim/plugin directory. Alternatively you can use the Git repository with a manager such as Pathogen.

Usage

By default the Linux coding style is enabled for any file known to the Linux project (C files, headers, patches, Kconfig, etc.).

If you prefer a finer control and apply it only on some files, define a "g:linuxsty_patterns" array in your vimrc and the style will be applied only if the buffer's path matches one of the pattern. For instance, you can match only projects under /usr/src/ and /linux with the following:

let g:linuxsty_patterns = [ "/usr/src/", "/linux" ]

If you want to enable the coding style on demand without checking the filetype, you can use the :LinuxCodingStyle command. For instance, you can map it with the following in your vimrc:

nnoremap <silent> <leader>a :LinuxCodingStyle<cr>

License

Copyright (c) Vivien Didelot. Distributed under the same terms as Vim itself. See :help license.

About

Vim plugin to respect the Linux kernel coding style http://www.vim.org/scripts/script.php?script_id=4369

Resources

Readme
Activity

Stars

234 stars

Watchers

19 watching

Forks

94 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.