Skip to content

Commit

Permalink
v0.0.7
Browse files Browse the repository at this point in the history
  • Loading branch information
TianyiShi2001 committed Apr 14, 2020
1 parent 35c800b commit 0303af3
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 16 deletions.
20 changes: 13 additions & 7 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,42 +2,48 @@

All notable changes to the "rmarkdown" extension will be documented in this file.

## [0.0.1] - 2020-04-12
## 0.0.1 - 2020-04-12

- Initial release

## [0.0.2] - 2020-04-12
## 0.0.2 - 2020-04-12

### Added

- aliases for `\ref`, `\refsec`, `\reffig`, `reftab`, whichs are `\@ref`, `\@sec`, `\@fig`, `\@tab`, respectively
- `Knit` command with keyboard shortcut `Cmd+Shift+K` or `Ctrl+Shift+K`

## [0.0.3] - 2020-04-13
## 0.0.3 - 2020-04-13

### Added

- adapted some functions from [microsoft/vscode](https://github.com/microsoft/vscode/tree/master/extensions/markdown-language-features) and [yzhang-gh/vscode-markdown](https://github.com/yzhang-gh/vscode-markdown), especially syntax highlighting and key bindings for bold/itatic toggling.

## [0.0.4] - 2020-04-13
## 0.0.4 - 2020-04-13

### Added

- added a Python script to convert markdown's `tmLanguage.json` to rmarkdown's
- R code chunks (with curly braces after ` ``` `) are now highlighted properly

## [0.0.5] - 2020-04-14
## 0.0.5 - 2020-04-14

### Added

- Blogdown New Post Helper (command palette `New Post`)

## [0.0.6] - 2020-04-14
## 0.0.6 - 2020-04-14

### Added

- 'Blogdown: Serve Site' command

### Changed

- Slugify function preserves CJK characters
- Slugify function preserves CJK characters

## 0.0.7 - 2020-04-15

### Added

- Blogdown: Default author setting
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ Before you can use blogdown-specific features, you need to first open the direct

1. In the command palette (`Ctrl/Cmd+Shift+P`), search for `new post`
2. Execute `Blogdown: New Post`, then fill out basic information (title, author, category, archetype)
- You can set the default author in the settings `Ctrl/Cmd + ,`
3. You are redirected to your new post!

![blogdown new post demo](images/demo/blogdown/newpost.gif)
Expand Down
17 changes: 15 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"type": "git",
"url": "https://github.com/TianyiShi2001/rmarkdown-vscode.git"
},
"version": "0.0.6",
"version": "0.0.7",
"engines": {
"vscode": "^1.44.0"
},
Expand Down Expand Up @@ -57,7 +57,7 @@
}
},
{
"command": "rmarkdown_vscode.knit",
"command": "rmarkdown_vscode.rmarkdown-core.Knit",
"key": "ctrl+shift+k",
"mac": "cmd+shift+k",
"when": "editorTextFocus"
Expand Down Expand Up @@ -106,6 +106,19 @@
"title": "Blogdown: New Post"
}
],
"configuration": [
{
"title": "Blogdown",
"properties": {
"rmarkdown_vscode.blogdown.author": {
"type": "string",
"default": "",
"description": "Default blogdown author",
"scope": "window"
}
}
}
],
"grammars": [
{
"language": "rmarkdown",
Expand Down
3 changes: 2 additions & 1 deletion src/blogdown/commands/NewPost.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ export class NewPost extends BaseCommand {
readonly TotalSteps: number = 4;

async run() {
const state = { projectDir: vscode.workspace.workspaceFolders![0].uri.path } as Partial<NewPostOptions>;
const defaultAuthor = vscode.workspace.getConfiguration().get("rmarkdown_vscode.blogdown.author");
const state = { projectDir: vscode.workspace.workspaceFolders![0].uri.path, author: defaultAuthor } as Partial<NewPostOptions>;
if (!(await MultiStepInput.run((input) => this.setTitle(input, state)))) {
// command cancelled
return;
Expand Down
6 changes: 0 additions & 6 deletions src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,6 @@ export function activate(context: vscode.ExtensionContext) {

loadCommands(context);

//let rmd = new Rmarkdown();
// context.subscriptions.push(
// vscode.commands.registerCommand("rmarkdown_vscode.knit", () => {
// rmd.knit();
// })
// );
vscode.languages.setLanguageConfiguration("rmarkdown", {
wordPattern: /(-?\d*\.\d\w*)|([^\!\@\#\%\^\&\(\)\-\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s\,\。\《\》\?\;\:\‘\“\’\”\(\)\【\】\、]+)/g,
});
Expand Down

0 comments on commit 0303af3

Please sign in to comment.