Last active
October 20, 2016 10:27
-
-
Save ajpen/040f9431c6b18ad5aa8e935504393479 to your computer and use it in GitHub Desktop.
My vimrc setup
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"" Minimal setting and configuration | |
"" These settings makes editing less of a drag :) | |
"--------------------------------------------------------------------------------- | |
" Use vim settings | |
set nocompatible | |
" changes backspace indentation behavior | |
set backspace=indent,eol,start | |
" enable syntax highlighting | |
syntax on | |
" enable filetype detection and language dependent indenting | |
filetype plugin indent on | |
" set size of indentation to 4, what I use for coding. | |
set tabstop=4 | |
set shiftwidth=4 | |
set softtabstop=4 | |
" show line numbers | |
set number | |
" Allow hidden buffers | |
set hidden | |
" reload files changed outside vim | |
set autoread | |
" enable matchit plugin which ships with vim and greatly enhances '%' | |
runtime macros/matchit.vim i | |
" encoding is utf 8 | |
set encoding=utf-8 | |
set fileencoding=utf-8 | |
" Use linux file format | |
set fileformat=unix | |
"---------------------------------------------------------------------------------- | |
" Mappings | |
"---------------------------------------------------------------------------------- | |
" set / as mapleader | |
let mapleader = "/" | |
" Map ctrl+x, ctrl+c and ctrl+v to their usual meaning (cut, copy and paste) | |
vnoremap <C-c> "+y | |
vnoremap <C-x> "+x | |
map <C-v> "+gP | |
" Generates ctags when f12 is hit. exuberant-ctags is required. | |
" Ctags allows you to jump to function definitions with ctrl+j | |
map <f12> :!ctags -R .<cr> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment