Commit graph

47 commits

Author SHA1 Message Date
Nikita Leshenko 0417379a2f
shell: Wrap terminal-here in use-package
Introduced in PR #11949, terminal-here wasn't wrapped in `use-package'. This
made it impossible to use `spacemacs|use-package-add-hook' to customize it.
2019-12-20 10:09:27 +01:00
Uros Perisic 628fe9adba
Add support to start external terminal emulators in context.
Integrated terminal emulators/integrated shells get the job done for
quick-and-dirty shell commands, but a lot of people take great care to tweak
their terminal workflow exactly to their liking. This makes it possible to
switch to that workflow seamlessly, by opening their terminal emulator of
choosing in the current directory or at the project root, and even supports
working over `ssh` using `tramp`.
2019-12-06 22:21:15 +01:00
Ag Ibragimov 08fdb02d7d [shell] Add vterm key bindings
- ~M-n~     =vterm-send-down= (next command)
- ~M-p~     =vterm-send-up=   (previous command)
- ~M-y~     =vterm-yank-pop=  (previous paste)
- ~M-/~     =vterm-send-tab=  (hippie expand)
Evil insert state:
- ~C-y~     =vterm-yank=      (paste)
Evil normal state:
- ~p~       =vterm-yank=      (paste)
- ~u~       =vterm-undo=

vterm: more keys
2019-11-06 12:01:31 +01:00
br3athein e528c6b038 shell: Set initial shell state better 2019-10-19 22:58:22 +02:00
br3athein 72844d2ae9 shell: Tell vterm to respect shell-default-term-shell setting
Effectively, this forces `vterm` to spawn a shell set in a
`shell-default-term-shell` variable i/o default "/bin/bash" - just like
other shells from `shell-pop` do.
2019-10-19 22:21:05 +02:00
Miciah Masters 7db8815ee5 Simplify loading logic for eshell-z
* layers/+tools/shell/packages.el (shell/init-eshell-z): Replace use of
with-eval-after-load by using use-package's :after keyword to load eshell-z
when eshell is loaded.
2019-10-13 11:15:46 +02:00
deb0ch 2d232232d0 [shell] regroup redundant evil-define-key 2019-09-16 17:41:15 +03:00
deb0ch 2f8f21b3b1 [shell] enter insert mode when entering a terminal 2019-09-16 17:41:15 +03:00
deb0ch 3643bc7b6d [shell] add support for vterm
Support for https://github.com/akermu/emacs-libvterm
2019-09-16 17:40:32 +03:00
deb0ch 29e2fa11d9 [shell] inhibit global-centered-cursor-mode in terminals 2019-09-16 17:38:35 +03:00
Sheng Yang 0a202138b9 Allow mouse pasting in term based shells 2019-06-21 19:22:25 +02:00
bb2020 e22cfadf1f [shell] Add Eshell Ivy completion bindings
M-l calls spacemacs/ivy-eshell-history
TAB calls spacemacs/pcomplete-std-complete
2019-05-12 18:47:27 +02:00
bb2020 697d3b88ac [shell] Move eshell-z-freq-dir-hash-table-file-name into cache dir 2019-05-08 19:49:24 +02:00
Emil Petersen c68fde7beb Apply conventions to multi-term keybinds 2019-04-14 23:05:01 +02:00
duianto 3de7081950 Cleanup which-key names
Moved:
- ("ai" "irc") to both the `erc` and `rcirc` layers. They don't have to be
  renamed until the layers are loaded.

- ("ay" "ipython notebook") to the `ipython-notebook` layer.

- ("p$" "projects/shell")
  ("'"  "open shell")
  ("as" "shells")
  to the `shell` layer.

- The commands with keybindings from spacemacs-bootstrap/packages.el to
  spacemacs-defaults/keybindings.el.

Removed:
- ("gd" "diff") it seems to be an old group name, there's no `SPC g d` group at
  the moment.

- ("Re" "elisp") and ("Rp" "pcre") because they have moved to:
  ("xr" "regular expressions")
  ("xre" "elisp")
  ("xrp" "pcre")

- ("xm" "move") seems to be an old move text group, the current keybindings are
  `SPC x J` and `SPC x K` which opens the Move Text Transient State.

- ("b" "persp-buffers") because `SPC b` is also renamed as ("b" "buffers") which
  is more general and not persp-mode specific.
2019-02-18 14:35:00 -05:00
cipharius 7c3aa2a43c Fix broken leader key binding for inferior shell 2018-10-31 22:47:49 +00:00
cipharius 79fe37c8b2
Wrap 'shell' command to start in current buffer 2018-10-12 18:29:04 +03:00
Alexander Wingård 07a7776b6f Override read-only when capturing clear in shell
When shell layer intercepts the clear commands and tries to replace it with
erase-buffer, this fails with 'Text is read-only'.
Work around this by using inhibit-read-only.
2018-10-09 00:16:20 +03:00
Miciah Masters e0b751bee3 Avoid non-idempotent use of push in init code
Replace push with add-to-list in layer init functions and related code.

Modify spacemacs|add-toggle to check for and update an existing toggle in
spacemacs-toggles and only create a new toggle if none already existed.

Replace a conditional push onto erc-packages with use of :toggle.

When initializing which-key, set which-key-replacement-alist to its default
or customized setting before adding all the Spacemacs replacements.  We
want to keep the stock replacements but avoid adding duplicates of the
Spacemacs replacements.

Replace the emacs-lisp-mode-hook lambda with a named function to avoid
adding duplicate hooks (which can add duplicate definitions of the
evil-surround pair).
2018-06-05 22:17:13 -04:00
syl20bnr ebe4c60264 Revert "Defer packages by default using use-package-always-defer"
This reverts commit 29c78ce841 and all other fixes
that have been made afterwards.

The motivation is that use-package is seen by many as a replacement for
`require`. Is use-package always defer the loading of packages then is breaks
this use case, this does not respect POLA so even if it was making Spacemacs
loading faster (up to 3s faster on some startup on my machine) we just cannot
use it, it would be irresponsible. Spacemacs should be easy to use, loading
performance will come with time but it is not a priority.
2018-03-03 23:40:10 -05:00
syl20bnr 29c78ce841 Defer packages by default using use-package-always-defer
Warning now `:defer t` is implied, to force a package to load `:demand t` is
now necessary.
2018-02-27 23:32:52 -05:00
Paul 92428f3a47 shell: move eshell key bindings definition into a hook function
Problem
---

`C-j` and `C-k` key bindings don't work in eshell buffers except the first one.

Solution
---

`eshell-mode-map` is buffer-local, so key bindings have to be defined in a hook
function.
2018-02-24 19:49:39 -05:00
syl20bnr 326965d4ce Happy New Year 2018! 2018-01-04 02:00:25 -05:00
Steven Allen 604c24bf0e Replace define-advice with advice-add in the shell layer
`define-advice` requires Emacs 25.

 Addresses: https://github.com/syl20bnr/spacemacs/pull/8635#issuecomment-297887734
2017-05-04 00:30:22 -04:00
syl20bnr 24db3c6513 Add comments for eshell preoutput-filter fix 2017-04-09 22:56:39 -04:00
Steven Allen 538a778a39 Work around bug in eshell's preoutput-filter code.
Eshell doesn't call preoutput-filter functions in the context of the eshell
buffer. This breaks the xterm color filtering when the eshell buffer is updated
when it's not currently focused.

I intend on submitting this fix upstream when I get a chance but an advice fixes
it for now. The other fix is to move the xterm color filter to a
output-filter function (instead of preoutput-filter) but those operate on
strings that have already been inserted into the buffer.
2017-04-09 22:55:11 -04:00
syl20bnr fb27ede558 Bump year in copyright headers
Happy New Year 2017!
2017-01-05 23:08:17 -05:00
syl20bnr 74fdbb6795 Refactor and simplify company backends declaration
Enabling a company backend for a specific mode was a tedious tasks with code
scattered at different locations, one for local variable definitions, one for
company hook function definitions and another where the backends were pushed to
the local variables (which was problematic, since we ended up pushing the same
backends over and over again with `SPC f e R`, pushes have been replaced by
add-to-list calls in the new macro).

All these steps are now put together at one place with the new macro
spacemacs|add-company-backends, check its docstring for more info on its
arguments.

This macro also allows to define arbitrary buffer local variables to tune
company for specific modes (similar to layer variables via a keyword :variables)

The code related to company backends management has been moved to the
auto-completion layer in the funcs.el file. A nice side effect of this move is
that it enforces correct encapsulation of company backends related code. We can
now easily detect if there is some configuration leakage when the
auto-completion layer is not used. But we loose macro expansion at file loading
time (not sue it is a big concern though).

The function spacemacs|enable-auto-complete was never used so it has been
deleted which led to the deletion of the now empty file core-auto-completion.el.

The example in LAYERS.org regarding auto-completion is now out of date and has
been deleted. An example to setup auto-completion is provided in the README.org
file of the auto-completion layer.
2017-01-02 00:39:04 -05:00
Jeremy Bi 5ca7d5e0d1 font-lock-unfontify-region-function should no longer be set/reset.
Due to upstream changes.
2016-10-14 11:19:38 +08:00
Eivind Fonn b2d108877c Move shell layer defuns to funcs.el 2016-08-17 21:00:16 +02:00
Steven Allen c1b5dd301c move eshell company post-config to post-init
See #6711
2016-08-17 20:55:00 +02:00
Eivind Fonn 66a628a599 shell: auto-jump to end also in hybrid 2016-07-05 00:23:16 -04:00
syl20bnr fb97b87cc6 Call spacemacs/set-leader-keys-for-major-mode only once 2016-05-30 21:04:04 -04:00
Eivind Fonn e63478049a shell: fix projectile-multi-term-in-root 2016-05-30 21:02:59 -04:00
syl20bnr a2de9a63af Use :toggle keyword instead of when forms 2016-05-29 22:39:21 -04:00
syl20bnr e4b7536510 Remove smooth scrolling from packages list 2016-05-22 10:00:57 -04:00
Allen Li a9c95142b9 Remove smooth scroll margin
User changing the scroll margin should handle these cases themselves.
2016-05-22 09:58:40 -04:00
syl20bnr 1f993bddf6 Rename spacemacs-helm and spacemacs-ivy layers to helm and ivy
For ivy users: be sure to update your dotfile by replacing spacemacs-ivy
by ivy
2016-05-15 22:24:27 -04:00
dubnde 80cccdce7c Add shell-default-full-span for shell window 2016-04-29 18:14:57 -04:00
syl20bnr e18b1cbe0e Move vi-tilde-fringe hook to shell layer
Also replace lambdas by named functions
2016-04-29 17:48:00 -04:00
Nate Wolfe 634f1a4fbe Revert "(5719) Fix multi-term shell popup"
This reverts commit 8526ee7145.
2016-04-11 20:32:45 +02:00
Nate Wolfe 8526ee7145 (5719) Fix multi-term shell popup
This commit removes the unused argument from the wrapper lambda, which
appears to be no longer provided when the function is called.
2016-04-07 22:15:36 -04:00
syl20bnr 63dc8f7ea0 shell: add support for SPC u SPC ' to open shell in current buffer
Works as well for all `SPC a s ...` key bindings.
2016-04-07 14:52:41 -04:00
Eivind Fonn 64392e3fa5
Fix eshell setup for xterm-color
This makes sure that all the setup happens at the same time. Previously
some setup happened at loading time of esh-mode while some happened in
eshell-mode-hook. Everything output between this (the first prompt)
looks different.
2016-04-06 18:14:57 -04:00
Joel McCracken bc3c77e63e Do not delete window when there is only one
If ansi-term is a full-screen window, running `(delete-window)` in this
case would cause an error to appear. This commit guards against this
scenario.
2016-04-04 22:41:53 -04:00
syl20bnr 931652bf8d shell: register shell language for org-babel 2016-04-04 09:49:13 -04:00
syl20bnr 9d0558992c layers directory: create new categories
+chat
+checkers
+emacs
+intl
+os
+pair-programming
+tags
+theme
+web-services
2016-03-23 21:39:43 -04:00
Renamed from layers/shell/packages.el (Browse further)