mirror of
https://github.com/tomru/DotfilesOld.git
synced 2026-03-04 15:07:23 +01:00
Merge commit '6f72e87' into jenipapo
This commit is contained in:
46
vimrc
46
vimrc
@@ -38,7 +38,7 @@ Plug 'rhysd/conflict-marker.vim'
|
|||||||
Plug 'airblade/vim-gitgutter'
|
Plug 'airblade/vim-gitgutter'
|
||||||
|
|
||||||
Plug 'inside/vim-search-pulse'
|
Plug 'inside/vim-search-pulse'
|
||||||
Plug 'rking/ag.vim'
|
Plug 'mileszs/ack.vim'
|
||||||
|
|
||||||
Plug 'BufOnly.vim'
|
Plug 'BufOnly.vim'
|
||||||
|
|
||||||
@@ -48,8 +48,7 @@ Plug 'chriskempson/base16-vim'
|
|||||||
|
|
||||||
Plug 'pangloss/vim-javascript', { 'for': 'javascript' }
|
Plug 'pangloss/vim-javascript', { 'for': 'javascript' }
|
||||||
Plug 'marijnh/tern_for_vim', { 'do': 'npm install', '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' }
|
||||||
Plug 'mxw/vim-jsx', { 'for': 'javascript.jsx' }
|
|
||||||
|
|
||||||
Plug 'suan/vim-instant-markdown', { 'for': 'markdown' }
|
Plug 'suan/vim-instant-markdown', { 'for': 'markdown' }
|
||||||
Plug 'xuhdev/vim-latex-live-preview', { 'for': 'tex' }
|
Plug 'xuhdev/vim-latex-live-preview', { 'for': 'tex' }
|
||||||
@@ -171,6 +170,9 @@ nnoremap <leader><space> :noh<cr>
|
|||||||
nnoremap j gj
|
nnoremap j gj
|
||||||
nnoremap k gk
|
nnoremap k gk
|
||||||
|
|
||||||
|
"" open last buffer
|
||||||
|
nnoremap <BS> <C-^>
|
||||||
|
|
||||||
" Easier split navigation
|
" Easier split navigation
|
||||||
|
|
||||||
" Use ctrl-[hjkl] to select the active split!
|
" Use ctrl-[hjkl] to select the active split!
|
||||||
@@ -235,6 +237,11 @@ vnoremap <silent> <Leader>0 :!node<cr>
|
|||||||
nnoremap + <c-a>
|
nnoremap + <c-a>
|
||||||
nnoremap - <c-x>
|
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
|
"" abbreviations
|
||||||
cnoreabbrev W! w!
|
cnoreabbrev W! w!
|
||||||
cnoreabbrev Q! q!
|
cnoreabbrev Q! q!
|
||||||
@@ -263,14 +270,41 @@ set undoreload=10000
|
|||||||
" Plugin Configuration
|
" Plugin Configuration
|
||||||
"
|
"
|
||||||
|
|
||||||
"" syntastic
|
"" ACK
|
||||||
let g:syntastic_javascript_checkers = ['eslint']
|
if executable('ag')
|
||||||
|
let g:ackprg = 'ag --vimgrep'
|
||||||
|
endif
|
||||||
|
|
||||||
|
"" syntastic
|
||||||
let g:syntastic_always_populate_loc_list = 1
|
let g:syntastic_always_populate_loc_list = 1
|
||||||
let g:syntastic_auto_loc_list = 0
|
let g:syntastic_auto_loc_list = 0
|
||||||
let g:syntastic_check_on_open = 1
|
let g:syntastic_check_on_open = 1
|
||||||
let g:syntastic_check_on_wq = 0
|
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
|
"" lightline
|
||||||
if filereadable(expand("~/.vim/lightline.vim"))
|
if filereadable(expand("~/.vim/lightline.vim"))
|
||||||
source ~/.vim/lightline.vim
|
source ~/.vim/lightline.vim
|
||||||
@@ -312,7 +346,7 @@ let g:tex_flavor = "latex"
|
|||||||
let g:livepreview_previewer = 'zathura'
|
let g:livepreview_previewer = 'zathura'
|
||||||
|
|
||||||
" JSX
|
" 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
|
" Autocmd Rules
|
||||||
|
|||||||
Reference in New Issue
Block a user