Last active
March 24, 2022 10:27
-
-
Save vtellier/6e09f3c74946c7e2e9ba9f682db3d432 to your computer and use it in GitHub Desktop.
My vimrc
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
filetype plugin indent on | |
set number " Show line numbers | |
set tabstop=4 " show existing tab with 4 spaces width | |
set expandtab " On pressing tab, insert 4 spaces | |
set ignorecase " Case insentivie searches | |
set autoindent " Always set autoindentation | |
set copyindent " Use the previous indentation when autoindenting | |
set shiftwidth=4 " when indenting with '>', use 4 spaces width | |
set shiftround " Use multiple shift width when using '>' | |
set hlsearch " Highlight search matches | |
set incsearch " Search while you type your search | |
" Vundle setup | |
set nocompatible " be iMproved, required | |
filetype off " required | |
set rtp+=~/.vim/bundle/Vundle.vim " set the runtime path to include Vundle and initialize | |
call vundle#begin() | |
Plugin 'VundleVim/Vundle.vim' " let Vundle manage Vundle, required | |
" End of Vundle setup | |
Plugin 'ycm-core/YouCompleteMe' " Autocompletion plugin | |
call vundle#end() | |
filetype plugin indent on | |
" configuration of youcompleteme | |
let g:ycm_autoclose_preview_window_after_completion = 1 | |
let g:ycm_autoclose_preview_window_after_insertion = 1 | |
" configuration of clangd (used via YouCompleteMe) | |
let g:ycm_clangd_uses_ycmd_caching = 0 " Let clangd fully control code completion | |
let g:ycm_clangd_args = ['--log=verbose', '--pretty', '--fallback-style=Google'] | |
" NERDTree configuration | |
map <C-n> :NERDTreeToggle<CR> | |
autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTree") && b:NERDTree.isTabTree()) | q | endif | |
let NERDTreeShowHidden=1 | |
syntax on " activate syntax coloration | |
" Moving the swp files to a separated place | |
set directory=$HOME/.vim/swapfiles// |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment