Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitd9d3c2d

Browse files
authored
Add VSNIP_CAMELCASE_FILENAME variable (#198)
1 parenta1d1841 commitd9d3c2d

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

‎autoload/vsnip/variable.vim‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,3 +176,9 @@ function! s:VIM(context) abort
176176
endfunction
177177
callvsnip#variable#register('VIM',function('s:VIM'))
178178

179+
function!s:VSNIP_CAMELCASE_FILENAME(context)abort
180+
letl:basename=substitute(expand('%:p:t'),'^\@<!\..*$','','')
181+
returnsubstitute(l:basename,'\(\%(\<\l\+\)\%(_\)\@=\)\|_\(\l\)','\u\1\2','g')
182+
endfunction
183+
callvsnip#variable#register('VSNIP_CAMELCASE_FILENAME',function('s:VSNIP_CAMELCASE_FILENAME'))
184+

‎doc/vsnip.txt‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -218,6 +218,7 @@ For inserting line or block comments, honoring the current language:
218218

219219
In addition, vsnip provides the below custom variables too.
220220

221+
`VSNIP_CAMELCASE_FILENAME` The filename of the current document without its extensions in CamelCase format
221222

222223
${VIM:...Vim script expression...}~
223224

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp