You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
> All settings are self explanatory, but please read below about [`preserve_context`](#-notes-on-globals-locals-and-preserving-execution-context) option.
48
47
49
-
Mappings are local to the console, except the ones for toggling the console - `` ` `` and attaching to a buffer - ``<Leader>` ``. All mappings can be overridden in your custom
50
-
config. If you want to delete a mapping - set its value to `false`.
48
+
Mappings are local to the console, except the ones for toggling the console - `` ` `` and attaching to a buffer - ``<Leader>` ``.
49
+
All mappings can be overridden in your custom config. If you want to delete a mapping - set its value to `false`.
51
50
52
51
<details><summary>Default Settings</summary>
53
52
@@ -93,8 +92,6 @@ opts = {
93
92
94
93
</details>
95
94
96
-
<br>
97
-
98
95
## 🚀 Basic usage (with default mappings)
99
96
100
97
- Install, press the mapped key `` ` `` and start exploring.
@@ -124,10 +121,11 @@ opts = {
124
121
> [!IMPORTANT]
125
122
> By default, the option `preserve_context` is on, which means that the execution context is preserved between evaluations.
126
123
127
-
All the code executed in the console is evaluated in isolated environment, which means that any global variables that you declare will not be persisted
128
-
in Neovim's global environment. If you purposefully want to alter the global state, use `_G.My_variable = ..`.
124
+
All the code executed in the console is evaluated in isolated environment, which means that any global variables that you declare will not be persisted in Neovim's global environment.
125
+
If you purposefully want to alter the global state, use `_G.My_variable = ..`.
129
126
130
127
The option `preserve_context` implies that variables without `local` will be stored in the console's local context and preserved between executions.
128
+
131
129
So, if you first execute `a = 1`, then `a = a + 1` and then `a` - you will get `2`.
132
130
133
131
Also, by default, the option `strip_local` is on, which means that `local` modifier is stripped from top-level variable declarations and these variables are also stored in the context.
@@ -139,8 +137,6 @@ There are two functions available within the console:
0 commit comments