CoNLL-U major mode for emacs
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.


emacs mode for CoNLL-U files

this mode provides simple utilities for editing and viewing CoNLL-U files.

you can watch the following demo for an idea of what it can do:


default key bindings

key bindingdescription
C-c C-eedit token line at point interactively using a hydra
C-c C-aalign columns (inserts no real whitespace) in the selected region (defaults to the current sentence)
C-c C-uunalign columns in the selected region (defaults to current sentence)
C-c C-hmove point to head token of present token
C-c C-cclear field at point, placing _ as its value
C-c C-linsert empty token line at point or at next line (can be called with prefix argument for more lines)
M-ajump to the next sentence keeping current alignment
M-ejump to the previous sentence, keeping current alignment
C-c Nmove to field number N in a token line (C-c 0 moves to field number 10, i.e. MISC)

interactive editing

the default keybing C-c C-e calls a hydra for interactive editing. this enters an editing loop where you can navigate through the file or choose a field, edit it in a minibuffer, and press RET to confirm the edit; you can quit by pressing any unbound key or by pressing q. if you delete the field’s contents the empty field will be inserted automatically.



to be able to flycheck CoNLL-U buffers you need to:

  • obtain the script from the UD-tools repository (make sure you clone/download the whole repo, because the script depends on data and configuration files in there).
  • set the variable to the filepath of the script. you can use M-x customize-variable for this.


you can use the normal flycheck keybindings (here’s a nice summary). note that the demands a two-letter language code to do its validation; conllu-mode infers this from the file name, assuming it follows UD filename convention of starting with such a language code (as in pt_bosque-ud-test.conllu). if your file doesn’t start with a language code, flycheck will invoke the script with the default value of ud, which might throw spurious errors.

other features

  • highlighting comments, and upostag and deprel fields
  • truncate lines by default
  • show newline and tab characters using whitespace.el
  • aligning and unaligning column fields
  • jumping to next or previous sentence
  • jump to the token at point’s head


if you’d like to have a feature implemented, you should file at ticket at the issue tracker. here is our wishlist of what we would like to implement in the future:

  • hiding columns
  • call a parser to create CoNLL-U output from a sentence
  • call external visualization tool


you may install the latest versions from MELPA, or proceed to a manual installation:


set MELPA up if you haven’t already and then do:

M-x package-install RET conllu-mode

manual installation

first you must install the dependencies: assuming you have a standard Emacs distribution, you need to install s and flycheck.

after having installed the dependencies, clone the repo, as in:

$ cd ~/some/path/
$ git clone

make sure that the repository is in the emacs load path and that the autoloads are properly set with

(add-to-list 'load-path "~/some/path/conllu-mode")
(autoload 'conllu-mode "conllu-mode" "Major mode for editing CoNLL-U files." t)
(add-to-list 'auto-mode-alist '("\\.conllu\\'" . conllu-mode))

in your .emacs.


yes, please! even comments from experienced elispers are welcome. just send an email or open an issue – if you’d like a suggestion on what to work on, take a look at the open issues or at the missing features (above).