2017-12-10 10:48:12 +01:00
|
|
|
" Syntax coloration and color theme
|
2017-07-13 10:06:09 +02:00
|
|
|
syntax enable
|
2019-03-06 07:18:24 +01:00
|
|
|
set background=light
|
2017-07-13 10:06:09 +02:00
|
|
|
colorscheme solarized
|
|
|
|
|
|
|
|
" Filetype detection
|
|
|
|
filetype plugin on
|
|
|
|
|
|
|
|
" Format indentation
|
|
|
|
if has("autocmd")
|
|
|
|
filetype plugin indent on
|
|
|
|
endif
|
|
|
|
|
2017-11-19 11:41:49 +01:00
|
|
|
" add some tags for html indentations
|
2017-07-13 10:44:10 +02:00
|
|
|
:let g:html_indent_inctags = "html,body,head,tbody"
|
|
|
|
|
2017-12-10 10:48:12 +01:00
|
|
|
set smartindent
|
|
|
|
set autoindent
|
|
|
|
set tabstop=4
|
|
|
|
set expandtab
|
|
|
|
set softtabstop=4
|
|
|
|
set shiftwidth=4
|
2018-03-06 09:06:51 +01:00
|
|
|
" autocmd FileType json setlocal shiftwidth=2 tabstop=2
|
2017-12-10 10:48:12 +01:00
|
|
|
|
2017-07-13 10:06:09 +02:00
|
|
|
set showcmd " Show (partial) command in status line.
|
2018-03-01 16:16:37 +01:00
|
|
|
set showmode " Show indication of having changed modes
|
2017-07-13 10:06:09 +02:00
|
|
|
set showmatch " Show matching brackets.
|
2017-12-10 10:48:12 +01:00
|
|
|
|
2017-07-13 10:06:09 +02:00
|
|
|
set ignorecase " Do case insensitive matching
|
|
|
|
set smartcase " Do smart case matching
|
|
|
|
set incsearch " Incremental search
|
2018-03-01 16:16:37 +01:00
|
|
|
set hlsearch " Highlight search
|
2017-12-10 10:48:12 +01:00
|
|
|
|
2017-07-13 10:06:09 +02:00
|
|
|
set autowrite " Automatically save before commands like :next and :make
|
|
|
|
set hidden " Hide buffers when they are abandoned
|
|
|
|
set mouse=a " Enable mouse usage (all modes)
|
2017-12-10 10:48:12 +01:00
|
|
|
|
2017-07-13 10:06:09 +02:00
|
|
|
set linebreak " Line wrap
|
2017-12-10 10:48:12 +01:00
|
|
|
set tw=79 " Lines longer than 79 chars will be wrapped
|
|
|
|
set colorcolumn=79 " Colors the 79th column
|
|
|
|
|
2017-11-19 11:41:49 +01:00
|
|
|
set number " Line numbering
|
2017-12-10 10:48:12 +01:00
|
|
|
set cursorline
|
2017-07-13 10:06:09 +02:00
|
|
|
set ruler
|
|
|
|
set modeline
|
|
|
|
|
2017-12-19 16:33:26 +01:00
|
|
|
" Markdown
|
|
|
|
au FileType markdown set wrap
|
2018-02-15 07:24:12 +01:00
|
|
|
au FileType markdown set nocursorline
|
2017-12-19 16:33:26 +01:00
|
|
|
au FileType markdown set linebreak
|
2018-02-15 07:24:12 +01:00
|
|
|
au FileType markdown set colorcolumn&
|
2017-12-19 16:33:26 +01:00
|
|
|
|
2018-03-01 15:00:20 +01:00
|
|
|
" Consider `.jsonld` as JSON
|
|
|
|
autocmd BufNewFile,BufRead *.jsonld setfiletype json
|
2019-03-06 07:18:24 +01:00
|
|
|
" tabstop to 2 for JSON
|
|
|
|
au FileType json set tabstop=2
|
|
|
|
au FileType json set softtabstop=2
|
|
|
|
au FileType json set shiftwidth=2
|
2018-03-01 15:00:20 +01:00
|
|
|
|
2017-07-13 10:06:09 +02:00
|
|
|
" fold
|
2017-12-11 06:27:23 +01:00
|
|
|
" Type de fold si c'est du JSON
|
|
|
|
autocmd FileType json setlocal foldmethod=syntax
|
|
|
|
" Détermine le niveau de fold par défaut pour le JSON
|
|
|
|
autocmd FileType json set foldlevel=2
|
2018-10-19 09:08:27 +02:00
|
|
|
autocmd FileType json set tabstop=2
|
|
|
|
autocmd FileType json set softtabstop=2
|
2017-12-11 06:27:23 +01:00
|
|
|
" Détermine le niveau de fold par défaut pour le md
|
|
|
|
autocmd FileType markdown set foldlevel=0
|
2018-10-19 09:08:27 +02:00
|
|
|
" Détermine l'indentation par défaut pour le html
|
|
|
|
autocmd FileType html set tabstop=2
|
|
|
|
autocmd FileType html set softtabstop=2
|
|
|
|
autocmd FileType html set shiftwidth=2
|
2017-07-13 10:06:09 +02:00
|
|
|
|
2017-07-19 11:57:50 +02:00
|
|
|
let g:xml_syntax_folding=3
|
|
|
|
au FileType xml setlocal foldmethod=syntax
|
2017-07-20 11:39:04 +02:00
|
|
|
autocmd FileType xml set foldlevel=1
|
2017-07-19 11:57:50 +02:00
|
|
|
|
2017-07-13 10:06:09 +02:00
|
|
|
" vim-pandoc
|
2017-12-10 10:48:12 +01:00
|
|
|
" default languages grammar check
|
|
|
|
:let g:pandoc#spell#default_langs = ['fr', 'en']
|
2017-07-13 10:06:09 +02:00
|
|
|
|
|
|
|
" set C-l to :nohlsearch
|
|
|
|
nnoremap <silent> <C-l> :nohlsearch<CR><C-l>
|
|
|
|
|
2017-07-13 10:44:10 +02:00
|
|
|
" copy to clipboard with `"+y`
|
2017-07-13 10:06:09 +02:00
|
|
|
set clipboard+=unnamedplus
|
|
|
|
|
|
|
|
" airline
|
|
|
|
let g:airline_powerline_fonts = 1
|
|
|
|
|
|
|
|
" vim-table-mode
|
|
|
|
:let g:table_mode_corner='|'
|
2017-07-13 10:44:10 +02:00
|
|
|
|
|
|
|
" netrw, instead of NERDTree
|
|
|
|
let g:netrw_liststyle = 3
|
|
|
|
let g:netrw_banner = 0
|
2019-03-06 07:18:24 +01:00
|
|
|
let g:netrw_browse_split = 4
|
|
|
|
let g:netrw_altv = 1
|
|
|
|
let g:netrw_winsize = 20
|
|
|
|
" augroup ProjectDrawer
|
|
|
|
" autocmd!
|
|
|
|
" autocmd VimEnter * :Vexplore
|
|
|
|
" augroup END
|
2017-07-20 11:39:04 +02:00
|
|
|
|
|
|
|
" vim-json, don't conceal
|
|
|
|
let g:vim_json_syntax_conceal = 0
|
2017-12-10 10:48:12 +01:00
|
|
|
|
2017-12-11 06:27:23 +01:00
|
|
|
" ctrlP
|
|
|
|
" set the working directory
|
|
|
|
let g:ctrlp_working_path_mode = 'ra'
|
|
|
|
" enable caching
|
|
|
|
let g:ctrlp_use_caching = 1
|
|
|
|
let g:ctrlp_clear_cache_on_exit = 0
|
2019-03-06 07:18:24 +01:00
|
|
|
" enable autocomplete
|
|
|
|
autocmd BufEnter * call ncm2#enable_for_buffer()
|
|
|
|
set completeopt=noinsert,menuone,noselect
|
2017-12-11 06:27:23 +01:00
|
|
|
|
2017-12-10 10:48:12 +01:00
|
|
|
" plugins (vim-plug)
|
|
|
|
call plug#begin('~/.config/nvim/plugged')
|
|
|
|
Plug 'altercation/vim-colors-solarized'
|
|
|
|
Plug 'junegunn/goyo.vim', { 'on': 'Goyo' }
|
|
|
|
Plug 'vim-airline/vim-airline'
|
|
|
|
Plug 'vim-airline/vim-airline-themes'
|
2017-12-11 06:27:23 +01:00
|
|
|
Plug 'vim-pandoc/vim-pandoc'
|
|
|
|
Plug 'vim-pandoc/vim-pandoc-syntax'
|
|
|
|
Plug 'jiangmiao/auto-pairs'
|
2017-12-10 10:48:12 +01:00
|
|
|
Plug 'tpope/vim-surround'
|
|
|
|
Plug 'tpope/vim-unimpaired'
|
2017-12-11 06:27:23 +01:00
|
|
|
Plug 'tpope/vim-fugitive'
|
|
|
|
Plug 'tpope/vim-commentary'
|
|
|
|
Plug 'tpope/vim-sensible'
|
|
|
|
Plug 'vim-syntastic/syntastic'
|
|
|
|
Plug 'godlygeek/tabular'
|
|
|
|
Plug 'dhruvasagar/vim-table-mode', { 'on': 'TableModeEnable' }
|
|
|
|
Plug 'shime/vim-livedown', { 'on': 'LivedownPreview' }
|
|
|
|
Plug 'elzr/vim-json'
|
|
|
|
Plug 'osyo-manga/vim-over', { 'on': 'OverCommandLine' }
|
|
|
|
Plug 'Rykka/riv.vim'
|
|
|
|
Plug 'Rykka/InstantRst'
|
|
|
|
Plug 'davidhalter/jedi-vim' " warning, may conflicts with python-mode
|
|
|
|
Plug 'nvie/vim-flake8'
|
|
|
|
Plug 'kien/ctrlp.vim'
|
|
|
|
Plug 'scrooloose/nerdtree'
|
2018-10-19 09:08:27 +02:00
|
|
|
Plug 'Floobits/floobits-neovim'
|
2019-03-06 07:18:24 +01:00
|
|
|
Plug 'https://github.com/editorconfig/editorconfig-vim'
|
|
|
|
Plug 'ncm2/ncm2'
|
|
|
|
Plug 'roxma/nvim-yarp'
|
|
|
|
Plug 'ncm2/ncm2-bufword'
|
|
|
|
Plug 'Shougo/neco-syntax'
|
|
|
|
Plug 'ncm2/ncm2-syntax'
|
2017-12-10 10:48:12 +01:00
|
|
|
call plug#end()
|