ctrlshiftbryan
I’ve been trying to get iex to work a spacemacs terminal but it doesn’t seem to be sending the up or down arrows to cycle through history.
I found this possible solution but don’t understand enough about spacemacs/emacs to get it working.
I tried adding this to my user-config but it didn’t do anything.
(defun term-send-up () (interactive) (term-send-raw-string “\e[A”))
(defun term-send-down () (interactive) (term-send-raw-string “\e[B”))
(defun term-send-right () (interactive) (term-send-raw-string “\e[C”))
(defun term-send-left () (interactive) (term-send-raw-string “\e[D”))
Has anyone else been able to get iex working in a spacemacs terminal?
I know alchemist iex is an option but I really prefer iex from a terminal? (alchemist iex seems to keep its own history of commands or something instead of actually sending the up arrow command to iex)
Trending in Questions
Other Trending Topics
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #library
- #deployment
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #elixirconf
- #channels
- #exunit
- #discussion
- #code-sync
- #podcasts
- #javascript
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #ai
- #elixirconf-us
- #blog-post
- #elixir-ls
- #phoenix_html
- #iex
- #graphql
- #genstage
- #websockets
- #supervisor
- #advent-of-code
- #distillery
- #processes
- #api
- #forms
- #elixirconf-eu
- #metaprogramming
- #hex










Showing Posts 1 to 2- Show Best Posts
- Show All (oldest first)
- Show All (newest first)
alanm
Copy and paste this:
(defun term-send-up () (interactive) (term-send-raw-string “\e[A”))
(defun term-send-down () (interactive) (term-send-raw-string “\e[B”))
(defun term-send-right () (interactive) (term-send-raw-string “\e[C”))
(defun term-send-left () (interactive) (term-send-raw-string “\e[D”))
In your spacemacs.local between (defun dotspacemacs/user-init () and (defun dotspacemacs/user-config () as shown in the following:
restart spacemacs.
Now you have to use a terminal ‘shell’ instead of the default’ansi-term’ terminal, use spc-a-s-i to open a shell terminal, inside there you can cycle through commands history in the prompt using arrow keys, in erl and in iex.
hope it helps.
modraedlau
You can do this in ‘user-config’ as following: