Page MenuHomePhabricator


Authored by pmoreau on Sep 29 2015, 11:27 PM.
" Vim Configuration File
" Author: Pierre Moreau <>
" Disable Vi compatibility
set nocompatible
" Set beginning of statusline
set statusline=%<%f\ %h%m%r\ \
" Encoding settings
set fileencoding=utf-8
set encoding=utf-8
" Identation settings
filetype plugin indent on
set expandtab
set shiftwidth=2
set shiftround
set softtabstop=2
" Viewing settings
syntax on
set hidden " Hide buffers when opening a new one, rather than closing them
set laststatus=2
set modeline
set modelines=2
set showcmd
set number
set showmatch
set splitright
set splitbelow
set list
set listchars=tab:>-,trail:¬,nbsp:Ŧ
set textwidth=79
set pastetoggle=<F2>
autocmd VimResized * wincmd =
highlight ColorColumn ctermfg=DarkBlue ctermbg=LightGrey
highlight Delimiter ctermfg=Black ctermbg=DarkGreen
highlight Comment ctermfg=DarkGreen ctermbg=Black
autocmd FileType help wincmd L
" Search settings
set smartcase
set incsearch
set hlsearch
noremap <CR> :nohlsearch<CR><CR>
" Ctags settings
set previewheight=6
" Completion settings
set wildmode=longest,full
set wildmenu
set wildignore=*.swp,*.bak,*.pyc,*.class
" Tags settings
map <A-]> :tab split<CR>:exec("tag ".expand("<cword>"))<CR>
map <C-\> :vsp <CR>:exec("tag ".expand("<cword>"))<CR>
" A plugin
let g:alternateRelativeFiles = 1
" YouCompleteMe plugin
let g:ycm_show_diagnostics_ui = 1
let g:ycm_confirm_extra_conf = 0
let g:ycm_autoclose_preview_window_after_completion = 1
let g:ycm_autoclose_preview_window_after_insertion = 1
let g:ycm_collect_identifiers_from_tags_files = 1
let g:ycm_seed_identifiers_with_syntax = 1
let g:ycm_add_preview_to_completeopt = 1
let g:ycm_filepath_completion_use_working_dir = 1
highlight Pmenu ctermfg=DarkCyan ctermbg=Black guifg=#008ab8 guibg=#000000
" Color-Coded plugin
let g:color_coded_enabled = 1
if &diff
let g:color_coded_enabled = 0
" GLSL.vim settings
let g:glsl_file_extensions = '*.vert,*.geo,*.tcs,*.tes,*.comp,*.frag'
" Vim-Fugitive settings
autocmd BufReadPost fugitive://* set bufhidden=delete
set statusline+=%{fugitive#statusline()}
" Set end of statusline
set statusline+=%=%-14.(%l,%c%V%)\ %P
let s:plug_dir = '~/.vim/plugged'
function! BuildColorCoded(info)
if a:info.status == 'installed'
execute '!mkdir build'
execute '!cd build && cmake -GNinja ..'
if a:info.force
execute '!cd build && ninja clean'
execute '!cd build && ninja install'
function! BuildYouCompleteMe(info)
if a:info.status == 'installed'
execute '!mkdir build'
execute '!cd build && cmake -GNinja -DUSE_SYSTEM_LIBCLANG=ON . ../third_party/ycmd/cpp'
if a:info.force
execute '!cd build && ninja clean'
execute '!cd build && ninja ycm_support_libs'
call plug#begin(s:plug_dir)
Plug 'beyondmarc/glsl.vim'
Plug 'jeaye/color_coded', { 'do' : function('BuildColorCoded') }
Plug 'Valloric/YouCompleteMe', { 'do' : function('BuildYouCompleteMe') }
Plug 'tpope/vim-fugitive'
Plug 'tbknl/vimproject'
Plug 'fidian/hexmode'
call plug#end()

Event Timeline

pmoreau changed the title of this paste from untitled to .vimrc.
pmoreau updated the paste's language from autodetect to autodetect.
pmoreau changed the visibility from "All Users" to "Public (No Login Required)".