Commit Graph

11 Commits

Author SHA1 Message Date
Henrik Lissner
9a02bd8ac8
Minor refactors across the board
- when-let* -> when-let
- Fix projectile-locate-dominating-file for connected remote files
2019-06-26 14:31:06 +02:00
Henrik Lissner
e313fef7b0
term/eshell: fix reference to old function 2019-06-18 21:52:50 +02:00
Henrik Lissner
9c842bfad8
Open term popups in current dir, instead of project-root
CDing into the project root can be accomplished with external tools, e.g.

  cd $(git rev-parse --show-toplevel)
  cd $(hg root)
  cd $(npm root)

Any of which could be aliased. Also, +vterm/toggle and term/toggle
define the PROOT environment variable, so `cd $PROOT` will work too.

On the other hand, CDing to the current file/folder requires that the
shell be made aware of the file/directory of some Emacs state, which is
a little trickier to deal with, so I made that the default behavior for
+term/toggle, +vterm/toggle and +eshell/toggle.
2019-06-17 19:25:17 +02:00
Henrik Lissner
43615c4d64
Integrate term toggle commands w/ persp-mode #1492
By namespacing the dedicated term buffers you get perspective-local
popup terminals.
2019-06-16 19:16:23 +02:00
Henrik Lissner
be907350e4
Fix +eshell/toggle with arguments
Fixes:

- Wrong-type-argument error when failing to display eshell buffer with
  pop-to-buffer, because it was killed (when prefix arg is non-nil).
- Passes non-existent variable `buf` to +eshell-run-command.
2019-06-13 17:52:52 +02:00
Henrik Lissner
b2da28edfe
Revert to initial evil state on term popup toggle
i.e. switch to insert state and move cursor to prompt.
2019-06-12 20:17:47 +02:00
Henrik Lissner
a56ce38903
term/eshell: refactor & update keybinds
- Replace +eshell|init-evil with an advice for
  evil-collection-eshell-next-prompt-on-insert
- Update C-n/C-j and C-p/C-k keybinds to use
  eshell-{next,previous}-matching-input-from-input, which behave much
  like zsh's history-substring-search-{up,down}
- Move window navigation keybinds C-{h,j,k,l} to C-c {h,j,k,l} (more
  tmux-esque).
2019-06-11 07:57:26 +02:00
Henrik Lissner
4fec3eb698
Revise term/vterm/eshell commands & keybinds
The semantics of SPC o t and SPC o T (or SPC o e and SPC o E in eshell's
case) have been reversed.

The lowercase keybind toggles the popup (and the prefix arg forciby
recreates the popup), and the uppercase keybind switches to that
terminal in the current buffer (whose prefix arg will open the terminal
in default-directory, rather than the project root).

- +{term,vterm,eshell}/open have been replaced with +X/here commands and
  are bound to SPC o T (and SPC o E in eshell's case).
- +{term,vterm,eshell}/popup* have been replaced with +x/toggle commands
  and are bound to SPC o t (and SPC o e in eshell's case).

The "toggle" behavior will do as the name implies, except will select
the popup if it is visible but unfocused.
2019-06-11 07:53:50 +02:00
Siddharth Shekar
aa64cf9426 Replace kill-this-buffer with kill-current-buffer
As per the documentation for kill-this-buffer, it should only be invoked
from the menu and behaves unpredictably when invoked programmatically.
2019-05-30 18:54:58 -07:00
Henrik Lissner
a583d69ae1
Fix #1442: void-function eshell-input-filter-initial-space
eshell-input-filter-initial-space was introduced in Emacs 26. I've
inlined its definition, at least until we drop 25.x support.
2019-05-29 23:44:23 -04:00
Henrik Lissner
8c65a63b1c
Move eshell, term & vterm modules to :term 2019-05-19 02:17:59 -04:00