()
| 620 | } |
| 621 | |
| 622 | func getEditorCommand() string { |
| 623 | editor := os.Getenv("EDITOR") |
| 624 | |
| 625 | switch editor { |
| 626 | case "atom": |
| 627 | return "atom -w" |
| 628 | case "subl": |
| 629 | return "subl -n -w" |
| 630 | case "mate": |
| 631 | return "mate -w" |
| 632 | case "vim": |
| 633 | return "vim" |
| 634 | case "nano": |
| 635 | return "nano" |
| 636 | case "emacs": |
| 637 | return "emacs" |
| 638 | default: |
| 639 | return "vi" |
| 640 | } |
| 641 | } |
| 642 | |
| 643 | func migrateToV4(ctx context.DnoteCtx) error { |
| 644 | configPath := fmt.Sprintf("%s/dnoterc", ctx.Paths.LegacyDnote) |