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
Copy file name to clipboardExpand all lines: DOCS.md
+38-3Lines changed: 38 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,8 +9,9 @@
9
9
2.[Agenda mappings](#agenda-mappings)
10
10
3.[Capture mappings](#capture-mappings)
11
11
4.[Org mappings](#org-mappings)
12
-
5.[Text objects](#text-objects)
13
-
6.[Dot repeat](#dot-repeat)
12
+
5.[Edit Src mappings](#edit-src)
13
+
6.[Text objects](#text-objects)
14
+
7.[Dot repeat](#dot-repeat)
14
15
3.[Document Diagnostics](#document-diagnostics)
15
16
4.[Autocompletion](#autocompletion)
16
17
5.[Abbreviations](#abbreviations)
@@ -146,7 +147,6 @@ Marker used to indicate a folded headline.
146
147
When set to `time`(default), adds `CLOSED` date when marking headline as done.<br />
147
148
When set to `false`, it is disabled.
148
149
149
-
150
150
#### **org_highlight_latex_and_related**
151
151
*type*: `string|nil`<br />
152
152
*default value*: `nil`<br />
@@ -166,6 +166,19 @@ Possible values:
166
166
*`indent` - Use default indentation that follows headlines/checkboxes/previous line indent
167
167
*`noindent` - Disable indentation. All lines start from 1st column
168
168
169
+
#### **org_src_window_setup**
170
+
*type*: `string|function`<br />
171
+
*default value*: "top 16new"<br />
172
+
If the value is a string, it will be run directly as input to `:h vim.cmd`, otherwise if the value is a function it will be called. Both
173
+
values have the responsibility of opening a buffer (within a window) to show the special edit buffer. The content of the buffer will be
174
+
set automatically, so this option only needs to handle opening an empty buffer.
175
+
176
+
#### **org_edit_src_content_indentation**
177
+
*type*: `number`<br />
178
+
*default value*: 0<br />
179
+
The indent value for content within `SRC` block types beyond the existing indent of the block itself. Only applied when exiting from
180
+
an `org_edit_special` action on a `SRC` block.
181
+
169
182
#### **org_custom_exports**
170
183
*type*: `table`<br />
171
184
*default value*: `{}`<br />
@@ -623,6 +636,11 @@ using the '+' character. Example: `file:/home/user/.config/nvim/init.lua +10`
623
636
* Headline with `CUSTOM_ID` property (starts with `#`)
624
637
* Fallback: If file path, opens the file, otherwise, tries to find the Headline title.
625
638
When date is under the cursor, open the agenda for that day.<br />
639
+
#### **org_edit_special**
640
+
*mapped to*: `<Leader>o'`<br />
641
+
Open a source block for editing in a temporary buffer of the associated `filetype`.<br />
642
+
This is useful for editing text with language servers attached, etc. When the buffer is closed, the text of the underlying source block in the original Org file is updated.
643
+
*Note that if the Org file that the source block comes from is edited before the special edit buffer is closed, the edits will not be applied. The special edit buffer contents can be recovered from :messages output*
626
644
#### **org_cycle**
627
645
*mapped to*: `<TAB>`<br />
628
646
Cycle folding for current headline
@@ -739,6 +757,22 @@ require('orgmode').setup({
739
757
})
740
758
```
741
759
760
+
### Edit Src
761
+
762
+
Mappings applied when editing a `SRC` block content via `org_edit_special`.
763
+
764
+
#### **org_edit_src_abort**
765
+
*mapped to*: `<Leader>ok`<br />
766
+
Abort changes made to temporary buffer created from the content of a `SRC` block, see above.<br />
767
+
768
+
#### **org_edit_src_save**
769
+
*mapped to*: `<Leader>ow`<br />
770
+
Apply changes from the special buffer to the source Org buffer<br />
771
+
772
+
#### **org_edit_src_show_help**
773
+
*mapped to*: `g?`<br />
774
+
Show help within the temporary buffer used to edit the content of a `SRC` block.<br />
775
+
742
776
### Text objects
743
777
744
778
Operator mappings for `org` files.<br />
@@ -919,6 +953,7 @@ For adding/changing TODO keyword colors see [org-todo-keyword-faces](#org_todo_k
919
953
920
954
* The following use vanilla _Vim_ syntax matching, and will work without _Treesitter_ highlighting enabled.
921
955
956
+
`OrgEditSrcHighlight`: The highlight for the source content in an _Org_ buffer while it is being edited in an edit special buffer
922
957
`OrgAgendaDeadline`: A item deadline in the agenda view
923
958
`OrgAgendaScheduled`: A scheduled item in the agenda view
924
959
`OrgAgendaScheduledPast`: A item past its scheduled date in the agenda view
The indent value for content within `SRC` block types beyond the existing indent of the block itself. Only applied when exiting from
358
+
an `org_edit_special` action on a `SRC` block.
359
+
337
360
ORG_CUSTOM_EXPORTS *orgmode-org_custom_exports*
338
361
339
362
type: `table`
@@ -894,6 +917,13 @@ using the '+' character. Example: `file:/home/user/.config/nvim/init.lua +10`
894
917
* Fallback: If file path, opens the file, otherwise, tries to find the Headline title.
895
918
When date is under the cursor, open the agenda for that day.
896
919
920
+
ORG_EDIT_SPECIAL *orgmode-org_edit_special*
921
+
922
+
mapped to: `<Leader>o'`
923
+
Open a source block for editing in a temporary buffer of the associated `filetype`.
924
+
This is useful for editing text with language servers attached, etc. When the buffer is closed, the text of the underlying source block in the original Org file is updated.
925
+
Note that if the Org file that the source block comes from is edited before the special edit buffer is closed, the edits will not be applied. The special edit buffer contents can be recovered from :messages output
926
+
897
927
ORG_CYCLE *orgmode-org_cycle*
898
928
899
929
mapped to: `<TAB>`
@@ -1070,6 +1100,25 @@ These mappings live under `mappings.org`, and can be changed like this:
1070
1100
})
1071
1101
<
1072
1102
1103
+
EDIT SRC *orgmode-edit_src*
1104
+
1105
+
Mappings applied when editing a `SRC` block content via `org_edit_special`.
1106
+
1107
+
ORG_EDIT_SRC_ABORT *orgmode-org_edit_src_abort*
1108
+
1109
+
mapped to: `<Leader>ok`
1110
+
Abort changes made to temporary buffer created from the content of a `SRC` block, see above.
1111
+
1112
+
ORG_EDIT_SRC_SAVE *orgmode-org_edit_src_save*
1113
+
1114
+
mapped to: `<Leader>ow`
1115
+
Apply changes from the special buffer to the source Org buffer
0 commit comments