From 2407f280111fb04ec13ad0a663c3932755497a72 Mon Sep 17 00:00:00 2001 From: Jie Feng Date: Fri, 10 Mar 2017 19:24:41 +0800 Subject: [PATCH] set shell=/usr/bin/zsh instead of bash to make yadr stop suspending vim editing file --- tmux/tmux.conf | 13 +++++++------ vim/settings/path.vim | 2 +- vim/settings/python-mode.vim | 3 --- vim/settings/syntastic.vim | 3 +++ vim/vundles/languages.vundle | 1 - vimrc | 2 +- 6 files changed, 12 insertions(+), 12 deletions(-) diff --git a/tmux/tmux.conf b/tmux/tmux.conf index e39093e..e9cf577 100644 --- a/tmux/tmux.conf +++ b/tmux/tmux.conf @@ -22,12 +22,13 @@ bind -r L resize-pane -R 5 # Smart pane switching with awareness of vim splits. # Source: https://github.com/christoomey/vim-tmux-navigator -is_vim='echo "#{pane_current_command}" | grep -iqE "(^|\/)g?(view|n?vim?x?)(diff)?$"' -bind -n C-h if-shell "$is_vim" "send-keys C-h" "select-pane -L" -bind -n C-j if-shell "$is_vim" "send-keys C-j" "select-pane -D" -bind -n C-k if-shell "$is_vim" "send-keys C-k" "select-pane -U" -bind -n C-l if-shell "$is_vim" "send-keys C-l" "select-pane -R" -bind -n C-\ if-shell "$is_vim" "send-keys C-\\" "select-pane -l" +is_vim="ps -o state= -o comm= -t '#{pane_tty}' \ + | grep -iqE '^[^TXZ ]+ +(\\S+\\/)?g?(view|n?vim?x?)(diff)?$'" +bind-key -n C-h if-shell "$is_vim" "send-keys C-h" "select-pane -L" +bind-key -n C-j if-shell "$is_vim" "send-keys C-j" "select-pane -D" +bind-key -n C-k if-shell "$is_vim" "send-keys C-k" "select-pane -U" +bind-key -n C-l if-shell "$is_vim" "send-keys C-l" "select-pane -R" +bind-key -n C-\ if-shell "$is_vim" "send-keys C-\\" "select-pane -l" # Use vi keybindings for tmux commandline input. # Note that to get command mode you need to hit ESC twice... diff --git a/vim/settings/path.vim b/vim/settings/path.vim index fa23131..1ca1161 100644 --- a/vim/settings/path.vim +++ b/vim/settings/path.vim @@ -1,4 +1,4 @@ " Set the shell to bash so we inherit its path, to make sure " we inherit its path. This affects :Rtags finding the right " path to homebrewed ctags rather than the XCode version of ctags -set shell=bash\ -i +set shell=/usr/bin/zsh\ -l diff --git a/vim/settings/python-mode.vim b/vim/settings/python-mode.vim index 21412a2..3be7de4 100644 --- a/vim/settings/python-mode.vim +++ b/vim/settings/python-mode.vim @@ -22,7 +22,4 @@ augroup filetype_python autocmd FileType python highlight Excess ctermbg=DarkGrey guibg=Black autocmd FileType python match Excess /\%80v.*/ autocmd FileType python set nowrap - autocmd FileType python map :call Flake8() augroup END -" autocmd BufWritePost *.py call Flake8() -"let g:flake8_cmd="/opt/strangebin/flake8000" diff --git a/vim/settings/syntastic.vim b/vim/settings/syntastic.vim index 6cdb90d..633eebd 100644 --- a/vim/settings/syntastic.vim +++ b/vim/settings/syntastic.vim @@ -10,6 +10,9 @@ let g:syntastic_quiet_messages = {'level': 'warnings'} " Default to eslint. If you need jshint, you can override this in " ~/.vimrc.after let g:syntastic_javascript_checkers = ['eslint'] +let g:syntastic_python_checkers = ['flake8'] +let g:syntastic_python_flake8_args='--ignore=F401,F403,F405,W0401' + " I have no idea why this is not working, as it used to " be a part of syntastic code but was apparently removed diff --git a/vim/vundles/languages.vundle b/vim/vundles/languages.vundle index 07594aa..bd059b5 100644 --- a/vim/vundles/languages.vundle +++ b/vim/vundles/languages.vundle @@ -13,4 +13,3 @@ Bundle 'derekwyatt/vim-scala' Bundle 'ktvoelker/sbt-vim' Bundle 'scrooloose/nerdcommenter' Bundle 'klen/python-mode' -Bundle 'nvie/vim-flake8' diff --git a/vimrc b/vimrc index 55c3234..a78fe0e 100644 --- a/vimrc +++ b/vimrc @@ -29,7 +29,7 @@ syntax on " Change leader to a comma because the backslash is too far away " That means all \x commands turn into ,x -" The mapleader has to be set before vundle starts loading all +" The mapleader has to be set before vundle starts loading all " the plugins. let mapleader=","