vimrc: fix expandtab
This commit is contained in:
parent
d694a515f6
commit
f4fdbe044f
14
.vimrc
14
.vimrc
@ -185,14 +185,18 @@ augroup Binary
|
||||
au BufWritePost *.bin set nomod | endif
|
||||
augroup END
|
||||
|
||||
" detect indentation see http://www.freehackers.org/Indent_Finder
|
||||
|
||||
fu DetectIndent()
|
||||
execute system ('python2 ~/.vim/indent_finder/indent_finder.py --vim-output --default space --default-size ' . &tabstop .' "' . expand('%') . '"' )
|
||||
if &expandtab
|
||||
autocmd BufReadPost /* execute system ('python2 ~/.vim/indent_finder/indent_finder.py --vim-output --default space --default-size ' . &tabstop .' "' . expand('%') . '"' )
|
||||
autocmd BufReadPost /* let b:clang_style="{BasedOnStyle: LLVM, AlignConsecutiveAssignments: true, AllowShortFunctionsOnASingleLine: Empty, BreakBeforeBraces: Linux, BreakStringLiterals: false, ColumnLimit: 95, IndentCaseLabels: true, IndentWidth: " .&shiftwidth .", TabWidth: " .&tabstop .", UseTab: Never}"
|
||||
let b:clang_style="{BasedOnStyle: LLVM, AlignConsecutiveAssignments: true, AllowShortFunctionsOnASingleLine: Empty, BreakBeforeBraces: Linux, BreakStringLiterals: false, ColumnLimit: 95, IndentCaseLabels: true, IndentWidth: " .&shiftwidth .", TabWidth: " .&tabstop .", UseTab: Never}"
|
||||
else
|
||||
autocmd BufReadPost /* execute system ('python2 ~/.vim/indent_finder/indent_finder.py --vim-output --default tab --default-size ' .&tabstop .' "' . expand('%') . '"' )
|
||||
autocmd BufReadPost /* let b:clang_style="{BasedOnStyle: LLVM, AlignConsecutiveAssignments: true, AllowShortFunctionsOnASingleLine: Empty, BreakBeforeBraces: Linux, BreakStringLiterals: false, ColumnLimit: 95, IndentCaseLabels: true, IndentWidth: " .&shiftwidth .", TabWidth: " .&tabstop .", UseTab: ForContinuationAndIndentation}"
|
||||
let b:clang_style="{BasedOnStyle: LLVM, AlignConsecutiveAssignments: true, AllowShortFunctionsOnASingleLine: Empty, BreakBeforeBraces: Linux, BreakStringLiterals: false, ColumnLimit: 95, IndentCaseLabels: true, IndentWidth: " .&shiftwidth .", TabWidth: " .&tabstop .", UseTab: ForContinuationAndIndentation}"
|
||||
endif
|
||||
endfu
|
||||
|
||||
" detect indentation see http://www.freehackers.org/Indent_Finder
|
||||
autocmd BufReadPost /* call DetectIndent()
|
||||
|
||||
map <C-K> :pyf ~/.vim/syntax/clang-format.py<CR>
|
||||
imap <C-K> <ESC>:pyf ~/.vim/syntax/clang-format.py<CR>i
|
||||
|
Loading…
Reference in New Issue
Block a user