Commit 06700d4f authored by Ian Dennis Miller's avatar Ian Dennis Miller

st3 can remove data entry marks too, archiving vscode replacements, update...

st3 can remove data entry marks too, archiving vscode replacements, update documentation for editor support
parent 463bf162
......@@ -19,7 +19,7 @@ test:
# DEBUGVISFACT=T bin/ build/config.yaml
DEBUGVISFACT=T bin/ example/visfact.yaml
cp -v snippets/sublime-text-3/* ~/Library/Application\ Support/Sublime\ Text\ 3/Packages/User/
cp -v editors/sublime-text-3/* ~/Library/Application\ Support/Sublime\ Text\ 3/Packages/User/
.PHONY: requirements install clean test snippets-sublime-text-3
.PHONY: requirements install clean test support-sublime-text-3
......@@ -55,32 +55,63 @@ Snippets must be installed in your text editor. config.yaml
## Snippets
## Text Editor Support
Use snippets to reduce repetitive typing and to generally go faster.
Snippets are text macros that expand to produce the necessary Turtle for adding quotes.
Snippets are provided for some text editors.
Commands are also available to clean up snippets as they are used.
### Sublime Text 3
The following snippets are provided:
#### Installation
Install support to the User Packages directory.
`make support-sublime-text-3`
The RegReplace plugin is also required to be installed.
#### Usage
These snippets are provided:
- **self**: self-citation
- **cite**: a quote with one or more external sources
- **vcite**: a verbatim quote (no automatic removal of citations)
- **self**: self-citation
- **src**: an extra source for a particular quote
- **article**: new article template
- **config**: configuration template
These commands are provided:
The following will install snippets to the User Packages directory.
- **Thesis: Remove Data Entry Marks**: automatically clean up comments and extra spaces created by snippets.
`make snippets-sublime-text-3`
Invoke command with the command pallet: `cmd-shift-p` `thesis`
### VS Code
1. Open [snippets/vscode/turtle.json](
#### Requirements
Install the required extension **Replace Rules**
#### Snippets
1. Open [editors/vscode/turtle.json](
2. In VS Code, **File -- Preferences -- User Snippets**
3. Choose Turtle (`turtle.json`)
4. Copy-paste contents of `turtle.json`
#### Replacements
1. Open [editors/vscode/settings.json](
2. In VS Code, **File -- Preferences -- Settings**
3. Search for "replacerules"
4. **Replace Rules -- Rules -- edit in settings.json**
5. copy-paste contents of `settings.json` (pay attention to JSON commas)
## Configuration
A YAML file is used to control visfact.
"caption": "Thesis : Remove Data Entry Marks",
"command": "reg_replace",
"args": {
"replacements": [
"Quote pastes",
"Source pastes",
"Blank closing",
"Space around quote"
"Quote pastes": {
"find": "^# quote: .*\\n",
"replace": ""
"Source pastes": {
"find": "^# source: .*\\n",
"replace": ""
"Blank closing": {
"find": " \\] ;\\n\\n\\] \\.",
"replace": " ] ;\n] ."
"Space around quote": {
"find": "thesis:quote \"\\s*(.+?)\\s*\" ;",
"replace": "thesis:quote \"\\1\" ;"
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment