Skip to content

Commit 5093dca

Browse files
committed
Version 0.9.0
1 parent 6756ac2 commit 5093dca

4 files changed

Lines changed: 16 additions & 9 deletions

File tree

README.md

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ In addition to that:
6161
- `surround` - surround your selected text in visual mode or word in normal mode with text.
6262
- `pasteinto` - paste your current clipboard into your selected text in visual mode or word in normal mode. Useful for creating hyperlinks.
6363
- `jscommand` and `jsfile` - extend Vim mode using JavaScript snippets.
64+
- `source` - loads Vim commands from a file (relative to the vault root).
6465

6566
Commands that fail don't generate any visible error for now.
6667

@@ -219,8 +220,6 @@ nmap gT :tabprev
219220

220221
## Fixed Keyboard Layout in Normal Mode
221222

222-
**Note:** this is currently unsupported for the new (CM6-based) editor.
223-
224223
In many languages and keyboard layouts it becomes problematic or plain impossible to use Vim keys.
225224
The Vim keys are located in different positions on some keyboard layouts, which could be confusing when switching
226225
layouts, and on some layouts (e.g. non-Western languages) the keys for Vim movements just don't exist.
@@ -287,6 +286,14 @@ See [here](JsSnippets.md) for the full example, and please contribute your own!
287286

288287
## Changelog
289288

289+
### 0.9.0
290+
291+
Multiple fixes and improvements, all contributed by @jiyee - thank you!
292+
293+
- Fixed chord and Vim mode display issues (https://github.com/esm7/obsidian-vimrc-support/issues/149).
294+
- Added `source` command (https://github.com/esm7/obsidian-vimrc-support/issues/157)
295+
- Fixed Normal Mode Layout is back!
296+
290297
### 0.8.0
291298

292299
- The plugin is now marked as supporting mobile; thanks @Geniucker for taking this step, testing and documenting it!

main.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -650,9 +650,9 @@ export default class VimrcPlugin extends Plugin {
650650

651651
defineSource(vimObject: any) {
652652
vimObject.defineEx('source', '', async (cm: any, params: any) => {
653-
console.log(params);
653+
if (params?.args?.length > 1)
654+
throw new Error("Expected format: source [fileName]");
654655
const fileName = params.argString.trim();
655-
let vimrcContent = '';
656656
try {
657657
this.app.vault.adapter.read(fileName).then(vimrcContent => {
658658
this.loadVimCommands(vimrcContent);

manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"id": "obsidian-vimrc-support",
33
"name": "Vimrc Support",
4-
"version": "0.8.0",
4+
"version": "0.9.0",
55
"description": "Auto-load a startup file with Obsidian Vim commands.",
66
"minAppVersion": "0.15.3",
77
"author": "esm",

package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "obsidian-vimrc-support",
3-
"version": "0.8.0",
3+
"version": "0.9.0",
44
"description": "Auto-load a startup file with Obsidian Vim commands.",
55
"main": "main.js",
66
"scripts": {
@@ -13,13 +13,13 @@
1313
"devDependencies": {
1414
"@rollup/plugin-commonjs": "^15.1.0",
1515
"@rollup/plugin-node-resolve": "^9.0.0",
16-
"@rollup/plugin-typescript": "^6.1.0",
16+
"@rollup/plugin-typescript": "^11.0.0",
1717
"@types/node": "^14.14.6",
1818
"codemirror": "^5.62.2",
1919
"keyboardevent-from-electron-accelerator": "*",
20-
"obsidian": "^0.15.4",
20+
"obsidian": "^1.1.1",
2121
"rollup": "^2.33.0",
2222
"tslib": "^2.0.3",
23-
"typescript": "^4.0.5"
23+
"typescript": "^4.9.4"
2424
}
2525
}

0 commit comments

Comments
 (0)