Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How can make the trigger_word as argument to python? #1470

Open
hwypengsir opened this issue Nov 23, 2022 · 0 comments
Open

How can make the trigger_word as argument to python? #1470

hwypengsir opened this issue Nov 23, 2022 · 0 comments

Comments

@hwypengsir
Copy link

The syntax of UltiSnips's snippet is as below:

snippet trigger_word [ "description" [ options ] ]

The upper method can convert all characters in the string into upper case:

"string".upper()
'STRING'

I want to write a small snippets to convert the trigger_word into it's upper case in html file.Add the below lines in vim-snippets/UltiSnips\html.snippets.

snippet string
`!p snip.rv="string".upper()`
endsnippet

string can expand into STRING when to edit html file,how can make any other string be expanded into it's uppercase status?For example,otherstring expanded into OTHERSTRING?If i get the way to get trigger_word as a variable ,then it's simple to convert in calling python.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant