john pfeiffer
  • Home
  • Categories
  • Tags
  • Archives

Putty nano vi color settings

putty (for windows) is amazing - even better (auto copy!) than a "real" linux ssh client But once installed it hides the remote host connection details in the windows registry...

start -> run -> regedt32

Find "SimonTatham" (or a slower way is find "putty") HKEY_CURRENT_USER\Software\SimonTatham

Eventually, keep "finding" next until you see a key that's in HK Users

Under Simon -> Putty you should see a listing of every saved remote host

Export (from the "Simon" folder/key) and save the .reg file

Later when you want to restore/migrate right click on the .reg (in windows) and choose Merge

(or you can browse it with a text editor... but it's messy!)


If you change your putty default settings to use a light background and dark foreground next you must change some common editor colors (since bright yellow on white is unreadable)

sed 's/yellow/blue/g' -i /usr/share/nano/*.nanorc

/usr/share/nano/sh.nanorc

Here is an example for Bourne shell scripts.

left is the color, right is the content type that will appear in that color

syntax "sh" ".sh$" header "^#!./(ba|k|pdk)?sh[-0-9_]" icolor brightgreen "^[0-9A-Z_]+()" color green "\<(case|do|done|elif|else|esac|exit|fi|for|function|if|in|local|read|return|select|shift|then|time|until|while)>" color green "({|}|(|)|\;|]|[|`|\|\$|<|>|!|=|&||)" color green "-[Ldefgruwx]>" color green "-(eq|ne|gt|lt|ge|le|s|n|z)>" color brightblue "\<(cat|cd|chmod|chown|cp|echo|env|export|grep|install|let|ln|make|mkdir|mv|rm|sed|set|tar|touch|umask|unset)>" icolor brightred "\${?[0-9A-Z_!@#$?-]+}?" color cyan "(^|[[:space:]])#.$" color cyan ""(\.|[^"])"" "'(\.|[^'])'" color ,green "[[:space:]]+$"

/usr/share/nano/php.nanorc

/usr/share/vim/vimrc (usually sym linked to /etc/vim/vimrc)

I like brace matching

term bold, underline, reverse, italic, none cterm gui

ctermfg red, yellow, green, blue, magenta, cyan, white, black, gray ctermbg

guifg All of the above colors, plus many more; you may also use the #rrggbb format guibg

:hi PreProc ctermfg=magenta cterm=bold guifg=#FF00FF

Comment Comments within a program Constant Program constants, such as numbers, quoted strings, or true/false Identifier Variable identifier names Statement A programming language statement, usually a keyword like "if" or "while" PreProc A preprocessor, such as "#include" in C Type A variable datatype, such as "int" Special A special symbol, usually used for special characters like "\n" in strings Underlined Text that should be underlined Error Text which contains a programming language error


  • « Perl file parse fstab get set properties file
  • maven version number variable in manifest »

Published

Dec 17, 2012

Category

linux

~326 words

Tags

  • color 6
  • linux 249
  • nano 2
  • putty 2
  • settings 1
  • vi 2