Comment Supplemental

Note: Textadept 7.x includes these now. This page is deprecated.

Usually, language-specific modules provide the Textadept editing module (which is responsible for executing the 'Block Comment' menu and key commands) with comment strings. Instead of creating separate modules, you can add the following directly to your ~/.textadept/init.lua: (or other file included by init.lua)

_M.textadept.editing.comment_string = {
  actionscript = '//',
  ada = '--',
  antlr = '//',
  adpl = '!',
  applescript = '--',
  asp = '\'',
  awk = '#',
  batch = ':',
  boo = '#',
  coffeescript = '#',
  cpp = '//',
  csharp = '//',
  dmd = '//',
  dot = '//',
  eiffel = '--',
  erlang = '%',
  forth = '|\\',
  fortran = '!',
  gap = '#',
  gettext = '#',
  gnuplot = '#',
  groovy = '//',
  haskell = '--',
  idl = '//',
  ini = '#',
  io = '#',
  java = '//',
  javascript = '//',
  lisp = ';',
  lua = '--',
  makefile = '#',
  matlab = '#',
  objective_c = '//',
  pascal = '//',
  perl = '#',
  php = '//',
  pike = '//',
  postscript = '%',
  props = '#',
  python = '#',
  r = '#',
  rebol = ';',
  rexx = '--',
  rhtml = '',
  ruby = '#',
  ragel = '#',
  scheme = ';',
  bash = '#',
  sql = '#',
  tex = '%',
  tcl = '#',
  vala = '//',
  verilog = '//',
  vb = '\'',
}

If your prefer the comment string to be followed by a space (as in the download version above):

_M.textadept.editing.comment_string = {
  actionscript = '// ',
  ada = '-- ',
  antlr = '// ',
  adpl = '! ',
  applescript = '-- ',
  asp = '\' ',
  awk = '# ',
  batch = ': ',
  boo = '# ',
  coffeescript = '# ',
  cpp = '// ',
  csharp = '// ',
  dmd = '// ',
  dot = '// ',
  eiffel = '-- ',
  erlang = '% ',
  forth = '|\\ ',
  fortran = '! ',
  gap = '# ',
  gettext = '# ',
  gnuplot = '# ',
  groovy = '// ',
  haskell = '-- ',
  idl = '// ',
  ini = '# ',
  io = '# ',
  java = '// ',
  javascript = '// ',
  lisp = '; ',
  lua = '-- ',
  makefile = '# ',
  matlab = '# ',
  objective_c = '// ',
  pascal = '// ',
  perl = '# ',
  php = '// ',
  pike = '// ',
  postscript = '% ',
  props = '# ',
  python = '# ',
  r = '# ',
  rebol = '; ',
  rexx = '-- ',
  rhtml = ' ',
  ruby = '# ',
  ragel = '# ',
  scheme = '; ',
  bash = '# ',
  sql = '# ',
  tex = '% ',
  tcl = '# ',
  vala = '// ',
  verilog = '// ',
  vb = '\' ',
}

Edited on Tuesday, October 29th 2013 at 4:14 PM.