1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-01-23 17:30:04 +08:00

feat(snippet): add SPC x s s to edit snippet

This commit is contained in:
wsdjeg 2022-05-09 23:21:35 +08:00
parent a1a644d1d0
commit 2b17afeaac
3 changed files with 12 additions and 1 deletions

View File

@ -221,6 +221,9 @@ function! SpaceVim#layers#autocomplete#config() abort
call SpaceVim#logger#warn('Can not use same value for escape_key_binding and auto_completion_complete_with_key_sequence') call SpaceVim#logger#warn('Can not use same value for escape_key_binding and auto_completion_complete_with_key_sequence')
endif endif
endif endif
let g:_spacevim_mappings_space.x = {'name' : '+Text'}
let g:_spacevim_mappings_space.x.s = {'name' : '+String/Snippet'}
call SpaceVim#mapping#space#def('nnoremap', ['x', 's', 's'], 'NeoSnippetEdit', 'edit-snippet-file', 1)
endfunction endfunction
function! SpaceVim#layers#autocomplete#set_variable(var) abort function! SpaceVim#layers#autocomplete#set_variable(var) abort

View File

@ -268,7 +268,7 @@ function! SpaceVim#layers#edit#config() abort
" word " word
let g:_spacevim_mappings_space.x.w = {'name' : '+Word'} let g:_spacevim_mappings_space.x.w = {'name' : '+Word'}
call SpaceVim#mapping#space#def('vnoremap', ['x', 'w', 'c'], 'normal! ' . ":'<,'>s/\\\w\\+//gn" . "\<cr>", 'count the words in the select region', 1) call SpaceVim#mapping#space#def('vnoremap', ['x', 'w', 'c'], 'normal! ' . ":'<,'>s/\\\w\\+//gn" . "\<cr>", 'count the words in the select region', 1)
let g:_spacevim_mappings_space.x.s = {'name' : '+String'} let g:_spacevim_mappings_space.x.s = {'name' : '+String/Snippet'}
call SpaceVim#mapping#space#def('nnoremap', ['x', 's', 'j'], 'call call(' call SpaceVim#mapping#space#def('nnoremap', ['x', 's', 'j'], 'call call('
\ . string(s:_function('s:join_string_with')) . ', [])', \ . string(s:_function('s:join_string_with')) . ', [])',
\ 'join-string-with', 1) \ 'join-string-with', 1)

View File

@ -28,3 +28,11 @@ function! SpaceVim#layers#framework#django#health() abort
call SpaceVim#layers#framework#django#plugins() call SpaceVim#layers#framework#django#plugins()
return 1 return 1
endfunction endfunction
" @todo add code formatter and linter for htmldjango
" https://code.djangoproject.com/wiki/UsingVimWithDjango
" https://github.com/yaegassy/coc-htmldjango
" https://github.com/rtts/djhtml
" https://github.com/Riverside-Healthcare/djlint
" https://stackoverflow.com/questions/42170561/vscode-html-autoformat-on-django-template
" https://www.reddit.com/r/django/comments/fnzrxv/is_there_an_autoformatter_plugin_for_vs_code_that/