Rewrote vim config

This commit is contained in:
dbroqua 2020-06-19 08:03:11 +02:00
parent 2b21087fd4
commit 5564d44953
4 changed files with 129 additions and 29 deletions

View file

@ -1,11 +1,90 @@
set runtimepath+=~/.vim_runtime " VIM Configuration - DarKou
source ~/.vim_runtime/vimrcs/basic.vim " Cancel VI compatibility
source ~/.vim_runtime/vimrcs/filetypes.vim set nocompatible
source ~/.vim_runtime/vimrcs/plugins_config.vim
source ~/.vim_runtime/vimrcs/extended.vim
try " -- Vim-plug
source ~/.vim_runtime/my_configs.vim if empty(glob('~/.vim/autoload/plug.vim'))
catch silent !curl -fLo ~/.vim/autoload/plug.vim --create-dirs
endtry \ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
autocmd VimEnter * PlugInstall --sync | source $MYVIMRC
endif
call plug#begin('~/.vim/plugged')
Plug 'arcticicestudio/nord-vim'
Plug 'sjbach/lusty'
Plug 'kshenoy/vim-signature'
Plug 'w0rp/ale'
Plug 'ap/vim-css-color'
Plug 'mileszs/ack.vim'
Plug 'ctrlpvim/ctrlp.vim'
" Initialize plugin system
call plug#end()
" -- Display
colorscheme nord
set title
set number
set ruler
set wrap
set scrolloff=5
syntax enable
filetype on
filetype plugin on
filetype indent on
:highlight ExtraWhitespace ctermbg=red guibg=red
:match ExtraWhitespace /\s\+$/
" -- Search
set ignorecase
set smartcase
set incsearch
set hlsearch
" -- Ack search
let g:ackprg="ack -H --nocolor --nogroup --column"
nmap <leader>j mA:Ack<space>
nmap <leader>ja mA:Ack "<C-r>=expand("<cword>")<cr>"
nmap <leader>jA mA:Ack "<C-r>=expand("<cWORD>")<cr>"
" -- Ctrlp
let g:ctrlp_map='<leader>c'
" -- Beep
set visualbell
set noerrorbells
"
set backspace=indent,eol,start
" Hide file when open other file
set hidden
" Disable arrow keys
"map <left> <nop>
"map <down> <nop>
"map <up> <nop>
"map <right> <nop>
"imap <left> <nop>
"imap <down> <nop>
"imap <up> <nop>
"imap <right> <nop>
" Remap esc key
:imap <C-x> <Esc>
:map <C-x> <Esc>
" Code formating
set expandtab
set tabstop=2
set shiftwidth=2
let b:ale_linters = ['eslint']
let g:ale_fixers = {
\ 'javascript': ['eslint']
\ }
let g:ale_sign_error = '❌'
let g:ale_sign_warning = '⚠️'
let g:ale_fix_on_save = 1

View file

@ -1,29 +1,39 @@
syntax enable syntax enable
colorscheme nord colorscheme nord
" Annule la compatibilité avec Vi
set nocompatible
set colorcolumn=100 set colorcolumn=100
set number set number
" Afficher les commandes partielles
set showcmd
" Montrer le mode courant
set showmode
" toujours montrer la barre de status dans toutes les fenêtres
set laststatus=2
" whitespace characters
set list
" ne pas monter hightlight ()
let loaded_matchparen = 1
" highlight position curseur
set cursorline
" redraw only when needed
set lazyredraw
" MENU " Afficher les commandes partielles
"---------------- set showcmd
" Complete files like a shell
set wildmode=list:longest " Montrer le mode courant
" affiche menu de completion set showmode
set wildmenu
" toujours montrer la barre de status dans toutes les fenêtres
set laststatus=2
" whitespace characters
set list
" ne pas monter hightlight ()
let loaded_matchparen = 1
" highlight position curseur
set cursorline
" redraw only when needed
set lazyredraw
" MENU
"----------------
" Complete files like a shell
set wildmode=list:longest
" affiche menu de completion
set wildmenu
"----------------------------- "-----------------------------
" BEHAVIOUR " BEHAVIOUR

11
old/dotfiles/vimrc Normal file
View file

@ -0,0 +1,11 @@
set runtimepath+=~/.vim_runtime
source ~/.vim_runtime/vimrcs/basic.vim
source ~/.vim_runtime/vimrcs/filetypes.vim
source ~/.vim_runtime/vimrcs/plugins_config.vim
source ~/.vim_runtime/vimrcs/extended.vim
try
source ~/.vim_runtime/my_configs.vim
catch
endtry