Cleanup dotfiles
This commit is contained in:
71
dot_config/vim/dot_vimrc
Normal file
71
dot_config/vim/dot_vimrc
Normal file
@ -0,0 +1,71 @@
|
||||
" Minimal .vimrc for production servers
|
||||
|
||||
" Basic settings
|
||||
set nocompatible " Use Vim defaults
|
||||
syntax on " Enable syntax highlighting
|
||||
set background=light " Use light background
|
||||
|
||||
" Disable all fancy colors, keep it simple
|
||||
highlight clear
|
||||
|
||||
" Basic black and white scheme with minimal highlighting
|
||||
highlight Normal cterm=NONE ctermfg=black ctermbg=NONE
|
||||
highlight Comment cterm=NONE ctermfg=darkgray ctermbg=NONE
|
||||
highlight Constant cterm=NONE ctermfg=darkblue ctermbg=NONE
|
||||
highlight Special cterm=NONE ctermfg=darkblue ctermbg=NONE
|
||||
highlight Identifier cterm=NONE ctermfg=black ctermbg=NONE
|
||||
highlight Statement cterm=bold ctermfg=black ctermbg=NONE
|
||||
highlight PreProc cterm=NONE ctermfg=darkblue ctermbg=NONE
|
||||
highlight Type cterm=bold ctermfg=black ctermbg=NONE
|
||||
highlight Underlined cterm=underline ctermfg=black ctermbg=NONE
|
||||
highlight Todo cterm=bold ctermfg=black ctermbg=yellow
|
||||
highlight Error cterm=bold ctermfg=white ctermbg=red
|
||||
highlight Search cterm=NONE ctermfg=black ctermbg=yellow
|
||||
|
||||
" UI elements
|
||||
highlight LineNr cterm=NONE ctermfg=darkgray ctermbg=NONE
|
||||
highlight StatusLine cterm=bold ctermfg=white ctermbg=darkgray
|
||||
highlight StatusLineNC cterm=NONE ctermfg=black ctermbg=lightgray
|
||||
highlight VertSplit cterm=NONE ctermfg=darkgray ctermbg=NONE
|
||||
highlight Visual cterm=NONE ctermfg=black ctermbg=lightgray
|
||||
|
||||
" Practical settings for server work
|
||||
set number " Show line numbers
|
||||
set ruler " Show cursor position
|
||||
set laststatus=2 " Always show status line
|
||||
set showcmd " Show partial commands
|
||||
set showmatch " Show matching brackets
|
||||
set incsearch " Incremental search
|
||||
set hlsearch " Highlight search results
|
||||
set ignorecase " Case-insensitive search
|
||||
set smartcase " Unless search contains uppercase
|
||||
set autoindent " Auto-indent new lines
|
||||
set smartindent " Smart auto-indenting
|
||||
set tabstop=4 " Tab width is 4 spaces
|
||||
set shiftwidth=4 " Indent also with 4 spaces
|
||||
set expandtab " Expand tabs to spaces
|
||||
set nowrap " Don't wrap lines
|
||||
set backspace=indent,eol,start " Backspace through everything
|
||||
set wildmenu " Command-line completion
|
||||
set wildmode=list:longest " Complete until longest common string
|
||||
set history=50 " Keep 50 lines of command history
|
||||
set viminfo='20,\"50 " Remember 50 lines of registers
|
||||
set nobackup " No backup files
|
||||
set noswapfile " No swap files
|
||||
|
||||
" Highlight trailing whitespace
|
||||
highlight ExtraWhitespace ctermbg=red
|
||||
match ExtraWhitespace /\s\+$/
|
||||
|
||||
" Indicate insert/normal mode in the status line
|
||||
set showmode
|
||||
|
||||
" For production servers - highlight the hostname in red if it contains 'live'
|
||||
let hostname = substitute(system('hostname'), '\n', '', '')
|
||||
if hostname =~ 'live'
|
||||
highlight User1 cterm=bold ctermfg=white ctermbg=red
|
||||
set statusline=%1*[PRODUCTION]%*\ %f\ %h%w%m%r\ %=%(%l,%c%V\ %=\ %P%)
|
||||
else
|
||||
set statusline=%f\ %h%w%m%r\ %=%(%l,%c%V\ %=\ %P%)
|
||||
endif
|
||||
|
||||
Reference in New Issue
Block a user