From be786f2755bae230f2fb18ab9a0c8bdeab92cb0d Mon Sep 17 00:00:00 2001 From: Urbain Vaes Date: Wed, 23 Mar 2016 11:49:58 +0000 Subject: Add flag for mixed indent --- vim/.init.vim-rplugin~ | 9 +++++++++ vim/vimrc | 17 ++++++++++++++--- 2 files changed, 23 insertions(+), 3 deletions(-) create mode 100644 vim/.init.vim-rplugin~ (limited to 'vim') diff --git a/vim/.init.vim-rplugin~ b/vim/.init.vim-rplugin~ new file mode 100644 index 0000000..98ed46e --- /dev/null +++ b/vim/.init.vim-rplugin~ @@ -0,0 +1,9 @@ +" python3 plugins +call remote#host#RegisterPlugin('python3', '/home/urbain/.vim/plugged/deoplete.nvim/rplugin/python3/deoplete.py', [ + \ {'sync': 1, 'name': '_deoplete', 'opts': {}, 'type': 'function'}, + \ ]) + + +" python plugins + + diff --git a/vim/vimrc b/vim/vimrc index a1c6ce6..e9bab6c 100644 --- a/vim/vimrc +++ b/vim/vimrc @@ -71,9 +71,20 @@ Plug 'tpope/vim-commentary' Plug 'tpope/vim-dispatch' Plug 'tpope/vim-eunuch' Plug 'tpope/vim-flagship' -autocmd BufEnter,BufWritePost * let g:trailing=search('\s\+$','pn') -autocmd User Flags call Hoist("window", "%{g:trailing?'[tw]':''}") -autocmd User Flags call Hoist("window", "SyntasticStatuslineFlag") +function Mixed_indent() + let b:spaces=search('\v(^ +)','n') + let b:tabs=search('\v(^\t+)','n') + return (b:spaces * b:tabs > 0) +endfunction + +augroup myflags + autocmd! + autocmd BufEnter,BufWritePost * let b:trailing=search('\s\+$','n') + autocmd BufEnter,BufWritePost * let b:mixed=Mixed_indent() + autocmd User Flags call Hoist("window", "SyntasticStatuslineFlag") + autocmd User Flags call Hoist("window", "%{b:trailing?'[tw]':''}") + autocmd User Flags call Hoist("window", "%{b:mixed?'[mixed]':''}") +augroup END Plug 'tpope/vim-fugitive' Plug 'tpope/vim-obsession' -- cgit v1.2.3