def open_rewriter
      editor = [ENV['SYNVERT_EDITOR'], ENV['EDITOR']].find { |e| !e.nil? && !e.empty? }
      return puts 'To open a synvert snippet, set $EDITOR or $SYNVERT_EDITOR' unless editor

      path = File.expand_path(File.join(default_snippets_path, "lib/#{@options[:snippet_name]}.rb"))
      if File.exist? path
        system editor, path
      else
        puts "Can't run #{editor} #{path}"
      end
    end
def open_rewriter
      editor = [ENV['SYNVERT_EDITOR'], ENV['EDITOR']].find { |e| !e.nil? && !e.empty? }
      return puts 'To open a synvert snippet, set $EDITOR or $SYNVERT_EDITOR' unless editor

      path = File.expand_path(File.join(default_snippets_path, "lib/#{@options[:snippet_name]}.rb"))
      if File.exist? path
        system editor, path
      else
        puts "Can't run #{editor} #{path}"
      end
    end
Open one rewriter.