2016-10-15 11:38:15 +02:00
|
|
|
|
" Pas de compatibilité a VI !
|
|
|
|
|
set nocompatible
|
|
|
|
|
|
2016-10-15 12:13:22 +02:00
|
|
|
|
" PLUGNIS ###########################################################{{{
|
2016-10-15 11:38:15 +02:00
|
|
|
|
filetype off " required
|
|
|
|
|
set rtp+=~/.vim/bundle/Vundle.vim
|
|
|
|
|
call vundle#begin()
|
|
|
|
|
" Vundle
|
|
|
|
|
Plugin 'VundleVim/Vundle.vim'
|
2016-10-15 12:13:22 +02:00
|
|
|
|
" Stylish bar ...
|
|
|
|
|
Plugin 'vim-airline/vim-airline'
|
|
|
|
|
" ... and its themes
|
|
|
|
|
Plugin 'vim-airline/vim-airline-themes'
|
2016-11-20 10:35:50 +01:00
|
|
|
|
" Nerd tree
|
2016-11-25 09:52:12 +01:00
|
|
|
|
" Plugin 'scrooloose/nerdtree'
|
2016-10-15 11:38:15 +02:00
|
|
|
|
" I don't know what this is
|
|
|
|
|
Plugin 'othree/html5.vim'
|
2016-10-15 12:13:22 +02:00
|
|
|
|
" Vim markdown previewer
|
|
|
|
|
Plugin 'suan/vim-instant-markdown'
|
|
|
|
|
" YouCompleteMe : best vim completer ever
|
|
|
|
|
Plugin 'Valloric/YouCompleteMe'
|
2016-10-15 12:30:58 +02:00
|
|
|
|
" Coloration for javascript
|
|
|
|
|
Plugin 'jelera/vim-javascript-syntax'
|
|
|
|
|
" Coloration for typescript
|
|
|
|
|
Plugin 'leafgarland/typescript-vim'
|
2016-11-16 10:14:52 +01:00
|
|
|
|
" Coloration for pug (formerly jade)
|
|
|
|
|
Plugin 'digitaltoad/vim-pug'
|
2016-10-15 12:41:13 +02:00
|
|
|
|
" Generate doc for typescript functions
|
|
|
|
|
Plugin 'https://gogs.tforgione.fr/tforgione/typescript-doc.git'
|
|
|
|
|
" My colorscheme
|
|
|
|
|
Plugin 'https://gogs.tforgione.fr/tforgione/peach'
|
2016-10-15 11:38:15 +02:00
|
|
|
|
call vundle#end() " required
|
|
|
|
|
filetype plugin indent on " required
|
|
|
|
|
|
|
|
|
|
" Line numbers and syntaxic coloration
|
|
|
|
|
" set nu
|
|
|
|
|
" syntax on
|
|
|
|
|
|
|
|
|
|
" Highlight bad spaces (not working...)
|
|
|
|
|
" }}}
|
|
|
|
|
|
|
|
|
|
" INDENTATION #######################################################{{{
|
|
|
|
|
set expandtab
|
|
|
|
|
set tabstop=4
|
|
|
|
|
set shiftwidth=4
|
|
|
|
|
set autoindent
|
|
|
|
|
" }}}
|
|
|
|
|
|
|
|
|
|
" UI CONFIG #########################################################{{{
|
|
|
|
|
set number
|
|
|
|
|
set showcmd
|
|
|
|
|
set wildmenu
|
|
|
|
|
set lazyredraw
|
|
|
|
|
set encoding=utf8
|
|
|
|
|
set clipboard=unnamedplus
|
|
|
|
|
set updatecount=50
|
|
|
|
|
set mouse=a
|
|
|
|
|
set ttymouse=sgr
|
|
|
|
|
" Espaces insécables grrrr
|
|
|
|
|
set list
|
|
|
|
|
set listchars=tab: ,trail:·,extends:>,precedes:<,nbsp:¬
|
|
|
|
|
" Remove trailing spaces
|
|
|
|
|
autocmd BufWritePre * :%s/\s\+$//e
|
|
|
|
|
" Compile on F12
|
|
|
|
|
nnoremap <silent><F12> :wa \| !make-client.sh<CR>
|
|
|
|
|
inoremap <silent><F12> <C-O>:wa \|!make-client.sh<CR>
|
|
|
|
|
vnoremap <silent><F12> :wa \|!make-client.sh<CR>
|
|
|
|
|
" Escape on F1
|
|
|
|
|
map <F1> <Esc>
|
|
|
|
|
imap <F1> <Esc>
|
2016-10-15 12:13:22 +02:00
|
|
|
|
" vim airline config
|
|
|
|
|
set laststatus=2
|
|
|
|
|
let g:airline_powerline_fonts = 1
|
|
|
|
|
let g:airline#extensions#branch#format = 1
|
|
|
|
|
let g:airline_theme='dark'
|
|
|
|
|
set t_Co=256
|
2016-10-15 11:38:15 +02:00
|
|
|
|
" }}}
|
|
|
|
|
|
2016-10-15 12:41:13 +02:00
|
|
|
|
" COLOR #############################################################{{{
|
|
|
|
|
set background=dark
|
|
|
|
|
syntax enable
|
|
|
|
|
colorscheme peach
|
|
|
|
|
highlight BadWhitespace ctermbg=red guibg=red
|
|
|
|
|
match BadWhitespace / \| \+\t/
|
|
|
|
|
" }}}
|
|
|
|
|
|
2016-10-15 11:38:15 +02:00
|
|
|
|
" SEARCHING #########################################################{{{
|
|
|
|
|
set title
|
|
|
|
|
set showmatch
|
|
|
|
|
set hlsearch
|
|
|
|
|
set noincsearch
|
|
|
|
|
" }}}
|
|
|
|
|
|
|
|
|
|
" NERDTREE ##########################################################{{{
|
|
|
|
|
let NERDTreeIgnore = ['\.pyc$','__pycache__']
|
|
|
|
|
set shell=sh
|
|
|
|
|
let g:NERDTreeIndicatorMapCustom = {
|
2016-10-15 12:13:22 +02:00
|
|
|
|
\ "Modified" : "✹",
|
|
|
|
|
\ "Staged" : "✚",
|
|
|
|
|
\ "Untracked" : "✭",
|
|
|
|
|
\ "Renamed" : "➜",
|
|
|
|
|
\ "Unmerged" : "═",
|
|
|
|
|
\ "Deleted" : "✖",
|
|
|
|
|
\ "Dirty" : "✗",
|
|
|
|
|
\ "Clean" : "✔︎",
|
|
|
|
|
\ "Unknown" : "?"
|
|
|
|
|
\ }
|
2016-10-15 11:38:15 +02:00
|
|
|
|
let g:WebDevIconsNerdTreeGitPluginForceVAlign = 1
|
|
|
|
|
" }}}
|
|
|
|
|
|
|
|
|
|
" BACKUPS ###########################################################{{{
|
2016-10-21 10:29:31 +02:00
|
|
|
|
set dir=$HOME/.vim/swp//
|
2016-10-15 11:38:15 +02:00
|
|
|
|
autocmd BufWritePost * :silent execute ':w! ' ."$HOME/.vim/backups/" . escape(substitute(expand('%:p'), "/", "%", "g"), "%")
|
|
|
|
|
|
|
|
|
|
if exists('+undofile')
|
|
|
|
|
set undofile
|
|
|
|
|
set undolevels=1000
|
|
|
|
|
set undoreload=10000
|
|
|
|
|
if exists('+undodir')
|
|
|
|
|
set undodir=$HOME/.vim/undo
|
|
|
|
|
endif
|
|
|
|
|
endif
|
|
|
|
|
" }}}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
" MARKDOWN PREVIEW ##################################################{{{
|
|
|
|
|
let g:markdown_composer_browser = 'firefox'
|
2016-10-15 12:13:22 +02:00
|
|
|
|
let g:instant_markdown_autostart = 0
|
|
|
|
|
" }}}
|
|
|
|
|
|
|
|
|
|
" CODE COMPLETION ###################################################{{{
|
|
|
|
|
" You complete me configuration file
|
|
|
|
|
let g:ycm_global_ycm_extra_conf = '~/.vim/ycm_extra_conf.py'
|
|
|
|
|
let g:ycm_confirm_extra_conf = 0
|
|
|
|
|
|
|
|
|
|
" Goto with F11
|
|
|
|
|
nnoremap <silent><F10> :YcmCompleter GoTo<CR>
|
|
|
|
|
inoremap <silent><F10> <C-O>:YcmCompleter GoTo<CR>
|
|
|
|
|
vnoremap <silent><F10> :YcmCompleter GoTo<CR>
|
|
|
|
|
|
|
|
|
|
nnoremap <silent><F11> :vs \| :YcmCompleter GoTo<CR> \| <C-w><C-x><C-w><C-w>
|
|
|
|
|
inoremap <silent><F11> <C-O>:vs \| :YcmCompleter GoTo<CR> \| <C-w><C-x><C-w><C-w>
|
|
|
|
|
vnoremap <silent><F11> :vs \| :YcmCompleter GoTo<CR> \| <C-w><C-x><C-w><C-w>
|
2016-10-15 11:38:15 +02:00
|
|
|
|
" }}}
|
2016-10-15 12:41:13 +02:00
|
|
|
|
|