Browse Source

Updating snippet information

pull/2/head
Ryan Reed 3 years ago
parent
commit
9373d75ab2
3 changed files with 10 additions and 1 deletions
  1. +2
    -0
      dot_vim/README.md
  2. +7
    -1
      dot_vim/UltiSnips/python.snippets
  3. +1
    -0
      dot_vim/vimrc

+ 2
- 0
dot_vim/README.md View File

@ -146,6 +146,8 @@ A more in depth example:
You can edit the snippets for the current filetype that's open by using `:UltiSnipsEdit`
After making any changes to the snippets, run `:call UltiSnips#RefreshSnippets()` to refresh the snippets
**Important Note**: If using chezmoi, make sure to copy the snippet to the chezmoi repo so it isn't overwritten during next `chezmoi apply`


+ 7
- 1
dot_vim/UltiSnips/python.snippets View File

@ -1,4 +1,10 @@
snippet dataclass "Create a dataclass"
@dataclass
class ${1:MyClass}:
${0}
endsnippet
snippet forkey "Enumerate an iterable for key/value pair"
for ${1:key}, ${2:value} in enumerate(${3}):
pass
pass
endsnippet

+ 1
- 0
dot_vim/vimrc View File

@ -101,6 +101,7 @@
let g:UltiSnipsListSnippets="<c-l>" " list all snippets for current filetype
let g:UltiSnipsJumpForwardTrigger="<c-j>"
let g:UltiSnipsJumpBackwardTrigger="<c-k>"
let g:UltiSnipsEditSplit="context" " Split horizontally or vertically with the custom snippets
" Plugin - vim-surround
" This allows for surrounding test with something


Loading…
Cancel
Save