rc files: Difference between revisions

From Fluids Wiki
Jump to navigation Jump to search
(Created page with " This page contains some configuration (rc) files for various programs. They provide default settings and functionality. For example, the vimrc file turns syntax highlightin...")
 
mNo edit summary
Line 50: Line 50:
" <Ctrl-l> redraws the screen and removes any search highlighting.
" <Ctrl-l> redraws the screen and removes any search highlighting.
nnoremap <silent> <C-l> :nohl<CR><C-l>
nnoremap <silent> <C-l> :nohl<CR><C-l>
</syntaxhighlight>
== matplotlibrc ==
Copy the following into <code>~/.config/matplotlib/matplotlibrc</code> to set default matplotlib parameters.
A complete list of available matplotlibrc settings can [https://matplotlib.org/1.3.1/users/customizing.html be found here].
<syntaxhighlight lang="bash" line>
# 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
</syntaxhighlight>
</syntaxhighlight>

Revision as of 10:23, 3 August 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.

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

" <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