vim: ajout [[ ]] pour ft=sh
This commit is contained in:
parent
fdfec75ab3
commit
b9cdc703f2
|
@ -311,10 +311,10 @@ let g:ollama_logfile = '/home/patrick/vim-ollama.log'
|
|||
" golang
|
||||
" require Vim 8.0.1453
|
||||
Plugin 'fatih/vim-go'
|
||||
au FileType go nmap <leader>m <Plug>(go-test)
|
||||
au FileType go nmap <leader>a :GoAlternate<cr>
|
||||
au FileType go nmap gd <Plug>(go-def)
|
||||
au FileType go set foldmethod=syntax
|
||||
autocmd FileType go nmap <leader>m <Plug>(go-test)
|
||||
autocmd FileType go nmap <leader>a :GoAlternate<cr>
|
||||
autocmd FileType go nmap gd <Plug>(go-def)
|
||||
autocmd FileType go set foldmethod=syntax
|
||||
|
||||
" :Refactor extract newfunc
|
||||
" Plugin 'godoctor/godoctor.vim'
|
||||
|
@ -364,9 +364,22 @@ imap <leader>tm <esc>:TableModeToggle<cr>i
|
|||
" \m to launch Shellcheck
|
||||
" gb to see SCxxx in browser
|
||||
Plugin 'itspriddle/vim-shellcheck'
|
||||
au FileType sh compiler shellcheck
|
||||
au FileType sh nmap <leader>m :ShellCheck!<cr>
|
||||
au FileType sh imap <leader>m <esc>:ShellCheck!<cr>i
|
||||
autocmd FileType sh compiler shellcheck
|
||||
autocmd FileType sh nmap <leader>m :ShellCheck!<cr>
|
||||
autocmd 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
|
||||
call vundle#end() " required
|
||||
|
@ -383,9 +396,15 @@ filetype plugin indent on " required
|
|||
" syntax
|
||||
syntax on
|
||||
|
||||
" COLORS
|
||||
" use GUI colors for the terminal
|
||||
set termguicolors
|
||||
" colorscheme default
|
||||
set background=dark
|
||||
" colorscheme PaperColor
|
||||
colorscheme pcht
|
||||
|
||||
|
||||
" print code with :hardcopy using impression.lam.jussieu.fr
|
||||
" set printdevice=hp5550-509
|
||||
" set printoptions=left:5pt,right:5pt,top:5pt,bottom:5pt,number:y,duplex:off,wrap:y,paper:A4,portrait:y
|
||||
|
@ -566,7 +585,7 @@ map <C-right> <esc>:tabnext<cr>
|
|||
|
||||
setlocal spell spelllang=fr,en
|
||||
" setlocal spell spelllang=en_us,fr
|
||||
set spell
|
||||
" set nospell
|
||||
highlight SpellBad term=underline ctermfg=white 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
|
||||
|
@ -621,15 +640,36 @@ autocmd BufRead * silent! call LoadTemplate('%:e','notall')
|
|||
" endif
|
||||
|
||||
" CISCO ACL
|
||||
augroup filetype
|
||||
au! BufRead,BufNewFile *.crules set filetype=ciscoacl
|
||||
au! BufRead,BufNewFile *.acl set filetype=ciscoacl
|
||||
augroup ciscofiles
|
||||
autocmd BufRead,BufNewFile *.crules setlocal filetype=ciscoacl
|
||||
autocmd BufRead,BufNewFile *.acl setlocal filetype=ciscoacl
|
||||
augroup END
|
||||
|
||||
" markdown syntax for gitit
|
||||
augroup filetype
|
||||
au! BufRead,BufNewFile *.page set filetype=markdown
|
||||
au! BufRead,BufNewFile *.md set filetype=markdown
|
||||
augroup markdownfiles
|
||||
autocmd BufRead,BufNewFile *.page setlocal filetype=markdown
|
||||
autocmd BufRead,BufNewFile *.md setlocal 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
|
||||
|
||||
|
||||
|
@ -718,10 +758,10 @@ nmap <leader>V :source ~/.vimrc<cr>
|
|||
imap <leader>s <esc>:!see %<cr>i
|
||||
nmap <leader>s :!see %<cr>
|
||||
" html + php
|
||||
" nmap <leader>h :set ft=html<cr>
|
||||
" imap <leader>h <esc>:set ft=html<cr>i
|
||||
" nmap <leader>p :set ft=php<cr>
|
||||
" imap <leader>p <esc>:set ft=php<cr>i
|
||||
" nmap <leader>h :setlocal ft=html<cr>
|
||||
" imap <leader>h <esc>:setlocal ft=html<cr>i
|
||||
" nmap <leader>p :setlocal ft=php<cr>
|
||||
" imap <leader>p <esc>:setlocal ft=php<cr>i
|
||||
" make
|
||||
nmap <leader>m :w<cr>:!clear<cr>:make<cr>
|
||||
imap <leader>m <esc>:w<cr>:!clear<cr>:make<cr>
|
||||
|
|
Loading…
Reference in New Issue