Merge pull request #1413 from Ryooooooga/feature/edit-line

Make os.editCommand customizable using template
This commit is contained in:
Mark Kopenga
2021-08-23 10:15:38 +02:00
committed by GitHub
11 changed files with 104 additions and 22 deletions
+19
View File
@@ -65,6 +65,7 @@ git:
parseEmoji: false
os:
editCommand: '' # see 'Configuring File Editing' section
editCommandTemplate: '{{editor}} {{filename}}'
openCommand: ''
refresher:
refreshInterval: 10 # file/submodule refresh interval in seconds
@@ -241,6 +242,24 @@ os:
Lazygit will log an error if none of these options are set.
You can specify a line number you are currently at when in the line-by-line mode.
```yaml
os:
editCommand: 'vim'
editCommandTemplate: '{{editor}} +{{line}} {{filename}}'
```
or
```yaml
os:
editCommand: 'code'
editCommandTemplate: '{{editor}} --goto {{filename}}:{{line}}'
```
`{{editor}}` in `editCommandTemplate` is replaced with the value of `editCommand`.
### Recommended Config Values
for users of VSCode