Mes petits dotfiles tout mignon.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

125 lines
6.2 KiB

" Created: Sat 09 Jan 2021 11:11:19 AM CET
" Modified: Wed 27 Jan 2021 06:30:35 PM CET
"
"""""""""""""
" Plugins (vim-plug)
"""""""""""""
call plug#begin('~/.config/nvim/plugged')
""" Style
"Plug 'arcticicestudio/nord-vim' " Nord color scheme
Plug 'sonph/onehalf', { 'rtp': 'vim' } " onehalf color theme
Plug 'vim-scripts/timestamp.vim' " Add the date of creation/edition at the beginning of the file
Plug 'vim-airline/vim-airline' " Fancy bottom line in vim/neovim
Plug 'vim-airline/vim-airline-themes' " Themes for vim-airlines
Plug 'vim-pandoc/vim-pandoc' " Pandoc support
Plug 'vim-pandoc/vim-pandoc-syntax' " Markdown syntax support
Plug 'dpelle/vim-Grammalecte' " French ortho/grammar spelling
Plug 'tpope/vim-commentary' " Easy commenting
Plug 'tpope/vim-surround' " Surroundings
Plug 'scrooloose/nerdtree' " Side window files navigation
Plug 'Xuyuanp/nerdtree-git-plugin' " To see new or modified files in the nerdtree window
""" Auto completion
Plug 'Shougo/deoplete.nvim', { 'do': ':UpdateRemotePlugins' }
Plug 'zchee/deoplete-jedi' " source for python autocompletion
Plug 'Shougo/neco-syntax' " other sources for autocompletion
Plug 'davidhalter/jedi-vim' " Code jump
""" Search
Plug 'ctrlpvim/ctrlp.vim' " Search 'Ctrl+P' like
Plug 'junegunn/fzf', { 'do': { -> fzf#install() } } " Fuzzy search, ensure fzf is fresh installed
Plug 'stsewd/fzf-checkout.vim' " Fuzzy search in git branches
Plug 'junegunn/fzf.vim' " fzf for vim/neovim
call plug#end()
""" Airline
let g:airline_powerline_fonts=1
let g:airline#extensions#wordcount#filetypes='pandoc\|text\|' "Add support when pandoc is activated
let g:airline_theme='onehalflight'
""" Autocompletion
let g:deoplete#enable_at_startup=1 " start deoplete at startup
autocmd InsertLeave,CompleteDone * if pumvisible() == 0 | pclose | endif " Close suggestion window at completion
let g:jedi#completions_enabled=0 " disable autocompletion, cause we use deoplete for completion
let g:jedi#use_splits_not_buffers="right" " open the go-to function in split, not another buffer
"""""""""""""
" sets
"""""""""""""
set smartindent
set tabstop=2
"set expandtab
set softtabstop=2
set shiftwidth=2
set showcmd " Show (partial) command in status line
set showmode " Show indication of having changed modes
set showmatch " Show matching brackets
set ignorecase " Do case insensitive matching
set smartcase " Do smart case matching
set hlsearch " Highlight search
"let g:rg_highlight='true' " Activate ripgrep Highlighting
"nnoremap <silent> <C-l> :nohlsearch<CR><C-l> " set C-l to :nohlsearch
"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)
set linebreak " Line wrap
" set tw=79 " Lines longer than 79 chars will be wrapped
autocmd FileType gitcommit set textwidth=72 " Wrap lines longer than 72 chars for git messages
"set colorcolumn=+1 " Colors the tw+1 column
autocmd FileType gitcommit set colorcolumn+=51 " Add a colored column at 51 chars for git message titles
set number " Line numbering
"au TermOpen * setlocal listchars= nonumber norelativenumber " Start terminal buffer without line numbering
set cursorline " Color the cursor line
"set modeline " Support modelines
set clipboard+=unnamedplus " Copy to clipboard with +y
""" Spelling
set spell " Spelling activated
set spelllang=fr,en " by default for French, English
let g:grammalecte_cli_py='/usr/bin/grammalecte-cli' " Path for grammalecte-cli to get grammar check in French
""" Folding
set foldmethod=syntax
set foldlevel=5
" Default fold type for HTML
autocmd FileType html set tabstop=2
autocmd FileType html set softtabstop=2
autocmd FileType html set shiftwidth=2
" Default fold type for XML
let g:xml_syntax_folding=3
au FileType xml setlocal foldmethod=syntax
autocmd FileType xml set foldlevel=1
"""""""""""""
" Filetypes
"""""""""""""
" Filetype detection
filetype plugin on
" Format indentation
if has("autocmd")
filetype plugin indent on
endif
"""""""""""""
" Theme
"""""""""""""
syntax enable
colorscheme onehalflight