Friday, September 9, 2016

Set locale environment variable and Vim options

$ more /etc/sysconfig/i18n 
For Kali Linux:
echo "export LANG=\"en_US.UTF8\"" >> .bashrc 
Note: .bashrc will be read everytime upon opening a new terminal. 

Vim Options:
[simrat@webserver ~]$ cat .exrc 
set hlsearch
set expandtab
set shiftwidth=4
set softtabstop=4
set nu

set cinoptions+=:0
set cinoptions+=l1

if version >= 703
    set colorcolumn=80
    highlight colorcolumn ctermbg=darkgray

if has ("autocmd")
    filetype plugin indent on
    au BufReadPost * if line("'\"") > 1 && line("'\"") <= line("$") | exe "normal! g'\"" | endif
"    autocmd BufRead *.file set tw=120
"    autocmd BufRead *.prvc set nobackup nowritebackup foldmethod=indent fdo=insert

:!./%5 :w
:!./%  :w