From a4f09638184791c92226618452356c374129d2f8 Mon Sep 17 00:00:00 2001
From: "lilei (Cloud)"
Date: Wed, 19 Sep 2018 16:43:07 +0800
Subject: [PATCH] plugin: use BufRead instead of filetype and fix bundle
indentline path.
Signed-off-by: lilei (Cloud)
---
vim/bundle/ll.vim/plugin/ll.vim | 9 ++++-----
vim/bundles.vim | 2 +-
2 files changed, 5 insertions(+), 6 deletions(-)
diff --git a/vim/bundle/ll.vim/plugin/ll.vim b/vim/bundle/ll.vim/plugin/ll.vim
index 8a37d59..dd52c7e 100644
--- a/vim/bundle/ll.vim/plugin/ll.vim
+++ b/vim/bundle/ll.vim/plugin/ll.vim
@@ -12,10 +12,9 @@ function! AutoSetFileHead()
endfunction
if ((filereadable("Kconfig"))&&(filereadable("Makefile")))
- if &filetype == 'c' || &filetype == 'cpp'
- set tabstop=8
- set softtabstop=8
- set shiftwidth=8
+ au! BufRead *.c,*.cpp |
+ set tabstop=8 |
+ set softtabstop=8 |
+ set shiftwidth=8 |
set noexpandtab
- endif
endif
diff --git a/vim/bundles.vim b/vim/bundles.vim
index dfb7163..08aa36f 100644
--- a/vim/bundles.vim
+++ b/vim/bundles.vim
@@ -15,7 +15,7 @@ Bundle 'majutsushi/tagbar'
Bundle 'vim-airline/vim-airline'
Bundle 'rking/ag.vim'
Bundle 'ctrlpvim/ctrlp.vim'
-Bundle 'Yggdroot/indentLine.vim'
+Bundle 'Yggdroot/indentLine'
filetype plugin indent on " required!