Commit Graph

26 Commits

Author SHA1 Message Date
a0a4aa81c1 fix(vterm): +vterm/toggle creating duplicates
If vterm-buffer-name-string is set to non-nil, then vterm will rename
the buffer after it is initialized. Since +vterm/toggle looks up buffers
by name, it will lose track of them, causing it to create a new one on
each invocation. With this, it will no longer lose track of them.

Fix: #6651
2022-08-09 17:18:35 +02:00
81ab356d6e refactor(vterm): remove +vterm--change-directory-if-remote
This is no longer necessary as vterm handles this natively. moreover, it
creates a redundant nested ssh session whenever `SPC o t` is used to
re-open an existing vterm popup.
2022-01-30 02:41:02 +01:00
7933e54542 refactor!(:term): toggle commands now always hide
BREAKING CHANGE: previously, <leader> o t commands would only hide the
terminal popup if it was focused. If not, they would move the focus to
the terminal window. This is unintuitive to the "toggle" description,
and arguably less useful, since refocusing to the terminal can be easily
done with regular window refocus commands. Therefore, <leader> o t now
just hides the terminal popup.

Fix #3374
2021-09-23 11:39:36 +02:00
8841011a95 Return buffer on +vterm/{here,toggle} commands 2021-05-24 13:53:51 -04:00
582759e43b Refactor +vterm/toggle and +vterm/here 2021-05-11 17:09:48 -05:00
fe9f8e785f Fix +vterm-toggle not changing directory to project root 2021-05-11 16:44:29 -05:00
38e2066b9c ignore extension installed by lang/dart and recover behaviour of +vterm/here
1. lang/dart installs extension to ~/.emacs.d/.extension/vscode/Dart-Code.Dart-Code/.
2. emacs-libvterm makes +vterm/here not open new vterm buffer any more
   due to commit: c2c2c8afb9
2021-04-02 22:53:07 +08:00
8566cfac7b Bump evil-collection, vterm
emacs-evil/evil-collection@ffbf149 -> emacs-evil/evil-collection@e6824e2
akermu/emacs-libvterm@101ff86 -> akermu/emacs-libvterm@fb12d7f

Closes #4591

Co-authored-by: Michael Lingelbach <mjlbach@users.noreply.github.com>
2021-01-31 04:30:48 -05:00
6c4e2d08d4 Move the function back and rename 2020-05-09 01:06:19 -05:00
39ce0c844b Extract implementation to a separate function 2020-05-09 00:53:10 -05:00
50bf06a57a Allow +vterm/toggle to open remotely
When `default-directory` is remote, prepare the toggled vterm at remote
location.
2020-05-09 00:38:25 -05:00
532a31f4fe Fix +vterm/{toggle,here}... ... ...again 2020-03-04 17:10:07 -05:00
9ce3f6df87 Fix +vterm/{toggle,here}... again 2020-03-04 16:52:14 -05:00
f1f1609021 Fix void-function vterm-mode 2020-03-04 16:45:19 -05:00
cee3010d2a Fix +vterm/* commands spawning new buffer each time 2020-03-04 16:32:22 -05:00
5f98e12b0e Fix #2608: +vterm/here opening in popup
Due to akermu/emacs-libvterm@a9ec753
2020-03-03 15:44:11 -05:00
1fe584fc21 address feedback 2020-02-22 21:42:04 -05:00
bfd6d5ede8 vterm returns to where it was entering insert 2020-02-22 19:10:19 -05:00
2485123164 term/{eshell,vterm}: remove already in * buffer check
Allows users to spawn additional eshell/vterm buffers, if they like.
2019-08-22 14:44:14 -04:00
0c7e6261e8 term/vterm: don't reset vterm popup 2019-08-11 02:05:09 -04:00
149b2617b0 💥 revise hook/var fns naming convention (2/2)
This is second of three big naming convention changes. In this commit,
we change the naming conventions for hook functions and variable
functions:

1. Replace the bar | to indicate a hook function with a -h suffix, e.g.

     doom|init-ui -> doom-init-ui-h
     doom|run-local-var-hooks -> doom-run-local-var-hooks-h

2. And add a -fn suffix for functions meant to be set on variables,
   e.g.

     (setq magit-display-buffer-function #'+magit-display-buffer-fn)

See ccf327f8 for the reasoning behind these changes.
2019-07-22 02:30:38 +02:00
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
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
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
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
8c65a63b1c Move eshell, term & vterm modules to :term 2019-05-19 02:17:59 -04:00