Function: tsv-mode

tsv-mode is an interactive and natively compiled function defined in csv-mode.el.

Signature

(tsv-mode)

Documentation

Major mode for editing files of tab-separated value type.

In addition to any hooks its parent mode csv-mode might have run, this mode runs the hook tsv-mode-hook, as the final or penultimate step during initialization.

  undefined

Key Bindings

This command is not in any keymaps.

Source Code

;; Defined in /nix/store/3gmjnyw9n226b7k7jamikx980vf8267p-emacs-packages-deps/share/emacs/site-lisp/elpa/csv-mode-1.27/csv-mode.el
;;;###autoload
(define-derived-mode tsv-mode csv-mode "TSV"
  "Major mode for editing files of tab-separated value type."
  :group 'CSV
  ;; In TSV we know TAB is the only possible separator.
  (setq-local csv-separators '("\t"))
  ;; FIXME: Copy&pasted from the `:set'ter of csv-separators!
  (setq-local csv-separator-chars '(?\t))
  (setq-local csv--skip-chars "^\n\t")
  (setq-local csv-separator-regexp "\t")
  (setq-local csv-font-lock-keywords
	      ;; NB: csv-separator-face variable evaluates to itself.
	      `((,csv-separator-regexp (0 'csv-separator-face))))

  ;; According to wikipedia, TSV doesn't use quotes but uses backslash escapes
  ;; of the form \n, \t, \r, and \\ instead.
  (setq-local csv-field-quotes nil))