GNU ELPA - csv-mode


Major mode for editing comma/char separated values
csv-mode-1.21.tar, 2022-Jun-24, 90.0 KiB
Browse repository
CGit or Gitweb

To install this package, run in Emacs:

M-x package-install RET csv-mode RET

Full description

This package implements CSV mode, a major mode for editing records
in a generalized CSV (character-separated values) format.  It binds
files with prefix ".csv" to `csv-mode' (and ".tsv" to `tsv-mode') in

In CSV mode, the following commands are available:

- C-c C-s (`csv-sort-fields') and C-c C-n (`csv-sort-numeric-fields')
  respectively sort lexicographically and numerically on a
  specified field or column.

- C-c C-r (`csv-reverse-region') reverses the order.  (These
  commands are based closely on, and use, code in `sort.el'.)

- C-c C-k (`csv-kill-fields') and C-c C-y (`csv-yank-fields') kill
  and yank fields or columns, although they do not use the normal
  kill ring.  C-c C-k can kill more than one field at once, but
  multiple killed fields can be yanked only as a fixed group
  equivalent to a single field.

- `csv-align-mode' keeps fields visually aligned, on-the-fly.
  It truncates fields to a maximum width that can be changed per-column
  with `csv-align-set-column-width'.
  Alternatively, C-c C-a (`csv-align-fields') aligns fields into columns
  and C-c C-u (`csv-unalign-fields') undoes such alignment;
  separators can be hidden within aligned records (controlled by
  `csv-invisibility-default' and `csv-toggle-invisibility').

- C-c C-t (`csv-transpose') interchanges rows and columns.  For
  details, see the documentation for the individual commands.

- `csv-set-separator' sets the CSV separator of the current buffer,
  while `csv-guess-set-separator' guesses and sets the separator
  based on the current buffer's contents.
  `csv-guess-set-separator' can be useful to add to the mode hook
  to have CSV mode guess and set the separator automatically when
  visiting a buffer:

    (add-hook 'csv-mode-hook 'csv-guess-set-separator)

CSV mode can recognize fields separated by any of several single
characters, specified by the value of the customizable user option
`csv-separators'.  CSV data fields can be delimited by quote
characters (and must if they contain separator characters).  This
implementation supports quoted fields, where the quote characters
allowed are specified by the value of the customizable user option
`csv-field-quotes'.  By default, the both commas and tabs are considered
as separators and the only field quote is a double quote.
These user options can be changed ONLY by customizing them, e.g. via M-x

CSV mode commands ignore blank lines and comment lines beginning
with the value of the buffer local variable `csv-comment-start',
which by default is #.  The user interface is similar to that of
the standard commands `sort-fields' and `sort-numeric-fields', but
see the major mode documentation below.

The global minor mode `csv-field-index-mode' provides display of
the current field index in the mode line, cf. `line-number-mode'
and `column-number-mode'.  It is on by default.

Old versions

csv-mode-1.20.tar.lz2022-May-1320.1 KiB
csv-mode-1.19.tar.lz2022-Apr-0818.6 KiB
csv-mode-1.18.tar.lz2021-Dec-2718.5 KiB
csv-mode-1.17.tar.lz2021-Dec-0118.4 KiB
csv-mode-1.16.tar.lz2021-Sep-1018.4 KiB
csv-mode-1.15.tar.lz2021-Feb-2318.4 KiB
csv-mode-1.14.tar.lz2020-Dec-0920.2 KiB
csv-mode-1.13.tar.lz2020-Dec-0620.2 KiB
csv-mode-1.12.tar.lz2020-Feb-1620.1 KiB
csv-mode-1.11.el.lz2020-Jan-3119.4 KiB
csv-mode-1.11.tar.lz2020-Feb-1520.1 KiB
csv-mode-1.10.el.lz2019-Oct-2219.3 KiB
csv-mode-1.9.el.lz2019-Sep-2417.0 KiB
csv-mode-1.8.el.lz2019-Sep-1815.0 KiB
csv-mode-1.7.el.lz2017-Dec-0514.8 KiB
csv-mode-1.6.el.lz2016-Apr-2214.1 KiB
csv-mode-1.5.el.lz2015-Jul-0914.0 KiB
csv-mode-1.4.el.lz2015-May-2513.9 KiB
csv-mode-1.3.el.lz2015-Apr-1613.9 KiB
csv-mode-1.2.el.lz2013-Apr-2513.9 KiB