Skip to content

Conversation

urbantumbleweed
Copy link
Contributor

What's this PR do?

Adds functionality to automatically add directives into new files.

What are the important parts of the code?

Adds a directive builder function that takes a board type and language. When a newFIle is created the directive builder sets the contents of the temp file and the value in the document to the directive. Once the directive is inserted and the editor is focused, there is a call to move the cursor to the end of the document.

How should this be tested by the reviewer?

Download branch, launch editor and create new files. Notice that the cursor position is placed below the directive to begin coding immediately. Notice that on navigating away you are prompted to save.

What are the relevant tickets? (Please add closes, refs, etc)

closes #253

Screenshots (if appropriate)

screen shot 2015-09-11 at 12 39 38 pm

phated added a commit that referenced this pull request Sep 14, 2015
add directive builder function and modify newFile handler
@phated phated merged commit 642a181 into master Sep 14, 2015
@phated phated deleted the add-stamp-directives branch September 14, 2015 21:36
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.

New files get default directives
2 participants