From 9f1078fa599989e2263cece25a207ea47ee71501 Mon Sep 17 00:00:00 2001 From: Thomas Ruoff Date: Mon, 30 Jan 2017 21:09:14 +0100 Subject: [PATCH 1/7] update zplug --- zplug | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zplug b/zplug index 063d26f..ac6012d 160000 --- a/zplug +++ b/zplug @@ -1 +1 @@ -Subproject commit 063d26f8009e6a651c124fe8c049346fb49c2769 +Subproject commit ac6012d80df3f0dd327dfe0d274273a40e2f0a16 From 39198626ddba780726f09dedf4d99aeaac41d9a5 Mon Sep 17 00:00:00 2001 From: Thomas Ruoff Date: Sun, 12 Feb 2017 22:18:05 +0100 Subject: [PATCH 2/7] allow dot cmd in visual mode --- vimrc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/vimrc b/vimrc index b9f3771..dda6117 100644 --- a/vimrc +++ b/vimrc @@ -184,6 +184,10 @@ noremap bd :bd "" indent visual selected code without unselecting and going back to normal mode vnoremap > >gv vnoremap < + "" Visually select the text that was last edited/pasted nnoremap gV `[v`] From 5e5e35283fdf0410175508069868f0fc78148778 Mon Sep 17 00:00:00 2001 From: Thomas Ruoff Date: Sun, 12 Feb 2017 22:18:49 +0100 Subject: [PATCH 3/7] add ANDROID_HOME to env --- zprofile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/zprofile b/zprofile index a992d21..ed3d911 100644 --- a/zprofile +++ b/zprofile @@ -25,4 +25,8 @@ case $OSTYPE in export MANPATH="$(brew --prefix coreutils)/libexec/gnuman:$MANPATH" #eval $(ssh-agent -s) ;; + "linux-gnu" ) + export ANDROID_HOME=~/local/android-sdk + export PATH=$PATH:$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools + ;; esac From 54229fd58f4983d65f76a90af191a2a6f0af6827 Mon Sep 17 00:00:00 2001 From: Thomas Ruoff Date: Sun, 12 Feb 2017 22:19:14 +0100 Subject: [PATCH 4/7] add alias to turn off shell history --- zshrc | 1 + 1 file changed, 1 insertion(+) diff --git a/zshrc b/zshrc index 7bb4a63..41bf314 100644 --- a/zshrc +++ b/zshrc @@ -30,6 +30,7 @@ setopt cdablevars ######################## alias _=sudo alias g=git +alias nohist='unset HISTFILE' alias ta='tmux attach -t' alias ts='tmux new-session -s' alias tl='tmux list-sessions' From 1826e859ec2fd4b02a30370706e2a25ffa1296c6 Mon Sep 17 00:00:00 2001 From: Thomas Ruoff Date: Sun, 12 Feb 2017 22:20:33 +0100 Subject: [PATCH 5/7] update base16-shell --- base16-shell | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/base16-shell b/base16-shell index 8643aca..471707c 160000 --- a/base16-shell +++ b/base16-shell @@ -1 +1 @@ -Subproject commit 8643aca554eef66a20c1227bc2d41b60ba69eee8 +Subproject commit 471707c20e48ea9554c06f1d910c91bd71693459 From 3581b874576037e31ead6a56fe162f5adb13b3f8 Mon Sep 17 00:00:00 2001 From: Thomas Ruoff Date: Thu, 23 Mar 2017 22:53:48 +0100 Subject: [PATCH 6/7] use augroup --- vimrc | 53 ++++++++++++++++++++++------------------------------- 1 file changed, 22 insertions(+), 31 deletions(-) diff --git a/vimrc b/vimrc index 7302449..fcaf61b 100644 --- a/vimrc +++ b/vimrc @@ -192,14 +192,10 @@ vnoremap . :norm. nnoremap gV `[v`] "" pull word under cursor into lhs of a substitute (for quick search and replace) -nmap r :%s#\<=expand("")\># +nnoremap r :%s#\<=expand("")\># "" fast editing of the .vimrc nnoremap ev :e $MYVIMRC -nnoremap sv :so $MYVIMRC - -"" allow saving when you forgot sudo -cnoremap w!! w !sudo tee % >/dev/null "" turn on spell checking noremap spl :setlocal spell! @@ -295,7 +291,10 @@ function! SetupJavaScriptLinter() call CheckJavaScriptLinter(l:bin_folder . 'eslint', 'eslint') endfunction -autocmd FileType javascript call SetupJavaScriptLinter() +augroup syntastic + autocmd! + autocmd FileType javascript call SetupJavaScriptLinter() +augroup END "" lightline if filereadable(expand("~/.vim/lightline.vim")) @@ -333,37 +332,29 @@ let g:markdown_fenced_languages = [ " Autocmd Rules {{{ "" do syntax highlight syncing from start -autocmd BufEnter * :syntax sync fromstart - -"" Remember cursor position -autocmd BufReadPost * if line("'\"") > 1 && line("'\"") <= line("$") | exe "normal! g`\"" | endif +augroup general + autocmd! + autocmd BufEnter * :syntax sync fromstart +augroup END "" txt, mail, tex -au FileType text,markdown,mail,tex set wrap wm=2 textwidth=78 nocindent spell +augroup text + autocmd! + autocmd FileType text,markdown,mail,tex set wrap wm=2 textwidth=78 nocindent spell +augroup END "" Python -au FileType python set noexpandtab +augroup python + autocmd FileType python set noexpandtab +augroup END "" JavaScript -au FileType javascript map r :TernRename - -"" Json -au BufRead,BufNewFile *.json set ft=json - -"" Mustache -au BufRead,BufNewFile *.template set filetype=html.mustache syntax=mustache - -"" always open help in vertical split -au FileType help wincmd L +augroup web + autocmd! + autocmd FileType javascript map r :TernRename + autocmd BufRead,BufNewFile *.json set ft=json + autocmd BufRead,BufNewFile *.template set filetype=html.mustache syntax=mustache +augroup END " }}} -" probably not needed {{{ - -"" disable visual bell -"set visualbell -"set t_vb= - -"" spelling -"set spelllang=en,de -"}}} From ae84781fbfd6d605e2cc2774659ac59acc16a0fd Mon Sep 17 00:00:00 2001 From: Thomas Ruoff Date: Thu, 23 Mar 2017 23:47:02 +0100 Subject: [PATCH 7/7] test ale instead of syntastic --- vim/lightline.vim | 15 +++------------ vimrc | 38 +++++--------------------------------- 2 files changed, 8 insertions(+), 45 deletions(-) diff --git a/vim/lightline.vim b/vim/lightline.vim index 0c8101e..4094c74 100644 --- a/vim/lightline.vim +++ b/vim/lightline.vim @@ -3,7 +3,7 @@ let g:lightline = { \ 'colorscheme': 'solarized', \ 'active': { \ 'left': [ [ 'mode', 'paste' ], [ 'fugitive', 'filename' ], ['ctrlpmark'] ], - \ 'right': [ [ 'syntastic', 'lineinfo' ], ['percent'], [ 'fileformat', 'fileencoding', 'filetype' ] ] + \ 'right': [ [ 'ale', 'lineinfo' ], ['percent'], [ 'fileformat', 'fileencoding', 'filetype' ] ] \ }, \ 'component_function': { \ 'fugitive': 'LightLineFugitive', @@ -15,10 +15,10 @@ let g:lightline = { \ 'ctrlpmark': 'CtrlPMark', \ }, \ 'component_expand': { - \ 'syntastic': 'SyntasticStatuslineFlag', + \ 'ale': 'ale#statusline#Status', \ }, \ 'component_type': { - \ 'syntastic': 'error', + \ 'ale': 'error', \ }, \ 'subseparator': { 'left': '|', 'right': '|' } \ } @@ -115,15 +115,6 @@ function! TagbarStatusFunc(current, sort, fname, ...) abort return lightline#statusline(0) endfunction -augroup AutoSyntastic - autocmd! - autocmd BufWritePost *.c,*.cpp,*.js,*.py call s:syntastic() -augroup END -function! s:syntastic() - SyntasticCheck - call lightline#update() -endfunction - let g:unite_force_overwrite_statusline = 0 let g:vimfiler_force_overwrite_statusline = 0 let g:vimshell_force_overwrite_statusline = 0 diff --git a/vimrc b/vimrc index fcaf61b..1c01733 100644 --- a/vimrc +++ b/vimrc @@ -28,7 +28,7 @@ Plug 'fholgado/minibufexpl.vim' Plug 'SirVer/ultisnips' Plug 'honza/vim-snippets' -Plug 'scrooloose/syntastic' +Plug 'w0rp/ale' Plug 'tpope/vim-fugitive' Plug 'rhysd/conflict-marker.vim' @@ -264,41 +264,13 @@ nnoremap fc :Commits "" minibufexpl map t :MBEToggle -"" 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 - -augroup syntastic - autocmd! - autocmd FileType javascript call SetupJavaScriptLinter() -augroup END - "" lightline if filereadable(expand("~/.vim/lightline.vim")) source ~/.vim/lightline.vim + augroup ale-statusline + autocmd! + autocmd User ALELint call lightline#update() + augroup END endif "" Unimpaired