aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Buesch <m@bues.ch>2019-03-10 14:17:21 +0100
committerMichael Buesch <m@bues.ch>2019-03-10 14:17:21 +0100
commit44999a81978746b23f0bca787bd69cd52e27cc3c (patch)
tree57ca449a7d072aa3ead233aac90b3accc10f4f8c
parentcf9eb9ca47e12e0eb0dae379d431e04cb2738d9f (diff)
downloadawlsim-44999a81978746b23f0bca787bd69cd52e27cc3c.tar.xz
awlsim-44999a81978746b23f0bca787bd69cd52e27cc3c.zip
pilc: Update vimrc
Signed-off-by: Michael Buesch <m@bues.ch>
-rw-r--r--pilc/templates/vimrc83
1 files 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 <leader>/ :nohlsearch<cr>
+set incsearch " Incremental search.
+
+" Command completion
+set wildmenu
+set wildmode=longest:full,full
+
+" Backspace handling: No backspace over eol. Use <S-j> instead.
set backspace=indent,start
-set number
+
+" Move between windows
+map <C-j> <C-W>j
+map <C-k> <C-W>k
+map <C-h> <C-W>h
+map <C-l> <C-W>l
+
+" Move line up/down (normal mode only)
+nmap <M-j> mz:m+<cr>`z
+nmap <M-k> mz:m-2<cr>`z
+
+" Toggle spell checking
+map <leader>s :setlocal spell!<cr>
+
+" Toggle paste mode
+map <leader>p :setlocal paste!<cr>
+
+" 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 <leader><F2> :set ts=2 sw=2 expandtab<cr>
+map <leader>2 :set ts=2 sw=2 noexpandtab<cr>
+map <leader><F4> :set ts=4 sw=4 expandtab<cr>
+map <leader>4 :set ts=4 sw=4 noexpandtab<cr>
+map <leader><F8> :set ts=8 sw=8 expandtab<cr>
+map <leader>8 :set ts=8 sw=8 noexpandtab<cr>
+map <leader>r :retab<cr>
+
+" colorscheme
+colorscheme industry
+hi LineNr cterm=NONE ctermfg=DarkGrey gui=NONE guifg=DarkGrey
+
bues.ch cgit interface