Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Embarrasing CodeMirror keymap Vim plugin #3413

Open
braykov opened this issue Aug 27, 2018 · 5 comments
Open

Embarrasing CodeMirror keymap Vim plugin #3413

braykov opened this issue Aug 27, 2018 · 5 comments

Comments

@braykov
Copy link

@braykov braykov commented Aug 27, 2018

When I install the plugin (together with codemirror plugin), this shows in the river:

Internal JavaScript Error
Well, this is embarrassing. It is recommended that you restart TiddlyWiki by refreshing your browser
Error executing boot module $:/plugins/tiddlywiki/codemirror/keymap/vim.js: "Cannot find module named '../addon/search/searchcursor' required by module '$:/plugins/tiddlywiki/codemirror/keymap/vim.js', resolved to $:/plugins/tiddlywiki/codemirror/addon/search/searchcursor"

undefined
@BurningTreeC

This comment has been minimized.

Copy link
Contributor

@BurningTreeC BurningTreeC commented Aug 27, 2018

Hi @braykov
A few months ago we split the CodeMirror plugin into the base Editor plugin and several "AddOn" plugins. Some of those AddOns have other AddOns as dependencies.

The Vim KeyMap needs the "closebrackets" and the "search and replace" AddOns installed

Simon

@sukima

This comment has been minimized.

Copy link
Contributor

@sukima sukima commented Aug 27, 2018

For what it is worth I found that CodeMirror's Vim key bindings to be atrocious. Even when they do work it is like learning a upside-down poor imitation of vi likely conceived by someone who has never actually used vi (or Vim) before.

I found it to be better to just copy/paste into an actual Vim (or gVim) instance. There are also many browser addons to help with this if you want the preview to work better.

@BurningTreeC

This comment has been minimized.

Copy link
Contributor

@BurningTreeC BurningTreeC commented Aug 28, 2018

@sukima - keybindings for the vim keymap are sort of hardcoded in vim.js. The most important part to make it more vim-like is to change the "cancel-edit-tiddler" tiddlywiki shortcut from "Escape" to something else, so that leaving insert mode works and one can do some basic vim commands in normal mode using ":" - like "%s/something/else/g", which works. but many other commands don't work

@braykov

This comment has been minimized.

Copy link
Author

@braykov braykov commented Sep 4, 2018

I disabled the plugin, then I wanted to uninstall it, but I couldn't find how. I expected to find an Uninstall button near the Disable button. Instead I deleted the tiddler itself. I am still not sure if this is enough.
However, I think dependencies should be installed automatically, otherwise what's the point? And how am I (as a user) supposed to guess what they are and that I need to install them manually?

@pmario

This comment has been minimized.

Copy link
Contributor

@pmario pmario commented Sep 4, 2018

...However, I think dependencies should be installed automatically, otherwise what's the point? And how am I (as a user) supposed to guess what they are and that I need to install them manually?

You are absolutely right. Contributions are very welcome!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants
You can’t perform that action at this time.