MIAOU-BASH is a collection of settings and helpers for leveraging BASH. Developer-friendly, it may be used as solo package with or without the miaou project.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

40 lines
1.2 KiB

" Smart Defaults
set showcmd " Show (partial) command in status line.
set showmatch " Show matching brackets.
set ignorecase " Do case insensitive matching
set smartcase " Do smart case matching
set incsearch " Incremental search
set autowrite " Automatically save before commands like :next and :make
set hidden " Hide buffers when they are abandoned
set shiftwidth=2
set tabstop=2
set expandtab
set number
set relativenumber
filetype plugin indent on
" Show Status
set laststatus=2
highlight StatusLine ctermfg=DarkGrey
" Wild Menu
set wildmenu
set wildmode=list:longest
set wildignore=*.jpg,*.png,*.gif,*.pdf
" Show Cursor
set cursorline
highlight clear CursorLine
highlight link CursorLine CursorColumn
highlight CursorLineNR cterm=italic
" Toggle line/relative numbers
nnoremap <F2> :set number!<CR>
nnoremap <F3> :set relativenumber!<CR>
highlight LineNr ctermfg=DarkGrey
" Sudo Write
command! W silent execute 'write !sudo tee ' . shellescape(@%, 1) . ' >/dev/null'
" Jump to Last Position
au BufReadPost * if line("'\"") > 1 && line("'\"") <= line("$") | exe "normal! g'\"" | endif