by daylightyotei · 10y ago · 0 comments
2010~2011: learn vim because I wanted to slack off studying for exams
2012: addicted to vim keybindings at this point, tell people 'I can't use other editors without "proper" vim keybindings'
2012: also discover tmux, because i wanted the ability to use vim keybindings and copy things in/out of shell
2012-2016: dabble with emacs sproadically, put off every time due to my vim keybinding addiction. tried evil mode during this time, and to my limited knowledge of emacs, things like C-u not working (scroll up half a page in vim) tick me off and in different modes the vim keybindings would suddenly disappear which was annoying
2016.04: discover spacemacs, try again, things work quite magically. in addition modes like org-mode are working as I expect (no random de-binding of evil-mode), discover new modes like magit and projectile-helm which keep me in (spac)emacs. also supports screen splitting with (:vsp, :sp) which is great.
one thing i really like about emacs is i still use the shell (awk/sed/ag/etc) for a lot of tasks, and since i can use the shell inside an emacs buffer, copying-pasting out of them are incredibly easy, replacing my tmux usage.
next step for me is to get more proficient in emacs (i hope i can read emails, do simple browsing, etc) and then hopefully setup emacs from scratch for an exercise instead of relying on spacemacs to do everything for me
Why didn't you define your custom keys with global-set-key in Emacs Lisp? This is one of the first things an Emacs novice should learn and do.
I mainly use vim and what I normally do to use shell within vim is to open another window and run something like:
:r !some-shell-command
If I want to filter text within the buffer to the shell command, I can visually highlight it and run. :'<,'> !some-other-command
It's easy enough to undo the result and retry. I can edit the shell command opening the command line window with q: (which allows me to browse through my ex command history and use standard vim keybindings to edit, copy, and paste parts of the commands from the history that I need to run them again.I know you can do something similar in emacs using the M-! keybinding, but I'm sure that's not an orthodox way of doing things in that environment.