Skip to content

Add support for vim, emacs, and sublime key maps#116

Merged
Gaurav0 merged 1 commit intoember-cli:masterfrom
HeroicEric:additional-key-maps
Aug 11, 2015
Merged

Add support for vim, emacs, and sublime key maps#116
Gaurav0 merged 1 commit intoember-cli:masterfrom
HeroicEric:additional-key-maps

Conversation

@HeroicEric
Copy link
Copy Markdown
Contributor

fixes #48

vim-mode

Right now ember-twiddle is dependent on a fork of ivy-codemirror until IvyApp/ivy-codemirror#5 is merged in.

This is additionally dependent on IvyApp/ivy-codemirror#7 being merged, which adds support for importing the additional key maps. It is currently working while using my fork that includes the changes in both of those PRs but could also be made to work by manually importing those key map files via bower.

It would probably also be cool to persist these settings somewhere but I'm not sure where you would want that done. Maybe in localStorage or a specially named gist?

@HeroicEric HeroicEric force-pushed the additional-key-maps branch from 8aad616 to f74364d Compare August 1, 2015 00:15
Comment thread app/gist/template.hbs Outdated
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would you mind refactoring this into a component?

@Gaurav0
Copy link
Copy Markdown
Contributor

Gaurav0 commented Aug 1, 2015

Love this. We just need some tests. Thanks so much.

@stefanpenner
Copy link
Copy Markdown
Contributor

Oh boy!!

@joostdevries
Copy link
Copy Markdown
Member

Could you merge master/rebase?

@HeroicEric HeroicEric force-pushed the additional-key-maps branch 2 times, most recently from d22780d to 9be0032 Compare August 5, 2015 22:33
@HeroicEric
Copy link
Copy Markdown
Contributor Author

@joostdevries it's now up to date with master. Haven't had time to work on persisting to localStorage yet

@HeroicEric HeroicEric force-pushed the additional-key-maps branch 2 times, most recently from f303637 to a4254c2 Compare August 10, 2015 02:37
@HeroicEric HeroicEric changed the title Add support for vim, emacs, and sublime key maps [WIP] Add support for vim, emacs, and sublime key maps Aug 10, 2015
@HeroicEric HeroicEric force-pushed the additional-key-maps branch 2 times, most recently from 96c7a74 to 3ee79b6 Compare August 11, 2015 05:04
@HeroicEric HeroicEric force-pushed the additional-key-maps branch from 3ee79b6 to 735ed6a Compare August 11, 2015 05:08
@HeroicEric HeroicEric changed the title [WIP] Add support for vim, emacs, and sublime key maps Add support for vim, emacs, and sublime key maps Aug 11, 2015
@HeroicEric
Copy link
Copy Markdown
Contributor Author

Added some tests and support for persisting your settings to localStorage

@stefanpenner
Copy link
Copy Markdown
Contributor

yay :)

@Gaurav0
Copy link
Copy Markdown
Contributor

Gaurav0 commented Aug 11, 2015

@HeroicEric This is awesome. Thanks! 👍

Gaurav0 added a commit that referenced this pull request Aug 11, 2015
Add support for vim, emacs, and sublime key maps
@Gaurav0 Gaurav0 merged commit 503a2e9 into ember-cli:master Aug 11, 2015
@HeroicEric HeroicEric deleted the additional-key-maps branch August 11, 2015 14:33
@stefanpenner
Copy link
Copy Markdown
Contributor

the vim mode doesn't appear to have some of the text block support, the example at http://ace.c9.io/build/kitchen-sink.html has @HeroicEric thoughts?

@HeroicEric
Copy link
Copy Markdown
Contributor Author

@stefanpenner I think that's using a totally different editor Ace while ember-twiddle is set up with CodeMirror.

We could look into switching maybe but we'd probably want to do a feature comparison to see what we'd be trading.

It also looks like there is a Vim Mode API for Codemirror's vim config that we can maybe tweak

@stefanpenner
Copy link
Copy Markdown
Contributor

ember-twiddle is set up with CodeMirror.

oh for some reason i thought it was ace.

@stefanpenner
Copy link
Copy Markdown
Contributor

can confirm http://codemirror.net/demo/vim.html has the text-block support, i'll see if i can figure out if its an option or something.

@stefanpenner
Copy link
Copy Markdown
Contributor

it appears the only config they are using is:

     lineNumbers: true,
        mode: "text/x-csrc",
        keyMap: "vim",
        matchBrackets: true,
        showCursorWhenSelecting: true

@HeroicEric
Copy link
Copy Markdown
Contributor Author

@stefanpenner I can look into it later. It's possible that it's an option not related to vim specifically

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Vim mode

4 participants