16 Commits
v1.1 ... v1.2

Author SHA1 Message Date
Tim Pope
2d60332fa5 sensible.vim 1.2
* Enable upwards tags file searching with `./tags;` in 'tags'.
* Enable joining commented lines with `formatoptions` j flag.
* Remove 'showcmd', 'shiftround', and 'fileformat' changes.
* Allow fish as 'shell' for compatible Vim versions.
* Don't override user specified 'ttimeoutlen'.
* Don't force `t_Co` to 16 for Eterm.
* Add :diffupdate to CTRL-L map.
2018-01-22 00:47:03 -05:00
blurrcat
49ee364222 Fix if statement 2017-05-09 23:02:50 -04:00
Tim Pope
d205637361 Don't override ttimeoutlen 2017-05-09 17:59:24 -04:00
Tim Pope
b6033cb4d4 Work around deficiencies in nvim 2017-05-09 17:39:17 -04:00
Paulo Köch
e57222db3b Document 'autoread' in feature list (#136) 2017-04-02 00:20:42 -04:00
James McCoy
4b75359218 Preserve fish as 'shell' for Vim 7.4.276 or later (#128)
As of 7.4.276, Vim understands how to run commands in subshells when
'shell' is fish.  This fixes the most common problems with running
external commands from Vim.

Plugins may still need to accommodate for fish, but fixing the cognitive
dissonance of having the user's shell changed outweighs the benefit to
lazy plugin writers.
2016-09-05 21:40:29 -04:00
Tim Pope
9e91be7e0f Revert "Set lazyredraw"
This reverts commit 2fb074e841.
2016-03-18 14:25:42 -04:00
Brice Burgess
2fb074e841 Set lazyredraw 2016-02-09 13:47:33 -05:00
Andrew Schwartzmeyer
680a5c6932 Remove set showcmd
Closes https://github.com/tpope/vim-sensible/issues/49.
2015-12-26 13:47:14 -05:00
netei
8c4429c70c Remove set fileformats+=mac 2015-12-11 15:19:26 -05:00
Markus Teich
26f8783e08 Fix bug in C-L mapping
The <C-R> should be <C-R>=, otherwise an error occurs when pressing C-L:
E492: Not an editor command: nohlsearchas('diff')?'|diffupdate':''
2015-09-24 18:50:46 -04:00
Tim Pope
027b2390e1 Exempt Eterm from t_Co=16
Closes https://github.com/tpope/vim-sensible/issues/101.
2015-09-23 13:58:01 -04:00
Tim Pope
d0beb8ab42 Prevent duplicate entry in 'tags'
Closes #94.
2015-04-04 13:14:25 -04:00
Janko Marohnić
b30dcf387a Delete comment char when joining commented lines 2014-11-24 11:57:12 -05:00
Tim Pope
64aa12b07b Search upwards for tags file 2014-07-07 00:15:06 -04:00
Josh Triplett
d002540b6c Stop enabling shiftround; it breaks indent/outdent
The shiftround setting breaks many common cases of multi-line indent and
outdent for continuation lines. For example, suppose I have the
following code, in a buffer with 8-space indentation:

foo(x,
    y)

With the default settings, I can > those two lines, and end up with this:

        foo(x,
            y);

But with shiftround, I instead end up with:

        foo(x,
        y);

Thus, revert to the vim default of noshiftround.
2014-06-23 22:40:34 -04:00
2 changed files with 18 additions and 10 deletions

View File

@@ -31,6 +31,7 @@ mostly `:set` calls.) Here's a taste:
* `'incsearch'`: Start searching before pressing enter.
* `'listchars'`: Makes `:set list` (visible whitespace) prettier.
* `'scrolloff'`: Always show at least one line above/below the cursor.
* `'autoread'`: Autoload file changes. You can undo by pressing `u`.
* `runtime! macros/matchit.vim`: Load the version of matchit.vim that ships
with Vim.

View File

@@ -1,11 +1,11 @@
" sensible.vim - Defaults everyone can agree on
" Maintainer: Tim Pope <http://tpo.pe/>
" Version: 1.1
" Version: 1.2
if exists('g:loaded_sensible') || &compatible
finish
else
let g:loaded_sensible = 1
let g:loaded_sensible = 'yes'
endif
if has('autocmd')
@@ -23,20 +23,20 @@ set complete-=i
set smarttab
set nrformats-=octal
set shiftround
set ttimeout
set ttimeoutlen=100
if !has('nvim') && &ttimeoutlen == -1
set ttimeout
set ttimeoutlen=100
endif
set incsearch
" Use <C-L> to clear the highlighting of :set hlsearch.
if maparg('<C-L>', 'n') ==# ''
nnoremap <silent> <C-L> :nohlsearch<CR><C-L>
nnoremap <silent> <C-L> :nohlsearch<C-R>=has('diff')?'<Bar>diffupdate':''<CR><CR><C-L>
endif
set laststatus=2
set ruler
set showcmd
set wildmenu
if !&scrolloff
@@ -55,12 +55,19 @@ if &listchars ==# 'eol:$'
set listchars=tab:>\ ,trail:-,extends:>,precedes:<,nbsp:+
endif
if &shell =~# 'fish$'
if v:version > 703 || v:version == 703 && has("patch541")
set formatoptions+=j " Delete comment character when joining commented lines
endif
if has('path_extra')
setglobal tags-=./tags tags-=./tags; tags^=./tags;
endif
if &shell =~# 'fish$' && (v:version < 704 || v:version == 704 && !has('patch276'))
set shell=/bin/bash
endif
set autoread
set fileformats+=mac
if &history < 1000
set history=1000
@@ -74,7 +81,7 @@ endif
set sessionoptions-=options
" Allow color schemes to do bright colors without forcing bold.
if &t_Co == 8 && $TERM !~# '^linux'
if &t_Co == 8 && $TERM !~# '^linux\|^Eterm'
set t_Co=16
endif