Compare commits

..

3 Commits

Author SHA1 Message Date
e7c411ec77 Minor changes 2023-10-27 10:12:00 +02:00
0332c28b85 Configure SwapIt 2023-10-27 10:11:43 +02:00
a58031863e Enable swapping commentstrings between HTML and GLSL shaders 2023-10-27 10:10:39 +02:00
2 changed files with 30 additions and 2 deletions

View File

@ -813,6 +813,13 @@ augroup CustomCommentDefinitions
setlocal commentstring=\/\/\ %s setlocal commentstring=\/\/\ %s
endif endif
endif endif
if &ft == 'html'
if join(syntaxGroups, ',') =~ 'ShaderScript'
setlocal commentstring=\/\/\ %s
elseif join(syntaxGroups, ',') =~ 'html'
setlocal commentstring=<!--\ %s\ -->
endif
endif
endfunction endfunction
autocmd! autocmd!
@ -826,7 +833,7 @@ augroup CustomCommentDefinitions
autocmd FileType dot setlocal commentstring=\/\/\ %s autocmd FileType dot setlocal commentstring=\/\/\ %s
autocmd FileType markdown setlocal commentstring=<!---\ %s\ --> autocmd FileType markdown setlocal commentstring=<!---\ %s\ -->
autocmd FileType html.epl setlocal commentstring=%#\ %s autocmd FileType html.epl setlocal commentstring=%#\ %s
autocmd FileType vue execute 'autocmd CustomCommentDefinitions CursorMoved <buffer> :call SetCommentString()' autocmd FileType vue,html execute 'autocmd CustomCommentDefinitions CursorMoved <buffer> :call SetCommentString()'
" autocmd CursorMoved * :call SetCommentString() " autocmd CursorMoved * :call SetCommentString()
augroup END augroup END
@ -954,6 +961,7 @@ augroup END
\ "\\lc": "\\operatorname*{lc}", \ "\\lc": "\\operatorname*{lc}",
\ "\\quo": "\\operatorname*{quo}", \ "\\quo": "\\operatorname*{quo}",
\ "\\rem": "\\operatorname*{rem}", \ "\\rem": "\\operatorname*{rem}",
\ "\\conv": "\\operatorname*{conv}",
\ }, \ },
\ }, \ },
\ 'uml': {}, \ 'uml': {},
@ -1042,7 +1050,7 @@ augroup END
" Julia {{ " Julia {{
augroup julia augroup julia
au FileType julia nnoremap <buffer> <Leader>ll :w <CR> :!julia %:p<CR> au FileType julia nnoremap <buffer> <Leader>ll :w <CR> :!time julia %:p<CR>
augroup END augroup END
" }} " }}
@ -1135,6 +1143,26 @@ nnoremap <Space> :nohl<CR>
nmap <Plug>SwapItFallbackDecrement <Plug>SpeedDatingDown nmap <Plug>SwapItFallbackDecrement <Plug>SpeedDatingDown
vmap <Plug>SwapItFallbackIncrement <Plug>SpeedDatingUp vmap <Plug>SwapItFallbackIncrement <Plug>SpeedDatingUp
vmap <Plug>SwapItFallbackDecrement <Plug>SpeedDatingDown vmap <Plug>SwapItFallbackDecrement <Plug>SpeedDatingDown
augroup swapit
autocmd!
autocmd FileType * :ClearSwapList
autocmd FileType * let b:swap_completefunc = ''
autocmd FileType tex :SwapList font_sizes tiny scriptsize footnotesize small normalsize large Large LARGE huge Huge
autocmd FileType tex :SwapList sectioning part chapter section subsection subsubsection paragraph subparagraph
autocmd BufEnter * let g:default_swap_list = [
\ {'name':'yes/no', 'options': ['yes','no']},
\ {'name':'Yes/No', 'options': ['Yes','No']},
\ {'name':'True/False', 'options': ['True','False']},
\ {'name':'true/false', 'options': ['true','false']},
\ {'name':'AND/OR', 'options': ['AND','OR']},
\ {'name':'On/Off', 'options': ['On','Off']},
\ {'name':'on/off', 'options': ['on','off']},
\ {'name':'ON/OFF', 'options': ['ON','OFF']},
\ {'name':'boolean_operator', 'options': ['&&','||']},
\ {'name':'weekday', 'options': ['Sunday','Monday', 'Tuesday', 'Wednesday','Thursday', 'Friday', 'Saturday']},
\ ]
augroup END
" }} " }}
function! InsertSnip(snip_name) function! InsertSnip(snip_name)

0
install_configfiles.sh Executable file → Normal file
View File