vimrc: c++, clang-format
This commit is contained in:
parent
d8ad6c2cec
commit
cf27d73151
1 changed files with 16 additions and 2 deletions
18
files/.vimrc
18
files/.vimrc
|
@ -5,7 +5,7 @@ set background=dark
|
|||
set number
|
||||
set relativenumber
|
||||
set tabstop=4
|
||||
set softtabstop=4
|
||||
"set softtabstop=4
|
||||
set shiftwidth=4
|
||||
set expandtab
|
||||
set smartindent
|
||||
|
@ -18,6 +18,14 @@ set tw=79
|
|||
set wildmode=longest,list,full
|
||||
set wildmenu
|
||||
|
||||
" Splitting
|
||||
set splitbelow
|
||||
set splitright
|
||||
nnoremap <C-J> <C-W><C-J>
|
||||
nnoremap <C-K> <C-W><C-K>
|
||||
nnoremap <C-L> <C-W><C-L>
|
||||
nnoremap <C-H> <C-W><C-H>
|
||||
|
||||
set exrc
|
||||
set secure
|
||||
|
||||
|
@ -49,8 +57,9 @@ Plugin 'itchyny/vim-haskell-indent'
|
|||
Plugin 'junegunn/goyo.vim'
|
||||
Plugin 'vim-airline/vim-airline'
|
||||
Plugin 'vim-airline/vim-airline-themes'
|
||||
Plugin 'davidhalter/jedi-vim'
|
||||
"Plugin 'davidhalter/jedi-vim'
|
||||
Plugin 'vim-scripts/a.vim'
|
||||
Plugin 'rhysd/vim-clang-format'
|
||||
|
||||
call vundle#end() " required
|
||||
filetype plugin indent on " required
|
||||
|
@ -100,6 +109,11 @@ let g:airline_powerline_fonts = 1
|
|||
let g:airline#extensions#tabline#enabled = 1
|
||||
set noshowmode
|
||||
|
||||
""""""""""""""""" clang-format
|
||||
let g:clang_format#detect_style_file = 1
|
||||
autocmd FileType c,cpp,objc nnoremap <buffer><Leader>cf :<C-u>ClangFormat<CR>
|
||||
autocmd FileType c,cpp,objc vnoremap <buffer><Leader>cf :ClangFormat<CR>
|
||||
|
||||
""""""""""""""""" Trailing whitespaces
|
||||
fun! TrimWhitespace()
|
||||
let l:save_cursor = getpos('.')
|
||||
|
|
Loading…
Reference in a new issue