Comments (18)
Just to clarify something for others that are as confused as I was...
When you use your assigned key binding to "toggle_terminus_panel" for the 1ST TIME ONLY, it will open to the path of your currently selected tab. Subsequent uses of the same key binding will merely toggle between hiding the existing panel, and showing it, but will not destroy it. Switching to a tab with a different path and "toggling" the terminus panel once more will still show the preexisting terminus panel for the previous path for which it was created. In order to create a new terminus panel for the path of the current tab you must first close (rather than toggle) the previous panel (Terminus: Close or Ctrl + w) then toggle a new one.
This functionality is far from intuitive, at least for me.
from terminus.
It should be
{ "keys": ["alt+`"],
"command": "toggle_terminus_panel",
"args": {
"cwd": "${file_path:${folder}}"
}
}
from terminus.
I mistyped the original post. That does not work either.
from terminus.
It should work. (Note that it will toggle exiting terminal pane if there is any)
from terminus.
It doesn't work with the terminus panel but it does work when opening terminus in a new pane
from terminus.
You are all correct.
from terminus.
By the way, I meant panel when I said pane...
from terminus.
Sorry I don't understand what you mean. Did you mean to reopen this issue?
It seems clear that this is a bug since I cannot pass cwd
when Terminus is started using the Terminus panel.
from terminus.
Does it work if there is no Terminus Panel?
from terminus.
Let’s reopen it
from terminus.
I am still lost. toggle_terminus_panel
is used to toggle an already opened Terminus panel.
If no panel is found, it uses the provided settings to open a panel.
So what's your issue now?
from terminus.
Apologies and sorry for the noise, this seems to now work. I meant to update a previous issue with the log file. I may have had an outdated settings.
from terminus.
Great.
from terminus.
You could create a new panel via the command Terminus: Open Default Shell in Panel
. The toggle_terminus_panel
command will then toggle the newly opened panel.
from terminus.
The functionality that I'm trying to achieve is one of two things, either...
open / close in the panel using the same key binding
or
the ability to use Esc to close the panel
Are either of these possible? Also, is is possible to set up a shell config for cmder?
from terminus.
I find a place to do that:
settings-> packages-control settings -> Terminus -> Command Palette
and type that:
{
"caption": "Terminus: Open Default Shell in Panel",
"command": "terminus_open",
"args": {
"show_in_panel": true,
"cwd": "${file_path:${folder}}" // diff is here, give it a cwd param
}
}
default setting is :
{
"caption": "Terminus: Open Default Shell in Panel",
"command": "terminus_open",
"args": {"show_in_panel": true}
}
from terminus.
I figured out something that works for me. The first step was to disable escape from closing the panel when not focused. This is important when, for example, you have a multiple line selection and you want to drop to a single line selection without closing the panel.
I use Ctrl + Shift + ` to perform several context aware functions...
- to create (a non-existent) terminal
- to show (a hidden) terminal
- to focus (a visible non-focused) terminal
- to hide (a visible focused) terminal
I use escape to close a focused terminal.
Since the keys are very close to one another you can do a quick "double tap" of sorts to achieve the functionality (focus/hide, focus/close) that you desire.
{ "keys": ["escape"], "command": "pass", "context": [
{ "key": "panel_visible", "operator": "equal", "operand": true },
{ "key": "panel_has_focus", "operator": "equal", "operand": false},
{ "key": "num_selections", "operator": "equal", "operand": 1 },
{ "key": "has_next_field", "operator": "equal", "operand": false },
{ "key": "has_prev_field", "operator": "equal", "operand": false },
{ "key": "overlay_visible", "operator": "equal", "operand": false },
{ "key": "popup_visible", "operator": "equal", "operand": false },
{ "key": "auto_complete_visible", "operator": "equal", "operand": false }
]},
{ "keys": ["escape"], "command": "single_selection", "context": [
{ "key": "num_selections", "operator": "not_equal", "operand": 1 },
{ "key": "panel_visible", "operator": "equal", "operand": true },
{ "key": "panel_has_focus", "operator": "equal", "operand": false }
]},
{ "keys": ["escape"], "command": "clear_fields", "context": [
{ "key": "has_next_field", "operator": "equal", "operand": true },
{ "key": "panel_visible", "operator": "equal", "operand": true },
{ "key": "panel_has_focus", "operator": "equal", "operand": false }
]},
{ "keys": ["escape"], "command": "clear_fields", "context": [
{ "key": "has_prev_field", "operator": "equal", "operand": true },
{ "key": "panel_visible", "operator": "equal", "operand": true },
{ "key": "panel_has_focus", "operator": "equal", "operand": false }
]},
{ "keys": ["escape"], "command": "terminus_close", "context": [
{ "key": "panel_visible", "operator": "equal", "operand": true },
{ "key": "panel_has_focus", "operator": "equal", "operand": true }
]},
{ "keys": ["ctrl+shift+`"],
"command": "toggle_terminus_panel",
"args": {
"cwd": "${file_path:${folder}}"
}
},
from terminus.
My previous code was a bit problematic. This works better...
{ "keys": ["escape"], "command": "pass", "context": [
{ "key": "panel_visible", "operator": "equal", "operand": true },
{ "key": "panel_has_focus", "operator": "equal", "operand": false},
{ "key": "num_selections", "operator": "equal", "operand": 1 },
{ "key": "has_next_field", "operator": "equal", "operand": false },
{ "key": "has_prev_field", "operator": "equal", "operand": false },
{ "key": "overlay_visible", "operator": "equal", "operand": false },
{ "key": "popup_visible", "operator": "equal", "operand": false },
{ "key": "auto_complete_visible", "operator": "equal", "operand": false },
{ "key": "panel", "operator": "not_equal", "operand": "find"},
{ "key": "panel", "operator": "not_equal", "operand": "incremental_find"},
{ "key": "panel", "operator": "not_equal", "operand": "find_in_files"},
{ "key": "panel", "operator": "not_equal", "operand": "replace"}
]},
{ "keys": ["escape"], "command": "single_selection", "context": [
{ "key": "num_selections", "operator": "not_equal", "operand": 1 },
{ "key": "panel_visible", "operator": "equal", "operand": true },
{ "key": "panel_has_focus", "operator": "equal", "operand": false }
]},
{ "keys": ["escape"], "command": "clear_fields", "context": [
{ "key": "has_next_field", "operator": "equal", "operand": true },
{ "key": "panel_visible", "operator": "equal", "operand": true },
{ "key": "panel_has_focus", "operator": "equal", "operand": false }
]},
{ "keys": ["escape"], "command": "clear_fields", "context": [
{ "key": "has_prev_field", "operator": "equal", "operand": true },
{ "key": "panel_visible", "operator": "equal", "operand": true },
{ "key": "panel_has_focus", "operator": "equal", "operand": false }
]},
{ "keys": ["escape"], "command": "terminus_close", "context": [
{ "key": "panel_visible", "operator": "equal", "operand": true },
{ "key": "panel_has_focus", "operator": "equal", "operand": true },
{ "key": "terminus_view" }
]},
{ "keys": ["ctrl+shift+`"],
"command": "toggle_terminus_panel",
"args": {
// "config_name": "Default",
"cwd": "${file_path:${folder}}"
}
},
from terminus.
Related Issues (20)
- [Fixed] activate a conda environment before calling Python
- Terminus Build System not working for Python since Python v3.11
- autocomplete suggestion
- ANSI escaping not properly for git bash HOT 1
- auto_close does not close based on process return value
- ST 4170 breaks Terminus HOT 4
- Unique .sublime-syntax for terminal views HOT 6
- auto hide terminal if build output is empty HOT 1
- Bright code without color specified results in no bright text
- Terminus flashes when typing when using any monokai pro theme
- Terminus doesn't work at all, outputs "C:\Python312\ -u" at the beginning of an error HOT 1
- Is it possible that when changing projects the path in the terminus panel changes?
- [Feature request] Customize working dir in project settings.
- Terminus not recognized by LSP HOT 1
- Add ctrl+s (Save) to support list of `preserve_keys`
- oh-my-posh colors issue
- Terminus stopped working HOT 2
- Thank you for this package
- Default Terminus key bindings are overridden by default Sublime Text key bindings HOT 1
- How to open panel in current file directory. HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from terminus.