Skip to content

Commit

Permalink
Allow to override incsearch, #603
Browse files Browse the repository at this point in the history
  • Loading branch information
sheerun committed Oct 24, 2020
1 parent b6654c8 commit f52f6b9
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 13 deletions.
15 changes: 15 additions & 0 deletions ftdetect/polyglot.vim
Original file line number Diff line number Diff line change
Expand Up @@ -3491,6 +3491,21 @@ if exists("did_load_filetypes") && exists("g:polyglot_disabled")
runtime! extras/filetype.vim
endif


if !has_key(s:disabled_packages, 'sensible')
" Reload unchanged files automatically.
set autoread

" Enable highlighted case-insensitive incremential search.
set incsearch

" Use utf-8 encoding by default
set encoding=utf-8

" Autoindent when starting new line, or using `o` or `O`.
set autoindent
endif

" Restore 'cpoptions'
let &cpo = s:cpo_save
unlet s:cpo_save
16 changes: 3 additions & 13 deletions plugin/polyglot.vim
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,10 @@ endif
"
" Only settings that matter for proper editing are left
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'sensible') == -1
" Autoindent when starting new line, or using `o` or `O`.
set autoindent

" Allow backspace in insert mode.
set backspace=indent,eol,start
if &backspace == ""
set backspace=indent,eol,start
endif

" Allow for mappings including `Esc`, while preserving
" zero timeout after pressing it manually.
Expand All @@ -32,12 +31,6 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'sensible') == -
set ttimeoutlen=100
endif

" Enable highlighted case-insensitive incremential search.
set incsearch

" Use utf-8 encoding by default
set encoding=utf-8

" Set default whitespace characters when using `:set list`
if &listchars ==# 'eol:$'
set listchars=tab:>\ ,trail:-,extends:>,precedes:<,nbsp:+
Expand All @@ -59,9 +52,6 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'sensible') == -
set shell=/usr/bin/env\ bash
endif

" Reload unchanged files automatically.
set autoread

" Increase history size to 1000 items.
if &history < 1000
set history=1000
Expand Down

0 comments on commit f52f6b9

Please sign in to comment.