248 points · by curryz · 8y ago · 91 comments
https://github.com/zachcurry/emacs-anywhere (here)
vs.
https://github.com/cknadler/vim-anywhere + https://news.ycombinator.com/item?id=16395379
Nice to see them both still in use :-)
"Because we use vi, son. They use emacs."
let's do nano-everywhere!
Seriously, what voice commands would be better than clacking on a keyboard?
For code structure we have AST-fueled refactoring tools, auto linters, auto formatters... the main problem with these is that you're forcing people to use a single IDE/editor with a particular set of plugins with a particular configuration. And usually it's not even VIM or Emacs!
It attempts to launch an external program with your $EDITOR (vi or emacs) preferred key bindings.
However it looks like it only works with emacs editing mode (set -o emacs). Is there a way to do this in vim editing mode (set -o vi)?
Also it doesn't appear to work in zsh. Is there a zsh equivalent?
I wouldn't understand anything without the screenshot altho I use Emacs for 11 years. Imagine beginners reading it...
What it does: Use emacs to input text in any program at any time
How it work: A keyboard shortcut of your choosing...
(*disclaimer: written by an avid vim user, and not a native English speaker. May need rephrasing to be better Emacsese or English.)
https://chrome.google.com/webstore/detail/edit-with-emacs/lj...
Minor nit, can you fix the grammar here: "inserted into the application your using"
Should be "you're using" as in "you are using".
Thanks for this.
And, of course, the upside is that on any random machine with emacs is 100% compatible.
Oh, and one more tip :-): bind 'vim' to 'emacs -nw -Q' which loads emacs really fast (without requiring the daemon to be running).
The big problem is that all(?) applications use logical instead of physical keys for hotkeys combinations so any custom layout would break everything.
;; Swap C-t and C-x, so it's easier to type on Dvorak layout
;; `keyboard-translate` does not work when attaching an emacsclient to
;; a running emacs in daemon mode, so instead we define the key in the
;; key-translation-map.
;; http://lists.gnu.org/archive/html/help-gnu-emacs/2009-10/msg00505.html
(define-key key-translation-map [?\C-x] [?\C-t])
(define-key key-translation-map [?\C-t] [?\C-x])
With this modification I find Emacs with Dvorak very comfortable.However I use Spacemacs with Vim keybindings :D
I use spacemacs but I don't think this should cause any issues. I'm new to both though.
I even wrote this comment in emacs!!
It looks like this just opens an editor with a shortcut and pastes the text on exit...
Could you explain what’s bad about that or why you think classic keyboard interfaces are a fad? (I’ve been using Vi interfaces in one form or another since 1989).
Thanks for this clarification. (Even pasting becomes increasingly impossible. For e.g. Google does not allow me anymore to paste my username at login, and my (work) username is very long... I suppose pasting might offer an easier way scripted attacks. But yeah, most applications still allow it.)
In general there's always a simple way to bypass these websites limitations, like those who try to disable the right click.