From 44999a81978746b23f0bca787bd69cd52e27cc3c Mon Sep 17 00:00:00 2001 From: Michael Buesch Date: Sun, 10 Mar 2019 14:17:21 +0100 Subject: pilc: Update vimrc Signed-off-by: Michael Buesch --- pilc/templates/vimrc | 83 +++++++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 79 insertions(+), 4 deletions(-) diff --git a/pilc/templates/vimrc b/pilc/templates/vimrc index 1084a407..562cf5e9 100644 --- a/pilc/templates/vimrc +++ b/pilc/templates/vimrc @@ -1,5 +1,80 @@ -set nocompatible -set autoindent -syntax enable +" Basic settings. +set nocompatible " Sane mode. +set encoding=utf8 " File encoding. +set history=100 " Command history. + +" Disable crap. +set noerrorbells +set novisualbell + +" Disable backup and swapfiles. +set nobackup +set nowb +set noswapfile + +" Map ',' as leaderkey. +let mapleader = "," +let g:mapleader = "," + +" Automatically re-read the file, if it has been changed externally. +set autoread + +" Appearance +syntax enable " Syntax highlighting. +set scrolloff=6 " Min lines below/above cursor. +set number " Enable line numbering. +set ruler " Enable line/column ruler. +set cmdheight=1 " Command bar height. + +" Searching +set hlsearch " Highlighting +nmap / :nohlsearch +set incsearch " Incremental search. + +" Command completion +set wildmenu +set wildmode=longest:full,full + +" Backspace handling: No backspace over eol. Use instead. set backspace=indent,start -set number + +" Move between windows +map j +map k +map h +map l + +" Move line up/down (normal mode only) +nmap mz:m+`z +nmap mz:m-2`z + +" Toggle spell checking +map s :setlocal spell! + +" Toggle paste mode +map p :setlocal paste! + +" Indent and tab +set autoindent +"set smartindent +"inoremap # X# +"filetype on " Filetype detection +"filetype plugin off +"filetype indent on +set tabstop=8 +set shiftwidth=8 +set softtabstop=0 +set noexpandtab +set smarttab +map :set ts=2 sw=2 expandtab +map 2 :set ts=2 sw=2 noexpandtab +map :set ts=4 sw=4 expandtab +map 4 :set ts=4 sw=4 noexpandtab +map :set ts=8 sw=8 expandtab +map 8 :set ts=8 sw=8 noexpandtab +map r :retab + +" colorscheme +colorscheme industry +hi LineNr cterm=NONE ctermfg=DarkGrey gui=NONE guifg=DarkGrey + -- cgit v1.2.3