Vim and neovim settings aren't compatible

7a135739cb79b1f9abc4e8c78c3b97be2161cac7
Alexis Sellier committed ago 1 parent ca4e1b97
.vimrc +16 -11
21 21
set hidden
22 22
set modeline
23 23
set hlsearch
24 24
set incsearch
25 25
set autoread                        " Auto-reload modified files (with no local changes)
26 -
set nocompatible                    " Don't try to be compatible with vi
27 26
set ignorecase                      " Ignore case in search
28 27
set smartcase                       " Override ignorecase if uppercase is used in search string
29 28
set report=0                        " Report all changes
30 29
set laststatus=2                    " Always show status-line
31 30
set nocursorline                    " Highlight current line
46 45
set cmdheight=1
47 46
set matchtime=2                     " Shorter brace match time
48 47
set textwidth=80
49 48
set virtualedit=block
50 49
50 +
if !has("nvim")
51 +
  set nocompatible                  " Don't try to be compatible with vi
52 +
endif
53 +
51 54
let mapleader = ","
52 55
let g:goyo_margin_top = 0
53 56
let g:goyo_margin_bottom = 0
54 57
let g:goyo_width = 120
55 58
let g:gitgutter_sign_column_always = 1
56 59
let $NVIM_TUI_ENABLE_CURSOR_SHAPE=1
57 60
58 61
" Deoplete (autocomplete)
59 -
let g:deoplete#enable_at_startup = 1
60 -
let g:deoplete#disable_auto_complete = 1
61 -
inoremap <silent><expr> <TAB>
62 -
  \ pumvisible() ? "\<C-n>" :
63 -
  \ <SID>check_back_space() ? "\<TAB>" :
64 -
  \ deoplete#mappings#manual_complete()
65 -
function! s:check_back_space()
66 -
  let col = col('.') - 1
67 -
  return !col || getline('.')[col - 1]  =~ '\s'
68 -
endfunction
62 +
if has("nvim")
63 +
  let g:deoplete#enable_at_startup = 1
64 +
  let g:deoplete#disable_auto_complete = 1
65 +
  inoremap <silent><expr> <TAB>
66 +
    \ pumvisible() ? "\<C-n>" :
67 +
    \ <SID>check_back_space() ? "\<TAB>" :
68 +
    \ deoplete#mappings#manual_complete()
69 +
  function! s:check_back_space()
70 +
    let col = col('.') - 1
71 +
    return !col || getline('.')[col - 1]  =~ '\s'
72 +
  endfunction
73 +
endif
69 74
70 75
" Per file-type indentation
71 76
au FileType haskell     set sts=4 sw=4 expandtab
72 77
au FileType javascript  set sts=4 sw=4 expandtab
73 78
au FileType go          set ts=4  sw=4 noexpandtab