Remove vim-sensible

vim-sensible includes and old matchit.vim which interfears with
vim-matchup and sets some defaults which are then overridden in
plugins/settings.vim. Remove vim-sensible and document the retained
settings.
This commit is contained in:
Kenneth Benzie 2018-01-16 15:57:08 +00:00
parent 0416a42e08
commit bc014309ef
2 changed files with 58 additions and 5 deletions

View File

@ -1,5 +1,47 @@
" TODO: Move these settings to vimrc when after switching to vim8 packages
scriptencoding 'utf-8'
" Copy indent from current line
set autoindent
" Make <BS> work in a sane way
set backspace=indent,eol,start
" Insert blank same in front of line according to 'shiftwidth'.
set smarttab
if !has('nvim') && &ttimeoutlen == -1
" Time in miliseconds to wait for a key core or mapping
set ttimeout
set ttimeoutlen=100
endif
" TODO: These might be irrelevant with vim-airline
" Show 2 line status
set laststatus=2
" Show the line and colum number of a cursor position
set ruler
" Enhanced command line completion
set wildmenu
" Command line history
if &history < 1000
set history=1000
endif
" Display as much as possible of the last line
set display+=lastline
if &listchars ==# 'eol:$'
" TODO: Review this
set listchars=tab:>\ ,trail:-,extends:>,precedes:<,nbsp:+
endif
if v:version > 703 || v:version == 703 && has("patch541")
" Delete comment character when joining commented lines
set formatoptions+=j
endif
" Enable visually highlighting listchars
set list
" Non breaking space:
@ -55,6 +97,7 @@ endif
" Keep cursor from buffer edges
set scrolloff=8
set sidescrolloff=5
" Turn backup off
set nobackup noswapfile
@ -69,8 +112,7 @@ set fileformats=unix,mac,dos
set isfname-=:
" Highlight search matches & show search matches while typing
set hlsearch
set hlsearch incsearch
" Set ignore search case unless mixed
set ignorecase smartcase
@ -96,7 +138,8 @@ if has('folding')
set foldmethod=syntax foldlevel=20
endif
" Automatically write changes to files
" Automatically read/write changes to files
set autoread
set autowrite
" Don't add 2 spaces after end of sentence
@ -116,6 +159,11 @@ set modeline
" Don't redraw during execution macros, registers, commands, etc.
set lazyredraw
" Allow color schemes to do bright colors without forcing bold
if &t_Co == 8 && $TERM !~# '^linux\|^Eterm'
set t_Co=16
endif
" Change cursor dependant on current mode
if has('cursorshape') && has('unix') && !has('gui_running')
if $TMUX ==# '' && $ITERM_PROFILE !=# ''

9
vimrc
View File

@ -4,6 +4,13 @@ scriptencoding 'utf-8'
" Set leader to space
let g:mapleader = ' '
if has('autocmd')
filetype plugin indent on
endif
if has('syntax') && !exists('g:syntax_on')
syntax enable
endif
" Plugins
call plug#begin('~/.vim/bundle')
@ -104,8 +111,6 @@ Plug 'tpope/vim-vinegar'
Plug 'tpope/vim-abolish'
" vim-unimpaired - for pairs of tasks
Plug 'tpope/vim-unimpaired'
" vim-sensible - sane default settings
Plug 'tpope/vim-sensible'
" vim-speeddating - sane date manipulation
Plug 'tpope/vim-speeddating'
" vim-endwise - wisely add end{if,function}, fork with cmake support