Detect features before using them
This commit is contained in:
parent
d56ade40b5
commit
e16ef6da19
1 changed files with 29 additions and 19 deletions
48
vimrc
48
vimrc
|
@ -5,7 +5,7 @@
|
||||||
" Includes parts from Tim Pope's «sensible.vim»
|
" Includes parts from Tim Pope's «sensible.vim»
|
||||||
" <https://github.com/tpope/vim-sensible>.
|
" <https://github.com/tpope/vim-sensible>.
|
||||||
|
|
||||||
if version < 800 && has("eval")
|
if !has("packages") && has("eval")
|
||||||
runtime pack/acp/opt/vim-pathogen/autoload/pathogen.vim
|
runtime pack/acp/opt/vim-pathogen/autoload/pathogen.vim
|
||||||
execute pathogen#infect('pack/acp/start/{}')
|
execute pathogen#infect('pack/acp/start/{}')
|
||||||
endif
|
endif
|
||||||
|
@ -14,10 +14,10 @@ inoremap <down> <nop>
|
||||||
inoremap <left> <nop>
|
inoremap <left> <nop>
|
||||||
inoremap <right> <nop>
|
inoremap <right> <nop>
|
||||||
inoremap <up> <nop>
|
inoremap <up> <nop>
|
||||||
nmap <silent> <A-Down> :wincmd j<CR>
|
nmap <silent> <A-Down> :wincmd j<CR>
|
||||||
nmap <silent> <A-Left> :wincmd h<CR>
|
nmap <silent> <A-Left> :wincmd h<CR>
|
||||||
nmap <silent> <A-Right> :wincmd l<CR>
|
nmap <silent> <A-Right> :wincmd l<CR>
|
||||||
nmap <silent> <A-Up> :wincmd k<CR>
|
nmap <silent> <A-Up> :wincmd k<CR>
|
||||||
nnoremap <down> <nop>
|
nnoremap <down> <nop>
|
||||||
nnoremap <left> <nop>
|
nnoremap <left> <nop>
|
||||||
nnoremap <right> <nop>
|
nnoremap <right> <nop>
|
||||||
|
@ -34,9 +34,6 @@ set directory=$TEMP//,/tmp//,.
|
||||||
set display+=lastline
|
set display+=lastline
|
||||||
set encoding=utf-8
|
set encoding=utf-8
|
||||||
set expandtab
|
set expandtab
|
||||||
set guioptions+=c
|
|
||||||
set guioptions-=m
|
|
||||||
set guioptions-=T
|
|
||||||
set history=1000
|
set history=1000
|
||||||
set ignorecase
|
set ignorecase
|
||||||
set incsearch
|
set incsearch
|
||||||
|
@ -67,7 +64,6 @@ set wildmenu
|
||||||
set wrap
|
set wrap
|
||||||
|
|
||||||
if has("eval")
|
if has("eval")
|
||||||
autocmd BufRead,BufNewFile *.md set filetype=markdown
|
|
||||||
colorscheme jellybeans
|
colorscheme jellybeans
|
||||||
command Q q
|
command Q q
|
||||||
command W w
|
command W w
|
||||||
|
@ -83,17 +79,35 @@ if has("eval")
|
||||||
let g:netrw_sort_sequence='[\/]$,*'
|
let g:netrw_sort_sequence='[\/]$,*'
|
||||||
let g:netrw_winsize=-28
|
let g:netrw_winsize=-28
|
||||||
let g:riv_fold_auto_update=0
|
let g:riv_fold_auto_update=0
|
||||||
syntax on
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if &t_Co == 8 && $TERM !~# '^linux\|^Eterm'
|
if &t_Co == 8 && $TERM !~# '^linux\|^Eterm'
|
||||||
set t_Co=16
|
set t_Co=16
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
if has("autocmd")
|
||||||
|
autocmd BufRead,BufNewFile *.md set filetype=markdown
|
||||||
|
endif
|
||||||
|
|
||||||
if has("folding")
|
if has("folding")
|
||||||
set nofoldenable
|
set nofoldenable
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
if has("gui_running")
|
||||||
|
if has("gui_gtk2")
|
||||||
|
set guifont=Monospace\ Regular\ 10
|
||||||
|
set clipboard=unnamedplus
|
||||||
|
elseif has("gui_win32")
|
||||||
|
set guifont=Consolas:h10:cANSI
|
||||||
|
set clipboard=unnamed
|
||||||
|
endif
|
||||||
|
set columns=88
|
||||||
|
set guioptions+=c
|
||||||
|
set guioptions-=m
|
||||||
|
set guioptions-=T
|
||||||
|
set lines=40
|
||||||
|
endif
|
||||||
|
|
||||||
if has("lua")
|
if has("lua")
|
||||||
let g:neocomplete#enable_at_startup=1
|
let g:neocomplete#enable_at_startup=1
|
||||||
endif
|
endif
|
||||||
|
@ -108,16 +122,12 @@ else
|
||||||
set listchars=eol:¶,tab:→ ,trail:~,extends:>,precedes:<
|
set listchars=eol:¶,tab:→ ,trail:~,extends:>,precedes:<
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if has("gui_running")
|
if has("smartindent")
|
||||||
if has("gui_gtk2")
|
set smartindent
|
||||||
set guifont=Monospace\ Regular\ 10
|
endif
|
||||||
set clipboard=unnamedplus
|
|
||||||
elseif has("gui_win32")
|
if has("syntax")
|
||||||
set guifont=Consolas:h10:cANSI
|
syntax on
|
||||||
set clipboard=unnamed
|
|
||||||
endif
|
|
||||||
set columns=88
|
|
||||||
set lines=40
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
" vim:set ft=vim et sw=4:
|
" vim:set ft=vim et sw=4:
|
||||||
|
|
Loading…
Reference in a new issue