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

Generate module name from file path #10

Merged
merged 1 commit into from
Feb 8, 2020

Conversation

marocchino
Copy link
Contributor

${TM_DIRECTORY/(^.+\\\/test|\\b)\\\/(\\w+)/${1:? :.}${2:/pascalcase}/g}

When TM_DIRECTORY was '~/Document/some_project/test/some_long/path', it translate to ' SomeLong.Path'. (note that it has first space I can not reduce it 😓 )

${TM_FILENAME_BASE/(.+)_test/${1:/pascalcase}/}
When filename was some_module_test it translate to SomeModule

`${TM_DIRECTORY/(^.+\\\/test|\\b)\\\/(\\w+)/${1:? :.}${2:/pascalcase}/g}`

When TM_DIRECTORY was '~/Document/some_project/test/some_long/path', it translate to ' SomeLong.Path'. (note that it has first space I can not reduce it 😓 )

`${TM_FILENAME_BASE/(.+)_test/${1:/pascalcase}/}`
When filename was some_module_test it translate to SomeModule
@florinpatrascu florinpatrascu merged commit 5f428f3 into florinpatrascu:master Feb 8, 2020
@florinpatrascu
Copy link
Owner

Thank you!!!

@marocchino marocchino deleted the patch-1 branch February 9, 2020 04:07
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

Successfully merging this pull request may close these issues.

2 participants