mirror of
https://github.com/esm7/obsidian-vimrc-support.git
synced 2026-07-22 05:00:25 +00:00
Version 0.9.0
This commit is contained in:
parent
6756ac2b63
commit
5093dca6dc
4 changed files with 16 additions and 9 deletions
11
README.md
11
README.md
|
|
@ -61,6 +61,7 @@ In addition to that:
|
|||
- `surround` - surround your selected text in visual mode or word in normal mode with text.
|
||||
- `pasteinto` - paste your current clipboard into your selected text in visual mode or word in normal mode. Useful for creating hyperlinks.
|
||||
- `jscommand` and `jsfile` - extend Vim mode using JavaScript snippets.
|
||||
- `source` - loads Vim commands from a file (relative to the vault root).
|
||||
|
||||
Commands that fail don't generate any visible error for now.
|
||||
|
||||
|
|
@ -219,8 +220,6 @@ nmap gT :tabprev
|
|||
|
||||
## Fixed Keyboard Layout in Normal Mode
|
||||
|
||||
**Note:** this is currently unsupported for the new (CM6-based) editor.
|
||||
|
||||
In many languages and keyboard layouts it becomes problematic or plain impossible to use Vim keys.
|
||||
The Vim keys are located in different positions on some keyboard layouts, which could be confusing when switching
|
||||
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!
|
|||
|
||||
## Changelog
|
||||
|
||||
### 0.9.0
|
||||
|
||||
Multiple fixes and improvements, all contributed by @jiyee - thank you!
|
||||
|
||||
- Fixed chord and Vim mode display issues (https://github.com/esm7/obsidian-vimrc-support/issues/149).
|
||||
- Added `source` command (https://github.com/esm7/obsidian-vimrc-support/issues/157)
|
||||
- Fixed Normal Mode Layout is back!
|
||||
|
||||
### 0.8.0
|
||||
|
||||
- The plugin is now marked as supporting mobile; thanks @Geniucker for taking this step, testing and documenting it!
|
||||
|
|
|
|||
4
main.ts
4
main.ts
|
|
@ -650,9 +650,9 @@ export default class VimrcPlugin extends Plugin {
|
|||
|
||||
defineSource(vimObject: any) {
|
||||
vimObject.defineEx('source', '', async (cm: any, params: any) => {
|
||||
console.log(params);
|
||||
if (params?.args?.length > 1)
|
||||
throw new Error("Expected format: source [fileName]");
|
||||
const fileName = params.argString.trim();
|
||||
let vimrcContent = '';
|
||||
try {
|
||||
this.app.vault.adapter.read(fileName).then(vimrcContent => {
|
||||
this.loadVimCommands(vimrcContent);
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"id": "obsidian-vimrc-support",
|
||||
"name": "Vimrc Support",
|
||||
"version": "0.8.0",
|
||||
"version": "0.9.0",
|
||||
"description": "Auto-load a startup file with Obsidian Vim commands.",
|
||||
"minAppVersion": "0.15.3",
|
||||
"author": "esm",
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "obsidian-vimrc-support",
|
||||
"version": "0.8.0",
|
||||
"version": "0.9.0",
|
||||
"description": "Auto-load a startup file with Obsidian Vim commands.",
|
||||
"main": "main.js",
|
||||
"scripts": {
|
||||
|
|
@ -13,13 +13,13 @@
|
|||
"devDependencies": {
|
||||
"@rollup/plugin-commonjs": "^15.1.0",
|
||||
"@rollup/plugin-node-resolve": "^9.0.0",
|
||||
"@rollup/plugin-typescript": "^6.1.0",
|
||||
"@rollup/plugin-typescript": "^11.0.0",
|
||||
"@types/node": "^14.14.6",
|
||||
"codemirror": "^5.62.2",
|
||||
"keyboardevent-from-electron-accelerator": "*",
|
||||
"obsidian": "^0.15.4",
|
||||
"obsidian": "^1.1.1",
|
||||
"rollup": "^2.33.0",
|
||||
"tslib": "^2.0.3",
|
||||
"typescript": "^4.0.5"
|
||||
"typescript": "^4.9.4"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue