Up until very recently, I was primarily a user of nano for editing text. I still believe that for most uses, nano is powerful enough yet simple enough to be a very useful editor.
Recently I have switched to using GNU emacs (from the terminal). I wrestled with it for a while to get it to behave the way I wanted (which is a weird amalgam of nano behaviour, and various other influences).
My primary uses for a text editor are to edit Haskell, C++, and LaTeX (with a little Rain). These pages are for me to put up my configuration files for nano and emacs in case anyone else finds them useful.
syntax "cpp-file" ".*\.c$" ".*\.cpp$" ".*\.h$"
color brightblue "\<float\>" "\<char\>" "\<int\>"
color brightblue "\<void\>" "\<bool\>" "\<double\>"
color brightblue "\<static\>" "\<const\>" "\<struct\>"
color brightblue "\<inline\>" "\<class\>" "\<union\>"
color brightblue "\<if\>" "\<while\>" "\<do\>"
color brightblue "\<else\>" "\<case\>" "\<switch\>"
color brightblue "\<return\>" "\<for\>" "\<namespace\>"
color brightblue "\<template\>" "\<public\>"
color brightblue "\<protected\>" "\<private\>"
color brightblue "\<typename\>" "\<long\>" "\<short\>"
color brightblue "\<this\>" "\<unsigned\>" "\<signed\>"
color brightblue "\<typedef\>" "\<friend\>"
color brightblue "\<virtual\>" "\<using\>" "\<try\>"
color brightblue "\<throw\>" "\<catch\>" "\<break\>"
color brightblue "\<continue\>" "\<operator\>"
color brightblue "\<sizeof\>" "\<mutable\>"
color brightblue "\<volatile\>" "\<register\>"
color brightblue "\<goto\>" "\<new\>" "\<delete\>"
color brightblue "\<default\>" "\<enum\>" "\<explicit\>"
color brightblue "\<extern\>"
color red "#define" "#include" "#ifn*def" "#endif"
color red "#elif" "#else" "#if" "#undef"
color brightwhite "\<true\>" "\<false\>" "\<NULL\>"
#For C++CSP:
color brightwhite "\<...2...Channel\>" "\<DATA_TYPE\>"
color green "//.*"
color green start="/\*" end="\*/"
#Rain -- in progress:
syntax "rain-file" ".*\.rain$"
color brightblue "\<if\>" "\<while\>"
color brightblue "\<seqeach\>" "\<pareach\>" "\<par\>"
color brightblue "\<seq\>" "\<return\>" "\<true\>"
color brightblue "\<false\>"
color red "\<[su]int[[:digit:]]+\>" "\<int\>"
color red "\?" "!"
color red ":"
color yellow "\<process\>" "\<function\>"
syntax "haskell-file" ".*\.hs$"
color brightred "\|" "->" "<-" "@" "!" "~" "=>" "&&" "="
color brightblue "^[[:space:]]*[^\"[:space:]]*[[:space:]]*::"
color brightblue "::"
color red "\<import\>"
color yellow "\<as\>" "\<case\>" "\<of\>"
color yellow "\<class\>" "\<data\>" "\<default\>"
color yellow "\<deriving\>" "\<do\>" "\<forall\>"
color yellow "\<foreign\>" "\<hiding\>" "\<if\>"
color yellow "\<then\>" "\<else\>" "\<_\>"
color yellow "\<infix\>" "\<infixl\>" "\<infixr\>"
color yellow "\<instance\>" "\<let\>" "\<in\>"
color yellow "\<mdo\>" "\<module\>" "\<newtype\>"
color yellow "\<qualified\>" "\<type\>" "\<where\>"
color green "--.*"
color green start="\{\-" end="\-\}"
syntax "TeX" "\.tex$"
color red "\\(.|([A-Za-z]*))\{"
color red "\}"
color green "%.*"
This page copyright Neil Brown, 2006-2011.