<commit_before>package cmd

import (
	"fmt"
	"io/ioutil"
	"log"
	"os"
	"os/exec"
	"strconv"

	"github.com/spf13/cobra"
)

func openEditor(file string) {
	cmd := exec.Command("vim", file)
	cmd.Stdin = os.Stdin
	cmd.Stdout = os.Stdout
	cmd.Stderr = os.Stderr
	err := cmd.Run()
	if err != nil {
		println("Error received from vim")
		os.Exit(-1)
	}
}

func Edit(identifier int) {<commit_msg>Try to use nvim if possible<commit_after>package cmd

import (
	"fmt"
	"io/ioutil"
	"log"
	"os"
	"os/exec"
	"strconv"

	"github.com/spf13/cobra"
)

func openEditor(file string) {
	editor, exists := os.LookupEnv("EDITOR")

	if !exists {
		editor = "vim"
	}
	cmd := exec.Command(editor, file)

	cmd.Stdin = os.Stdin
	cmd.Stdout = os.Stdout
	cmd.Stderr = os.Stderr

	err := cmd.Run()
	if err != nil {
		println("Error received from vim")
		os.Exit(-1)
	}
}

func Edit(identifier int) {
{'fraction_non_alphanumeric': 0.1632183908045977, 'fraction_numerical': 0.006896551724137931, 'mean_word_length': 3.4896907216494846, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6735553', 'n_tokens_mistral': 391, 'n_tokens_neox': 376, 'n_words': 82}