Merge commit '6f72e87' into jenipapo

This commit is contained in:
Thomas Ruoff
2016-08-30 09:59:02 +02:00

46
vimrc
View File

@@ -38,7 +38,7 @@ Plug 'rhysd/conflict-marker.vim'
Plug 'airblade/vim-gitgutter'
Plug 'inside/vim-search-pulse'
Plug 'rking/ag.vim'
Plug 'mileszs/ack.vim'
Plug 'BufOnly.vim'
@@ -48,8 +48,7 @@ Plug 'chriskempson/base16-vim'
Plug 'pangloss/vim-javascript', { 'for': 'javascript' }
Plug 'marijnh/tern_for_vim', { 'do': 'npm install', 'for': 'javascript' }
Plug 'mtscout6/syntastic-local-eslint.vim', { 'for': 'javascript' }
Plug 'mxw/vim-jsx', { 'for': 'javascript.jsx' }
Plug 'mxw/vim-jsx', { 'for': 'javascript' }
Plug 'suan/vim-instant-markdown', { 'for': 'markdown' }
Plug 'xuhdev/vim-latex-live-preview', { 'for': 'tex' }
@@ -171,6 +170,9 @@ nnoremap <leader><space> :noh<cr>
nnoremap j gj
nnoremap k gk
"" open last buffer
nnoremap <BS> <C-^>
" Easier split navigation
" Use ctrl-[hjkl] to select the active split!
@@ -235,6 +237,11 @@ vnoremap <silent> <Leader>0 :!node<cr>
nnoremap + <c-a>
nnoremap - <c-x>
" debugging, use leader-DD to start, do a slow action, then leader-DQ to
" finish. Your output will be in profile.log
nnoremap <silent> <leader>DD :exe ":profile start profile.log"<cr>:exe ":profile func *"<cr>:exe ":profile file *"<cr>
nnoremap <silent> <leader>DQ :exe ":profile pause"<cr>:noautocmd qall!<cr>
"" abbreviations
cnoreabbrev W! w!
cnoreabbrev Q! q!
@@ -263,14 +270,41 @@ set undoreload=10000
" Plugin Configuration
"
"" syntastic
let g:syntastic_javascript_checkers = ['eslint']
"" ACK
if executable('ag')
let g:ackprg = 'ag --vimgrep'
endif
"" syntastic
let g:syntastic_always_populate_loc_list = 1
let g:syntastic_auto_loc_list = 0
let g:syntastic_check_on_open = 1
let g:syntastic_check_on_wq = 0
" local linter support
let g:syntastic_javascript_checkers = []
function CheckJavaScriptLinter(filepath, linter)
if exists('b:syntastic_checkers')
return
endif
if filereadable(a:filepath)
let b:syntastic_checkers = [a:linter]
let {'b:syntastic_' . a:linter . '_exec'} = a:filepath
endif
endfunction
function SetupJavaScriptLinter()
let l:current_folder = expand('%:p:h')
let l:bin_folder = fnamemodify(syntastic#util#findFileInParent('package.json', l:current_folder), ':h')
let l:bin_folder = l:bin_folder . '/node_modules/.bin/'
call CheckJavaScriptLinter(l:bin_folder . 'standard', 'standard')
call CheckJavaScriptLinter(l:bin_folder . 'eslint', 'eslint')
endfunction
autocmd FileType javascript call SetupJavaScriptLinter()
"" lightline
if filereadable(expand("~/.vim/lightline.vim"))
source ~/.vim/lightline.vim
@@ -312,7 +346,7 @@ let g:tex_flavor = "latex"
let g:livepreview_previewer = 'zathura'
" JSX
" let g:jsx_ext_required = 0 " Allow JSX in normal JS files
let g:jsx_ext_required = 0 " Allow JSX in normal JS files
"
" Autocmd Rules