X-Git-Url: https://code.kerkeslager.com/?a=blobdiff_plain;f=.vimrc;h=8bb879a93276b50ece07fa51455ef327015a37f0;hb=7c78de6d1cfc0d063efca512f04425599cc2198f;hp=10703a99615406bdb19c741c3657cc81a6071ce5;hpb=1c26f72621f29acadda8dce267e8111dc4cbd5f1;p=dotfiles diff --git a/.vimrc b/.vimrc index 10703a9..8bb879a 100644 --- a/.vimrc +++ b/.vimrc @@ -1,12 +1,19 @@ " Don't imitate vi. set nocompatible +" Make tab-completion work more like bash. +set wildmenu +set wildmode=list:full + " Ignore certain file extensions when tab-completing. -set wildignore=*.swp,*.bak,*.pyc,*.class,*.o +set wildignore=*.swp,*.bak,*.pyc,*.class,*.o,*.exe -" set filetype stuff to on +" Set filetype stuff to on. filetype on filetype plugin on + +" Set up autoindentation. +set smartindent filetype indent on " Example filetype-specific setting: @@ -14,6 +21,11 @@ filetype indent on " autocmd filetype python set expandtab " endif +" Allow folding. +set foldenable +set foldmethod=syntax +set foldlevelstart=99 + " Show line numbers. set number set numberwidth=4 @@ -21,9 +33,8 @@ set numberwidth=4 " Scroll five lines ahead of cursor. set scrolloff=5 -" Set up autoindentation. -set smartindent -filetype indent on +" Turn off error bells and visual bell +set noeb vb t_vb= " Set tabs to width 4. set softtabstop=4 @@ -31,10 +42,10 @@ set tabstop=4 set shiftwidth=4 set expandtab -" Allow backspacing over everything in insert mode +" Allow backspacing over everything in insert mode. set backspace=indent,eol,start -"Highlight bad spacing +"Highlight bad spacing. highlight BadSpacing term=standout ctermbg=cyan augroup Spacing autocmd! @@ -44,9 +55,6 @@ augroup Spacing autocmd FileType help,make match BadSpacing / *$/ augroup END -" Highlight search terms. -set hlsearch - " Search as you type. set incsearch @@ -61,7 +69,7 @@ set splitbelow splitright " Line wrapping off set nowrap -" Enlarge history and undo/redo buffers +" Enlarge history and undo/redo buffers. set history=1000 set undolevels=1000 @@ -89,4 +97,5 @@ noremap! noremap "" noremap! - +" Automatically reload the .vimrc when changes are made to it +au! BufWritePost .vimrc source %