ajout logo + ajout mode fenetre

This commit is contained in:
bastien 2024-06-24 16:07:05 +02:00
parent 89c4922bfa
commit 270d4472e0
3 changed files with 147 additions and 12 deletions

View file

@ -1,3 +1,6 @@
![Vimscode](/pictures/vimscode.jpg)
## Sommaire
- [Pourquoi VimsCode](#pourquoi-vimscode)

BIN
pictures/vimscode.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 91 KiB

View file

@ -22,6 +22,8 @@ Plugin 'liuchengxu/vim-which-key'
Plugin 'mhinz/vim-startify'
Plugin 'junegunn/fzf'
Plugin 'junegunn/fzf.vim'
Plugin 'romgrk/winteract.vim'
Plugin 'kien/rainbow_parentheses.vim'
call vundle#end() " required
filetype plugin indent on " required
@ -44,6 +46,7 @@ set hlsearch
set mouse=a
set expandtab
set tabstop=2
let mapleader = ";"
" Configurer Airline
set laststatus=2
@ -105,6 +108,9 @@ set number relativenumber
"Theme vim
colorscheme space-vim-dark
"Active ou désactive la surbillance de la recherche
nnoremap <leader>n :nohlsearch<CR>
"Permet la sauvegarde automatique de l'historique...
set undofile
set undodir=~/.vim/
@ -122,6 +128,7 @@ nnoremap <F3> :NERDTreeToggle<CR>
nnoremap <F4> :UndotreeToggle<CR>:wincmd p<CR>
"Raccourci terminal
nnoremap <S-n> :vertical term<CR>
nnoremap <F5> :call OpenResizableTerminals(input('Taille du terminal : ', '10'))<CR>
tnoremap <F6> <c-w>N
@ -147,6 +154,34 @@ au VimEnter *.cpp :call OpenResizableTerminals(input('Taille du terminal : ', '1
au VimEnter *.ino :NERDTreeToggle
au VimEnter *.ino :call OpenResizableTerminals(input('Taille du terminal : ', '10'))
" Parametre des couleurs pour les parentheses...
let g:rbpt_colorpairs = [
\ ['brown', 'RoyalBlue3'],
\ ['Darkblue', 'SeaGreen3'],
\ ['darkgray', 'DarkOrchid3'],
\ ['darkgreen', 'firebrick3'],
\ ['darkcyan', 'RoyalBlue3'],
\ ['darkred', 'SeaGreen3'],
\ ['darkmagenta', 'DarkOrchid3'],
\ ['brown', 'firebrick3'],
\ ['gray', 'RoyalBlue3'],
\ ['black', 'SeaGreen3'],
\ ['darkmagenta', 'DarkOrchid3'],
\ ['Darkblue', 'firebrick3'],
\ ['darkgreen', 'RoyalBlue3'],
\ ['darkcyan', 'SeaGreen3'],
\ ['darkred', 'DarkOrchid3'],
\ ['red', 'firebrick3'],
\ ]
let g:rbpt_max = 16
let g:rbpt_loadcmd_toggle = 0
au VimEnter * RainbowParenthesesToggle
au Syntax * RainbowParenthesesLoadRound
au Syntax * RainbowParenthesesLoadSquare
au Syntax * RainbowParenthesesLoadBraces
" Exécuter la commande :PluginUpdate en arrière-plan chaque fois que Vim est ouvert
au VimEnter * silent! execute ':PluginUpdate | redraw!'
@ -189,10 +224,83 @@ function! OpenFileInNewTab()
endif
endfunction
" Configuration pour les touches en mode interaction
nmap g :InteractiveWindow<CR>
function! InitWinmap()
let g:winmap = {}
let g:winmap.normal = {
\ "h": "normal! \<C-w><" , "=": "normal! \<C-w>=" ,
\ "j": "normal! \<C-w>-" , "f": "normal! \<C-w>_" ,
\ "k": "normal! \<C-w>+" , "F": "normal! \<C-w>|" ,
\ "l": "normal! \<C-w>>" , "o": "normal! \<C-w>o" ,
\
\ "|": "exe g:winmode.count.'wincmd |'",
\ "\\": "exe g:winmode.count.'wincmd _'",
\ "&": "normal! :\<C-r>=&tw\<CR>wincmd |\<CR>" ,
\
\ "\<A-h>": "normal! \<C-w>h" , "H": "normal! \<C-w>H" ,
\ "\<A-j>": "normal! \<C-w>j" , "J": "normal! \<C-w>J" ,
\ "\<A-k>": "normal! \<C-w>k" , "K": "normal! \<C-w>K" ,
\ "\<A-l>": "normal! \<C-w>l" , "L": "normal! \<C-w>L" ,
\
\ "x": "normal! \<C-w>c" , "n": "normal! :bn\<CR>" ,
\ "c": "normal! \<C-w>c" , "p": "normal! :bp\<CR>" ,
\ "s": "normal! \<C-w>s" , "\<TAB>": "normal! :bn\<CR>" ,
\ "v": "normal! \<C-w>v" , "\<S-TAB>": "normal! :bp\<CR>" ,
\
\ "w": "normal! \<C-w>w" , "\<A-w>": "normal! \<C-w>p" ,
\ "W": "normal! \<C-w>W" ,
\ "q": "normal! :copen\<CR>" ,
\
\ "m": "let g:winmode.submode='move'" ,
\ ":": "let g:winmode.submode='set'" ,
\ "t": "let g:winmode.submode='tab'" ,
\
\ "d": "bdelete" ,
\ ";": "terminal" ,
\
\ "\<ESC>": "let exitwin=1" ,
\ "\<CR>": "let exitwin=1" ,
\}
let g:winmap.move = {
\ "h": "normal! \<C-w>H" ,
\ "j": "normal! \<C-w>J" ,
\ "k": "normal! \<C-w>K" ,
\ "l": "normal! \<C-w>L" ,
\ "x": "normal! \<C-w>x" ,
\ "r": "normal! \<C-w>r" ,
\ "\<ESC>": "\" NOP" ,
\ }
let g:winmap.set = {
\ "w": "exe g:winmode.count.'wincmd |'",
\ "h": "exe g:winmode.count.'wincmd _'",
\ "W": "wincmd |",
\ "H": "wincmd _",
\ "\<ESC>": "let resetmode=1" ,
\ }
let g:winmap.tab = {
\ "o": "tab sview %" ,
\ "e": "tabnew" ,
\ "x": "tabclose" ,
\ "n": "tabnext" ,
\ "p": "tabprevious" ,
\
\ "w": "let g:winmode.submode='normal'" ,
\ "\<ESC>": "let exitwin=1" ,
\ }
endfunction
" Configuration de la page d'accueil vim
let g:startify_lists = [
\ {'type': 'files', 'header': ['Fichiers récents']},
\ ]
let g:startify_custom_header =
\ startify#center(split(system('figlet -w 100 VIMSCODE'), '\n'))
@ -206,15 +314,26 @@ let g:which_key_map = {
\ '<F3>' : ['<F3>' , 'fait apparaitre l arborescence'] ,
\ '<F4>' : ['<F4>' , 'historique de modification'] ,
\ '<F5>' : ['<F5>' , 'fait apparaitre un terminal'] ,
\ '<F5> souris' : ['' , 'redimensionnable avec la souris'] ,
\ '<F6>' : ['' , 'scroll dans le terminal'] ,
\ '<F7>' : ['<F7>' , 'fait apparaitre un site aide'] ,
\ '<F8>' : ['<F8>' , 'créer/ouvre une nouvel fenetre'] ,
\ '<F8>' : ['<F8>' , 'créer/ouvre une nouvelle fenetre'] ,
\ '<F9>' : ['<<F9>' , 'change de fenetre'] ,
\ '<F10>' : ['<F10>' , 'ferme VimsCode'] ,
\ 'Ctrl-a' : ['<c-a>' , 'divise en deux vim'] ,
\ 'Ctrl-a' : ['<c-a>' , 'divise en deux vim verticalement'] ,
\ 'Shift-n' : ['<S-n>' , 'divise en deux vim horizontalement'] ,
\ '²' : ['²' , 'affiche les greffons'] ,
\ ';-n' : ['<leader>n', 'Enleve la surbrillance de la recherche'] ,
\ }
let g:which_key_map.f = {
\ 'name' : 'Raccourcis FZF' ,
\ 'Ctrl-p' : ['<c-p>' , 'active la recherche FZF'] ,
\ 'Shift-f' : ['<S-f>' , 'marche pas'] ,
\ 'Shift-b' : ['<S-b>' , 'active la recherche buffers'] ,
\ 'Shift-m' : ['<S-m>' , 'active la recherche marque page'] ,
\ 'Shift-t' : ['<S-t>' , 'active la recherche tags'] ,
\ }
let g:which_key_map.a = {
\ 'name' : 'Raccourcis Vim' ,
\ 'Ctrl-w-w' : ['<C-W>w' , 'other-window'] ,
@ -230,3 +349,16 @@ let g:which_key_map.a = {
\ 'Ctrl-w-=' : ['<C-W>=' , 'balance-window'] ,
\ }
let g:which_key_map.g = {
\ 'name' : 'Mode fenetre' ,
\ 'h/j/k/l' : ['' , 'rezise'] ,
\ 'f/F' : ['' , 'plein ecran'] ,
\ 'o' : ['' , 'plein ecran et ferme le reste'] ,
\ '=' : ['' , 'egalise'] ,
\ 's/v' : ['' , 'divise verticalement/horizontalement'] ,
\ 'w/W' : ['' , 'change le focus'] ,
\ 'H/J/K/L' : ['' , 'deplace les fenetres'] ,
\ 'n/p' : ['' , 'change le buffer'] ,
\ 'echap' : ['' , 'quitte le mode'] ,
\ }