Skip to content

Improved syntax highlighting for nftables in Vim

License

Notifications You must be signed in to change notification settings

awisse/vim-nftables

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

43 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

vim-nftables

Installation

NeoBundle is no longer actively maintained. In newer versions of vim, there is no need for a plugin manager. In order to install the plugin such that it will be loaded automatically on startup, execute the following instructions:

mkdir -p $HOME/.vim/pack/vendor/start
cd $HOME/.vim/pack/vendor/start
git checkout https://github.com/awisse/vim-nftables.git

NB: The "vendor" directory name can be substituted with any other name.

NeoBundle

Is no longer maintained but can be found here.

After installing NeoBundle, add the following to your vimrc:

NeoBundle 'nfnty/vim-nftables'

Notes

Recommendations

Note that this is not a full parser of the nftables syntax. If you choose a reserved keyword, like, for instance input, filter, forward as table, chain set or other object names, these will be highlighted like the corresponding keyword. So in order to fully benefit from this syntax highlighting, choose object and variable names that are not reserved words.

Note that there are 431 reserved words in nftables. To see all reserved words, run ./kw-count.py keywords/*.vim syntax/nftables.vim -q --all in the vim-nftables folder

About

Improved syntax highlighting for nftables in Vim

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Vim Script 56.3%
  • Python 43.7%