Skip to content

Instantly share code, notes, and snippets.

@olevegard
Created January 24, 2015 19:42
Show Gist options
  • Save olevegard/42ceaf5b749fe776fec8 to your computer and use it in GitHub Desktop.
Save olevegard/42ceaf5b749fe776fec8 to your computer and use it in GitHub Desktop.
" Vundle
"
" ==========================================================================
set nocompatible " be iMproved, required
filetype off " required
" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/vundle/
call vundle#rc()
" alternatively, pass a path where Vundle should install plugins
"let path = '~/some/path/here'
"call vundle#rc(path)
" let Vundle manage Vundle, required
Plugin 'gmarik/vundle'
" The following are examples of different formats supported.
" Keep Plugin commands between here and filetype plugin indent on.
" scripts on GitHub repos
Plugin 'tpope/vim-fugitive'
Plugin 'Lokaltog/vim-easymotion'
Plugin 'tpope/vim-rails.git'
Plugin 'Yggdroot/indentLine.git'
" Plugin 'nathanelkane/vim-indent-guides.git'
" The sparkup vim script is in a subdirectory of this repo called vim.
" Pass the path to set the runtimepath properly.
Plugin 'rstacruz/sparkup', {'rtp': 'vim/'}
" scripts from http://vim-scripts.org/vim/scripts.html
Plugin 'L9'
Plugin 'FuzzyFinder'
" scripts not on GitHub
Plugin 'git://git.wincent.com/command-t.git'
" git repos on your local machine (i.e. when working on your own plugin)
"Plugin 'file:///home/gmarik/path/to/plugin'
" ...
"filetype plugin indent on " required
" To ignore plugin indent changes, instead use:
filetype plugin on
" Brief help
" :PluginList - list configured plugins
" :PluginInstall(!) - install (update) plugins
" :PluginSearch(!) foo - search (or refresh cache first) for foo
" :PluginClean(!) - confirm (or auto-approve) removal of unused plugins
"
" see :h vundle for more details or wiki for FAQ
" NOTE: comments after Plugin commands are not allowed.
" Put your stuff after this line
" ==========================================================================
" Display tabs as >----
set list lcs=tab:\>\-"
" Enable syntax highlighting
syntax on
" Remember 1 000 actions
set history=1000
" Tabs
" set expandtab
set tabstop=4
set shiftwidth=4
" set softtabstop=4
set autoindent
" set laststatus=2
" set showmatch
" Line number
set number
" Search
set incsearch
set hlsearch
set ignorecase smartcase " Make searches case-sensitive only if they contatin upper-case letters
" Hiighlight current line
" set cursorline
" If a file is change outside of vim, reload it automatically
"set autoread
" Always center cursor
set scrolloff=100
" Make backspace work properly
" set backspace=indent,eol,start
set backspace=eol,start,indent
set whichwrap+=<,>,h,l
" Color
"set nocompatible
"set t_Co=16
"set background=dark
"call pathogen#infect()
colorscheme gummybears
filetype plugin on
let g:molokai_original = 1
" Turn off backup
"set nobackuph
set nowb
set noswapfile
" autocmd BufWritePre * :%s/\s\+$//e
" Key bindings
" Enter to insert empy line under.
" nmap <S-Enter> O<Esc> "Does not work, KEY+Enter is interperated as Enter
nmap <CR> o<Esc>
" Copy using Ctrl + c, Ctrl + x and paste using Ctrl + p
vmap <C-c> "+yi
vmap <C-x> "+c
vmap <C-v> c<ESC>"+p
imap <C-v> <ESC>"+pa
vmap <C-h> :%y+
"Make mouse act like in terminal ( command line mode )
set mouse=c
" gvim options
set guioptions-=m "remove menu bar
set guioptions-=T "remove toolbar
set guioptions-=r "remove right-hand scroll bar
set guioptions-=L "remove left-hand scroll bar
set guifont=monospace\ 12
highlight ExtraWhitespace ctermbg=red guibg=red
match ExtraWhitespace /\s\+$/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment