|
set nocompatible |
|
|
|
filetype plugin indent on |
|
|
|
syntax enable |
|
|
|
set list |
|
set listchars= |
|
|
|
augroup indentation |
|
autocmd! |
|
autocmd FileType * set ts=4 sw=4 sts=4 expandtab listchars=tab:▸·,trail:·,extends:▸ nowrap |
|
autocmd FileType go set ts=4 sw=4 sts=4 noexpandtab listchars=tab:\ \ ,trail:· |
|
autocmd FileType puppet set ts=2 sw=2 sts=2 |
|
autocmd FileType ruby set ts=2 sw=2 sts=2 |
|
autocmd FileType yaml set ts=2 sw=2 sts=2 |
|
augroup END |
|
|
|
if has('statusline') |
|
" http://winterdom.com/2007/06/vimstatusline |
|
set ls=2 " Always show status line |
|
" Status line detail: |
|
" %f file path |
|
" %y file type between braces (if defined) |
|
" %([%R%M]%) read-only, modified and modifiable flags between braces |
|
" %{'!'[&ff=='default_file_format']} |
|
" shows a '!' if the file format is not the platform |
|
" default |
|
" %{'$'[!&list]} shows a '*' if in list mode |
|
" %{'~'[&pm=='']} shows a '~' if in patchmode |
|
" (%{synIDattr(synID(line('.'),col('.'),0),'name')}) |
|
" only for debug : display the current syntax item name |
|
" %= right-align following items |
|
" #%n buffer number |
|
" %l/%L,%c%V line number, total number of lines, and column number |
|
function SetStatusLineStyle() |
|
if &stl == '' || &stl =~ 'synID' |
|
let &stl="%f %y%([%R%M]%)%{'!'[&ff=='".&ff."']}%{'$'[!&list]}%{'~'[&pm=='']}%=Buffer: %n Line: %l/%L Column: %c%V " |
|
else |
|
let &stl="%f %y%([%R%M]%)%{'!'[&ff=='".&ff."']}%{'$'[!&list]} (%{synIDattr(synID(line('.'),col('.'),0),'name')})%=Buffer: %n Line: %l/%L Column: %c%V " |
|
endif |
|
endfunc |
|
" Switch between the normal and vim-debug modes in the status line |
|
" nnoremap _ds :call SetStatusLineStyle()<CR> |
|
call SetStatusLineStyle() |
|
" " Window title |
|
" if has('title') |
|
" set titlestring=%t%(\ [%R%M]%) |
|
" endif |
|
endif |
|
|
|
set statusline+=%{ALEGetStatusLine()} |
|
let g:ale_lint_on_enter = 1 |
|
let g:ale_lint_on_save = 1 |
|
let g:ale_lint_on_text_changed = 1 |
|
let g:ale_sign_column_always = 1 |
|
let g:ale_lint_delay = 750 |
|
nmap <silent> <C-k> <Plug>(ale_previous_wrap) |
|
nmap <silent> <C-j> <Plug>(ale_next_wrap) |