Skip to content

Instantly share code, notes, and snippets.

@whatot
Created October 28, 2013 10:59
Show Gist options
  • Save whatot/7194937 to your computer and use it in GitHub Desktop.
Save whatot/7194937 to your computer and use it in GitHub Desktop.

Revisions

  1. whatot created this gist Oct 28, 2013.
    11 changes: 11 additions & 0 deletions kernel-tab-set
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,11 @@
    " add for the ~/linux which contains the linux kernel src,
    " So tabstop, shiftwidth, softtabstop = 8 and noexpandtab are needed
    " 10, 13, 16 come up with my several username
    " Can calculate it by :echo stridx(expand("~/linux/:p"), "linux")
    let linux_index = stridx(expand("%:p"), "linux")
    autocmd FileType c,cpp if linux_index == 10 || linux_index == 13
    \ || linux_index == 16 |
    \ let b:syntastic_checkers = ['make'] |
    \ let g:syntastic_check_on_open = 1 |
    \ set tabstop=8 shiftwidth=8 softtabstop=8 noexpandtab | endif