rc files: Difference between revisions

From Fluids Wiki
Jump to navigation Jump to search
mNo edit summary
 
(2 intermediate revisions by 2 users not shown)
Line 7: Line 7:


Of course, how you configure your programs comes down to personal preference, so feel free to modify however you wish.  
Of course, how you configure your programs comes down to personal preference, so feel free to modify however you wish.  
== shell rc files (for bash, csh, tcsh) ==
Accounts on the MFCF-administered machines come with .cshrc and .profile files that set up your login shell with recommended compilers, commands,
optional modules, etc. See the [[Login script]] wiki page for details.


== ssh/config ==
== ssh/config ==
Line 29: Line 34:
     ServerAliveInterval 540
     ServerAliveInterval 540
     ForwardX11 yes
     ForwardX11 yes
# MATH hosts
Host boogaloo hood
    HostName %h.math.uwaterloo.ca
    ServerAliveInterval 540
    ForwardX11 no


</syntaxhighlight>
</syntaxhighlight>
Line 71: Line 82:
set smartcase
set smartcase
set ignorecase
set ignorecase
" Set font
:set guifont=Courant:h16


" <Ctrl-l> redraws the screen and removes any search highlighting.
" <Ctrl-l> redraws the screen and removes any search highlighting.

Latest revision as of 14:44, 20 December 2018

This page contains some configuration (rc) files for various programs. They provide default settings and functionality. For example, the vimrc file turns syntax highlighting on by default and specifies the colour scheme.

These have slowly developed through additions from various lab members, so if you have something that you think would be a useful addition, consider adding it!

Of course, how you configure your programs comes down to personal preference, so feel free to modify however you wish.

shell rc files (for bash, csh, tcsh)

Accounts on the MFCF-administered machines come with .cshrc and .profile files that set up your login shell with recommended compilers, commands, optional modules, etc. See the Login script wiki page for details.

ssh/config

Adding the following lines to ~/.ssh/config will improve the user-friendliness of shelling into remote servers, especially if you do it often.

For example, using the config settings below you can simply use ssh graham instead of ssh <userid>@graham.computecanada.ca. Additionally, the ServerAliveInterval helps to maintain the server connection, even if your inactive for a while. Setting the ForwardX11 flag sets whether or not X11 forwarding (the -X flag) should be used by default.

# COMPUTE CANADA hosts
Host graham orca
    HostName %h.computecanada.ca
    ServerAliveInterval 540
    ForwardX11 no

# Private MATH hosts
Host bow minnewanka waterton
    HostName %h.math.private.uwaterloo.ca
    ServerAliveInterval 540
    ForwardX11 yes

# MATH hosts
Host boogaloo hood
    HostName %h.math.uwaterloo.ca
    ServerAliveInterval 540
    ForwardX11 no

vimrc

If you're new to Vim, copy the following into ~/.vimrc to set some useful default settings.

:set ruler

" Turn on syntax highlighting
:syntax enable
:colorscheme desert
:au Syntax python :set autoindent
:au Syntax c :set noautoindent
:au Syntax c :set cindent
:au Syntax cpp :set noautoindent
:au Syntax cpp :set cindent

set backspace=indent,eol,start
set laststatus=2
set number

" Allow tab expansions (e.g. when opening files)
set wildmenu
set wildmode=longest,list

set expandtab
set shiftwidth=4
set tabstop=4

filetype plugin indent on

:set hlsearch

" Case insensitive search, unless an upper-case
"   character is included in the search string
"   adding \C to the search string also enforces
"   case sensitive search
set smartcase
set ignorecase

" Set font
:set guifont=Courant:h16

" <Ctrl-l> redraws the screen and removes any search highlighting.
nnoremap <silent> <C-l> :nohl<CR><C-l>

matplotlibrc

Copy the following into ~/.config/matplotlib/matplotlibrc to set default matplotlib parameters. A complete list of available matplotlibrc settings can be found here.

# Un-comment this setting for systems without a display (i.e. Orca, Graham, etc)
#backend : Agg

# Plot settings
lines.linewidth : 1.5

# Font settings
font.size           : 10
font.family         : serif
font.sans-serif     : Helvetica, Avant Garde, Computer Modern Sans serif
font.serif          : Computer Modern Roman
axes.titlesize      : 12

# Default colormap
image.cmap : bwr

# Axis settings
axes.linewidth          : 1.25
axes.formatter.limits   : -3, 4
xtick.direction         : in
ytick.direction         : in

# Legend settings
legend.fancybox : False

# Tex
# Set the booleans to False to turn off latex
text.latex.preamble         : \usepackage{amsmath}
text.usetex                 : True
axes.formatter.use_mathtext : True
mathtext.fontset : cm