Skip to content

Instantly share code, notes, and snippets.

@Velrok
Last active December 17, 2015 09:59
Show Gist options
  • Save Velrok/5591597 to your computer and use it in GitHub Desktop.
Save Velrok/5591597 to your computer and use it in GitHub Desktop.
My experimental vimrc.
" Use pathogen to easily modify the runtime path to include all
" " plugins under the ~/.vim/bundle directory
call pathogen#helptags()
call pathogen#runtime_append_all_bundles()
syntax on
filetype plugin indent on
set scrolloff=5 " allways show at least 3 lines
set wildmode=longest,list
set nowrap " don't wrap lines
set backspace=indent,eol,start " allow backspacing over everything in insert mode
set autoindent " always set autoindenting on
set copyindent " copy the previous indentation on autoindenting
set number " always show line numbers
set shiftround " use multiple of shiftwidth when indenting with '<' and '>'
set showmatch " set show matching parenthesis
set ignorecase " ignore case when searching
set smartcase " ignore case if search pattern is all lowercase, case-sensitive otherwise
set smarttab " insert tabs on the start of a line according to shiftwidth, not tabstop
set hlsearch " highlight search terms
set incsearch " show search matches as you type
set nobackup
set noswapfile
set expandtab
set tabstop=2 " a tab is four spaces
set shiftwidth=2 " number of spaces to use for autoindenting
colorscheme molokai
autocmd InsertEnter * :set number
autocmd InsertLeave * :set relativenumber
set relativenumber
au VimEnter * RainbowParenthesesToggle
au Syntax * RainbowParenthesesLoadRound
au Syntax * RainbowParenthesesLoadSquare
au Syntax * RainbowParenthesesLoadBraces
set laststatus=2
set statusline+=%F
set colorcolumn=80
let g:Powerline_symbols = 'unicode'
set encoding=utf-8
" key mappings
nmap <S-Right> :tabnext<CR>
nmap <S-Left> :tabprevious<CR>
nmap <S-t> :tabnew<CR>
nmap <S-w> :tabclose<CR>
" repl interaction
nmap , :Eval<CR>
nmap ; :%Eval<CR>
let mapleader = "ß"
nnoremap <Leader>s :%s/\<<C-r><C-w>\>/<C-r><C-w>/g<Left><Left>
vmap <Leader>r y:%s/<C-r><C-O>0/<C-r><C-O>0/gc<Left><Left><Left>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment