Cookbooks
nano
documentation
Nano Config

nano_config

back to resource list (opens in a new tab)

Configures the nanorc files at a global level

For reference and ideas: nanorc by scopatz (opens in a new tab)

Introduced: v2.0.0

Actions

  • :create
  • :delete

Properties

NameTypeDefaultDescriptionAllowed Values
syntax_nameStringName Property, Name of the config file to create
filename_regexString/etc/defaultRegex of file names to matchValid directory
colourHash{}Colour groups for mating regex
optionsHash{}Additional options
config_directoryString/etc/nanorc.dThe directory where the nano configuration files resideValid directory
config_fileString/etc/nanorcThe nano configuration fileValid file path
cookbookStringnanoWhich cookbook to look in for the template
sourceStringnanorc_conf.erbName of the template

Examples

nano_config 'ruby' do
  filename_regex '"\\.rb$" "Gemfile" "config.ru" "Rakefile" "Capfile" "Vagrantfile"'
  colour {
    yellow: '\\<(BEGIN|END|alias|and|begin|break|case|class|def|defined\\?|do|else|elsif|end|ensure|false|for|if|in|module|next|nil|not|or|redo|rescue|retry|return|self|super|then|true|undef|unless|until|when|while|yield)\\>'
  }
  options {
    header: '"^#!.*/(env +)?ruby( |$)"'
  }
end