A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/sheerun/vim-polyglot/commit/4b54ae9cd98b658a828e10241ffca1015316639e below:

Move setting default tabstop to sensible part · sheerun/vim-polyglot@4b54ae9 · GitHub

File tree Expand file treeCollapse file tree 1 file changed

+20

-18

lines changed

Filter options

Expand file treeCollapse file tree 1 file changed

+20

-18

lines changed Original file line number Diff line number Diff line change

@@ -2670,18 +2670,34 @@ au FileType * au! polyglot-observer

2670 2670

augroup END

2671 2671 2672 2672 2673 -

if !has_key(g:polyglot_is_disabled, 'autoindent')

2674 -

" Code below re-implements sleuth for vim-polyglot

2675 -

let g:loaded_sleuth = 1

2676 - 2673 +

if !has_key(g:polyglot_is_disabled, 'sensible')

2674 +

" Use 2-spaces tab indentation by default

2677 2675

if &tabstop == 8

2678 2676

let &tabstop = 2

2679 2677

endif

2680 2678 2679 +

" Set shiftwidth to proper value as users often mix it with tabstop

2681 2680

if &shiftwidth > &tabstop

2682 2681

let &shiftwidth = &tabstop

2683 2682

endif

2684 2683 2684 +

" Use utf-8 encoding by default

2685 +

set encoding=utf-8

2686 + 2687 +

" Reload unchanged files automatically.

2688 +

set autoread

2689 + 2690 +

" Disable swap, it doesn't play well with autoread

2691 +

set noswapfile

2692 + 2693 +

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

2694 +

set autoindent

2695 +

endif

2696 + 2697 +

if !has_key(g:polyglot_is_disabled, 'autoindent')

2698 +

" Code below re-implements sleuth for vim-polyglot

2699 +

let g:loaded_sleuth = 1

2700 + 2685 2701

let s:default_shiftwidth = &shiftwidth

2686 2702 2687 2703

func! s:get_shiftwidth(indents) abort

@@ -3559,20 +3575,6 @@ endfunc

3559 3575

" We want vim-polyglot files to load only as fallback

3560 3576

let &rtp = join(s:process_rtp(split(&rtp, ',')), ',')

3561 3577 3562 -

if !has_key(g:polyglot_is_disabled, 'sensible')

3563 -

" Use utf-8 encoding by default

3564 -

set encoding=utf-8

3565 - 3566 -

" Reload unchanged files automatically.

3567 -

set autoread

3568 - 3569 -

" Disable swap, it doesn't play well with autoread

3570 -

set noswapfile

3571 - 3572 -

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

3573 -

set autoindent

3574 -

endif

3575 - 3576 3578

" Restore 'cpoptions'

3577 3579

let &cpo = s:cpo_save

3578 3580

unlet s:cpo_save

You can’t perform that action at this time.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4