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

Set the cursor in a specific line when creating a file #51

Open
dann1 opened this issue Apr 24, 2018 · 2 comments
Open

Set the cursor in a specific line when creating a file #51

dann1 opened this issue Apr 24, 2018 · 2 comments

Comments

@dann1
Copy link

dann1 commented Apr 24, 2018

I have a file template with #!/usr/bin/python on the first line. I would like when opening the file to have the cursor on a specific line. With sublime text's advanced new file I was able to do this with:

"file_templates": {
		"py": "#!/usr/bin/python2\n\n",
		"sh": "#!/bin/bash\n\n",
                "fish": "#!/usr/bin/fish\n\n"
    },
@dkundel
Copy link
Owner

dkundel commented Apr 26, 2018

That sounds like a good idea. I don't have time to implement this at the moment but if you would be interested in implementing this and submitting a PR I would be excited to merge it.

Cheers,
Dominik

@Telokis
Copy link
Collaborator

Telokis commented May 13, 2018

Are we supporting file templates? Or is it something handled by another extension? @dann1
With the config you provided does Sublime text put your cursor at the end of the file or can you tell it to put it wherever you want?

Edit: Alright, after looking inside the code I noticed that we have kind of a skeleton for templates.
It's not documented, though.

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

3 participants