penn.vim is an editorial environment for linguistic annotations in penn-treebank style, working in Vim / Neovim. This plugin provides the following features:
- Syntax highlight scheme
- Key mappings
Put the plugin folder in your .vim directory, or use plugin managers.
Enable the filetype detection, plugin and indent (by the command :filetype plugin indent on
)
Type | Highlight Group | Examples |
---|---|---|
Non-terminal nodes | Label | NP, VP |
Ill-formed non-terminal nodes | Error | ADA, VI{J%$#KLSDF adjkds}sad |
Terminal nodes | Constant | N, V |
Dislocation indices | Identifier | NP-1, VP-2 |
Auxiliaries | Special | N;{additional info}, *pro* |
Comments | Comment | (COMMENT {commentcommentcomment....}) |
in Lucius Light High Constrast color scheme
Key | Type | Function Name | Function |
---|---|---|---|
an (all of the node) |
Visual, Operator | <plug> ***** |
select all the node |
in (the inside of the node) |
Visual, Operator | <plug> ***** |
select all of the child node(s) |
as (all of the sentence) |
Visual, Operator | <plug> ***** |
select the root node |
is (the inside of the sentence) |
Visual, Operator | <plug> ***** |
select all of the node(s) immediately dominated by the root |
(unimplemented) nn (the next node) |
Visual | <plug> ***** |
capture the next sister node |
NN |
Visual | <plug> ***** |
capture the previous sister node |
(unimplemented) <LocalLeader>wn ? |
Normal, Operator, Visual | go to the beginning of the next sister node | |
(unimplemented) <LocalLeader>en ? |
Normal, Operator, Visual | go to the end of the current node | |
(unimplemented) <LocalLeader>bn ? |
Normal, Operator, Visual | go to the beginning of the current node | |
(unimplemented) <LocalLeader>gen ? |
Normal, Operator, Visual | go to the end of the previous node |
van
: select the whole node in Visual mode"+yin
: yank all the child node(s) to the sytem clipboardd2an
: delete the node immediately dominating the currently selected node in Visual mode
The motions / text objects an
, in
, nn
and NN
can be used recursively.
The author welcomes any contributions for this Vim / Neovim plugin by reporting bugs, creating issues or making pull requests.
The current tasks:
- Refactoring of the codes using
searchpairpos()
- Implementation of new features
See LINCENSE
.