Skip to content

Instantly share code, notes, and snippets.

@slayerlab
Last active December 5, 2018 01:36
Show Gist options
  • Save slayerlab/798a9207856fa1d2b78c4add585a3e33 to your computer and use it in GitHub Desktop.
Save slayerlab/798a9207856fa1d2b78c4add585a3e33 to your computer and use it in GitHub Desktop.
Making the BASH dive into 'Shell Style Guide' for better readability.
" Making the BASH dive into 'Shell Style Guide' for better readability.
" https://lug.fh-swf.de/vim/vim-bash/StyleGuideShell.en.pdf
" https://google.github.io/styleguide/shell.xml
syntax on " set syntax highlight turned on;
set tabstop=4 " set tabstop to tell vim how many columns a tab counts for. Linux kernel code expects each tab to be 8 columns wide. Visual studio expects each tab to be four columns wide. This is the only command here that will affect how existing text displays;
set expandtab " convertt tabs to spaces;
set shiftwidth=2 " indent is 2 spaces;
set softtabstop=2 " untab size of, instead single space;
set autoindent " always set autoindenting on;
" extras:
set cindent " stricter for C programs, it is already on! see: /usr/share/vim/vim<version>/evim.vim
@slayerlab
Copy link
Author

I really hate 8 columns wide! :rage4:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment