Customization settings for Ubuntu
To Simplify kubectl Usage and YAML Editing
Go to your home directory and open .bashrc :
Add these lines to the .bashrc file:
# kubectl
alias k='kubectl'
source /etc/bash_completion
source <(kubectl completion bash)
complete -o default -F __start_kubectl k
reload .bashrc:
source ~/.bashrc
test whether it works:
k version
Open .vimrc :
Add these lines to .vimrc :
" Ensure Vim uses filetype plugins
filetype plugin on
" Enable indentation
filetype indent on
" Set the default indentation to 2 spaces for all files
set tabstop=2
set softtabstop=2
set shiftwidth=2
set expandtab
" Hightlight trailing whitespace in all files
highlight ExtraWhitespace ctermbg=red guibg=red
autocmd BufEnter * match ExtraWhitespace /\s\+$/
" Enable auto indentation
set autoindent
" Turn on syntax highlighting
syntax on
" Set backspace so it acts more intuitively
set backspace=indent,eol,start