Editors

There are many editors installed on PSMN. Most commonly used are vim, nano and emacs.

Vim

You will need a ~/.vimrc file (even an empty one) to be able to copy/paste into vim.

  • empty .vimrc file:

touch ~/.vimrc

And that’s it.

  • our recommended ~/.vimrc

syntax on           " activate colors
colorscheme desert  " 'pastel' color theme

"" usefull options
set showcmd         " Show (partial) command in status line
set showmatch       " Show matching brackets
set ignorecase      " Do case insensitive matching
set smartcase       " Do smart case matching
set incsearch       " Incremental search
set autowrite       " Automatically save before commands like :next and :make

"" python dev: uncomment to use
"" ensure correct python (and tab fixed) code highlighting
"filetype plugin indent on
"set tabstop=4       " The width of a TAB is set to 4.
                    " Still it is a \t. It is just that
                    " Vim will interpret it to be having
                    " a width of 4.
"set shiftwidth=4    " Indents will have a width of 4
"set softtabstop=4   " Sets the number of columns for a TAB
"set expandtab       " Expand TABs to spaces

"" fortran dev: uncomment to use
"" ensure correct fortran code highlighting
"let fortran_free_source=1
"let fortran_do_enddo=1
"filetype plugin indent on
"set textwidth=80    " 80 columns width lines
"set nu              " Turn on line numbers
"set ruler           " Turn on row/column numbers
"set tabstop=2       " set tabstops to two spaces
"set shiftwidth=2
"set smarttab        " ensure tab characters are expanded into spaces
"set expandtab
"set bs=2            " fix backspace key
  • In case you have some difficulties with vim

https://vim.rtorr.com/

  • If dragging your mouse in vim gets it into “visual mode” and you can not select and copy some text: Try adding set mouse=a in your ~/.vimrc.

Emacs

The most asked version was emacs-nox (without X support).