From 34dba2da21d632a21533e542a79ed8c7ee4664d2 Mon Sep 17 00:00:00 2001 From: Josh Sherman Date: Mon, 24 Jun 2024 10:40:12 -0500 Subject: [PATCH] Expand the short hand, do some additional clean up Also added a line to always show the status line, similar to the one thing I liked about NeoVim --- vim/.vimrc | 36 ++++++++++++++++++++++++------------ 1 file changed, 24 insertions(+), 12 deletions(-) diff --git a/vim/.vimrc b/vim/.vimrc index 3775551..b6c2758 100644 --- a/vim/.vimrc +++ b/vim/.vimrc @@ -4,6 +4,7 @@ if empty(glob('~/.vim/autoload/plug.vim')) \ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim endif +" A humble list of plugins call plug#begin() " Solarized, without the bullshit Plug 'romainl/flattened' @@ -23,26 +24,37 @@ call plug#begin() Plug 'ruanyl/vim-gh-line' call plug#end() +" Color scheme and syntax highlighting syntax on color flattened_dark set background=dark - " Ensures misspellings are highlighted -hi SpellBad ctermfg=white ctermbg=red - -set ai et si sts=2 sw=2 ts=2 -set cc=80,100,120 -set hid -set hls ic is -set nu rnu +highlight SpellBad ctermfg=white ctermbg=red +" Global settings +set autoindent +set colorcolumn=80,100,120 +set expandtab +set hidden +set hlsearch +set ignorecase +set incsearch +set laststatus=2 +set number +set relativenumber +set shiftwidth=2 +set smartindent +set softtabstop=2 +set tabstop=2 set undofile -autocmd FileType php,python setl sts=4 sw=4 ts=4 -autocmd FileType gitcommit,markdown,text setl nosi spell -autocmd FileType gitcommit setl cc=50,72 tw=72 -autocmd FileType markdown,text setl tw=80 wm=2 +" Filetype-specific settings +autocmd FileType gitcommit setl colorcolumn=50,72 textwidth=72 +autocmd FileType gitcommit,markdown,text setl nosmartindent spell +autocmd FileType markdown,text setl textwidth=80 wrapmargin=2 +autocmd FileType php,python setl shiftwidth=4 softtabstop=4 tabstop=4 +" Strip trailing whitespace on save autocmd BufWritePre * :%s/\s\+$//e " Set the runtime path for fzf based on OS