Read more

Some useful vim settings

Tobias Kraze
February 13, 2017Software engineer at makandra GmbH

Below is a list of some VIM settings I find useful. You can add them to your .vimrc.

source $VIMRUNTIME/mswin.vim                 " adds Ctrl-X, Ctrl-C, Ctrl-V; block visual mode is now Ctrl-Q
behave mswin

set autowriteall                             " autosave all files when a buffer is closed

set backupdir=~/.temp                        " dont pollute local directory with swap file, backup files etc
set dir=~/.temp

set undofile                                 " enable persistent undo
set undodir=~/.temp

set encoding=utf-8

set expandtab                                " replace tabs with spaces
set shiftwidth=2
set tabstop=2

set fileformats=unix,dos                     " prefer unix linebreaks, but also support DOS linebreaks

set guioptions-=T                            " remove toolbar in UI mode

set ignorecase                               " search is case insensitive, unless you use upper case characters
set smartcase

set scrolloff=2                              " start scrolling when you get close to the top or bottom

set textwidth=0                              " dont automatically insert linebreaks

set wildmenu                                 " show a menu in the status line when tab-completing commands

set history=500                              " longer history for : commands

set showbreak=↳\                             " nicer line wrapping, preserving indentation
set breakindent

set mousefocus                               " autofocus windows on hover

au FocusLost * silent! wa                    " save all buffers when vim loses focus

Illustration online protection

Rails Long Term Support

Rails LTS provides security patches for old versions of Ruby on Rails (2.3, 3.2, 4.2 and 5.2)

  • Prevents you from data breaches and liability risks
  • Upgrade at your own pace
  • Works with modern Rubies
Read more Show archive.org snapshot
Posted by Tobias Kraze to makandra dev (2017-02-13 11:16)