Compare commits

..

No commits in common. "cb122db07e86cb1aa533c5db188d0c8aa476ad81" and "a6e1f7edf6fb98a7870fe844121cb47d4d2de2ab" have entirely different histories.

3 changed files with 19 additions and 61 deletions

View File

@ -26,5 +26,3 @@
tool = vimdiff1 tool = vimdiff1
[push] [push]
followTags = true followTags = true
[init]
defaultBranch = main

View File

@ -311,10 +311,10 @@ let g:ollama_logfile = '/home/patrick/vim-ollama.log'
" golang " golang
" require Vim 8.0.1453 " require Vim 8.0.1453
Plugin 'fatih/vim-go' Plugin 'fatih/vim-go'
autocmd FileType go nmap <leader>m <Plug>(go-test) au FileType go nmap <leader>m <Plug>(go-test)
autocmd FileType go nmap <leader>a :GoAlternate<cr> au FileType go nmap <leader>a :GoAlternate<cr>
autocmd FileType go nmap gd <Plug>(go-def) au FileType go nmap gd <Plug>(go-def)
autocmd FileType go set foldmethod=syntax au FileType go set foldmethod=syntax
" :Refactor extract newfunc " :Refactor extract newfunc
" Plugin 'godoctor/godoctor.vim' " Plugin 'godoctor/godoctor.vim'
@ -364,22 +364,9 @@ imap <leader>tm <esc>:TableModeToggle<cr>i
" \m to launch Shellcheck " \m to launch Shellcheck
" gb to see SCxxx in browser " gb to see SCxxx in browser
Plugin 'itspriddle/vim-shellcheck' Plugin 'itspriddle/vim-shellcheck'
autocmd FileType sh compiler shellcheck au FileType sh compiler shellcheck
autocmd FileType sh nmap <leader>m :ShellCheck!<cr> au FileType sh nmap <leader>m :ShellCheck!<cr>
autocmd FileType sh imap <leader>m <esc>:ShellCheck!<cr>i au FileType sh imap <leader>m <esc>:ShellCheck!<cr>i
" _\|/_
" (o o)
" <~~~~~~oOO-{_}-OOo~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~>
" | |
" | colorscheme papercolor |
" | |
" <~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~>
" (_) (_)
Plugin 'NLKNguyen/papercolor-theme'
" All of your Plugins must be added before the following line " All of your Plugins must be added before the following line
call vundle#end() " required call vundle#end() " required
@ -396,15 +383,9 @@ filetype plugin indent on " required
" syntax " syntax
syntax on syntax on
" COLORS
" use GUI colors for the terminal
set termguicolors
" colorscheme default " colorscheme default
set background=dark
" colorscheme PaperColor
colorscheme pcht colorscheme pcht
" print code with :hardcopy using impression.lam.jussieu.fr " print code with :hardcopy using impression.lam.jussieu.fr
" set printdevice=hp5550-509 " set printdevice=hp5550-509
" set printoptions=left:5pt,right:5pt,top:5pt,bottom:5pt,number:y,duplex:off,wrap:y,paper:A4,portrait:y " set printoptions=left:5pt,right:5pt,top:5pt,bottom:5pt,number:y,duplex:off,wrap:y,paper:A4,portrait:y
@ -585,7 +566,7 @@ map <C-right> <esc>:tabnext<cr>
setlocal spell spelllang=fr,en setlocal spell spelllang=fr,en
" setlocal spell spelllang=en_us,fr " setlocal spell spelllang=en_us,fr
" set nospell set spell
highlight SpellBad term=underline ctermfg=white ctermbg=red cterm=underline highlight SpellBad term=underline ctermfg=white ctermbg=red cterm=underline
highlight SpellCap term=italic,underline ctermfg=yellow ctermbg=red cterm=underline highlight SpellCap term=italic,underline ctermfg=yellow ctermbg=red cterm=underline
highlight SpellRare term=bold,italic,underline ctermfg=cyan ctermbg=red cterm=underline highlight SpellRare term=bold,italic,underline ctermfg=cyan ctermbg=red cterm=underline
@ -640,36 +621,15 @@ autocmd BufRead * silent! call LoadTemplate('%:e','notall')
" endif " endif
" CISCO ACL " CISCO ACL
augroup ciscofiles augroup filetype
autocmd BufRead,BufNewFile *.crules setlocal filetype=ciscoacl au! BufRead,BufNewFile *.crules set filetype=ciscoacl
autocmd BufRead,BufNewFile *.acl setlocal filetype=ciscoacl au! BufRead,BufNewFile *.acl set filetype=ciscoacl
augroup END augroup END
" markdown syntax for gitit " markdown syntax for gitit
augroup markdownfiles augroup filetype
autocmd BufRead,BufNewFile *.page setlocal filetype=markdown au! BufRead,BufNewFile *.page set filetype=markdown
autocmd BufRead,BufNewFile *.md setlocal filetype=markdown au! BufRead,BufNewFile *.md set filetype=markdown
augroup END
" HTML
augroup htmlfiles
autocmd BufRead,BufNewFile *.html setlocal filetype=html
" format all file with tidy
autocmd FileType html nmap <buffer> <leader>tidy :%!tidy -config ~/.vim/ftplugin/tidyrc_html.txt<CR>
augroup END
" shell
augroup shellfiles
autocmd BufRead,BufNewFile *.sh setlocal filetype=bash
" FIXME ne fonctionne plus sous vim 9.1
" autocmd FileType sh setlocal sections=^function,^\w\+\s*()
" FIXME \| ou <bar> ne fonctionne pas
" nnoremap <silent> ]] /^function\|^\w\+\s*()<CR>
nnoremap <silent> ]] /^function <CR>
nnoremap <silent> ]<space> /\w\+\s*()<CR>
nnoremap <silent> [[ k?function <CR>
nnoremap <silent> [<space> k?\w\+\s*()<CR>
augroup END augroup END
@ -758,10 +718,10 @@ nmap <leader>V :source ~/.vimrc<cr>
imap <leader>s <esc>:!see %<cr>i imap <leader>s <esc>:!see %<cr>i
nmap <leader>s :!see %<cr> nmap <leader>s :!see %<cr>
" html + php " html + php
" nmap <leader>h :setlocal ft=html<cr> " nmap <leader>h :set ft=html<cr>
" imap <leader>h <esc>:setlocal ft=html<cr>i " imap <leader>h <esc>:set ft=html<cr>i
" nmap <leader>p :setlocal ft=php<cr> " nmap <leader>p :set ft=php<cr>
" imap <leader>p <esc>:setlocal ft=php<cr>i " imap <leader>p <esc>:set ft=php<cr>i
" make " make
nmap <leader>m :w<cr>:!clear<cr>:make<cr> nmap <leader>m :w<cr>:!clear<cr>:make<cr>
imap <leader>m <esc>:w<cr>:!clear<cr>:make<cr> imap <leader>m <esc>:w<cr>:!clear<cr>:make<cr>

2
config
View File

@ -10,7 +10,7 @@ goto-next-feed no
# use macro with <,> + <macro> # use macro with <,> + <macro>
# from https://wiki.archlinux.org/index.php/Newsboat # from https://wiki.archlinux.org/index.php/Newsboat
macro v set browser "tsp mpv %u" ; open-in-browser ; set browser urlportal.sh -- "open video with mpv/tsp" macro v set browser "tsp mpv %u" ; open-in-browser ; set browser urlportal.sh -- "open video with mpv/tsp"
macro c set browser "google-chrome-stable %u"; open-in-browser ; set browser urlportal.sh -- "open with google chrome" macro c set browser "google-chrome %u"; open-in-browser ; set browser urlportal.sh -- "open with google chrome"
macro b set browser "browsh --startup-url %u"; open-in-browser ; set browser urlportal.sh -- "open with browsh" macro b set browser "browsh --startup-url %u"; open-in-browser ; set browser urlportal.sh -- "open with browsh"
color background white black color background white black