Last active
July 6, 2017 17:23
-
-
Save bergercookie/9a2e96e19733b32ca55b8e2940eaba2c to your computer and use it in GitHub Desktop.
Vim indentation for MRPT
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
augroup mrpt_indentation | |
autocmd! | |
" mrpt uses tabs for indentation | |
autocmd FileType cpp set tabstop=4 | |
autocmd FileType cpp set shiftwidth=4 " use indents of X spaces | |
autocmd FileType cpp set preserveindent | |
autocmd FileType cpp set copyindent | |
autocmd FileType cpp set softtabstop=0 | |
autocmd FileType cpp set autoindent " indent at the same level of the previous line | |
autocmd FileType cpp set noexpandtab | |
" ClangFormat configuration | |
autocmd FileType cpp nmap <Leader>C :ClangFormatAutoToggle<CR> | |
autocmd FileType cpp let g:clang_format#command = "/usr/bin/clang-format-3.8" | |
autocmd FileType cpp let g:clang_format#detect_style_file = 1 | |
autocmd FileType cpp let g:clang_format#auto_format_on_insert_leave = 0 | |
autocmd FileType cpp let g:clang_format#auto_format = 1 | |
autocmd FileType cpp let g:clang_format#auto_formatexpr = 1 | |
autocmd FileType cpp set textwidth=0 " Incompatible with auto_formatexpr=1 | |
augroup END | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment