Skip to content

Instantly share code, notes, and snippets.

@sigorilla
Last active August 29, 2015 14:26
Show Gist options
  • Save sigorilla/d9c35c3b61654f5c9d0d to your computer and use it in GitHub Desktop.
Save sigorilla/d9c35c3b61654f5c9d0d to your computer and use it in GitHub Desktop.
Vim
set number
set ruler
syntax on
set tabstop=4
set shiftwidth=4
set softtabstop=4
set expandtab ts=4 sw=4 ai
filetype plugin indent on
set nocp
set autoindent
set smartindent
set showcmd
highlight ColorColumn ctermbg=darkgray
match ErrorMsg /\%>80v.\+/
set mouse=a
set so=7
set statusline=%t\ %y\ format:\%{&ff};\ [%c,%l]
set laststatus=2
hi StatusLine term=reverse
syntax on
filetype plugin on " enable plugins
" Set to auto read when a file is changed from the outside
set autoread
autocmd! bufwritepost vimrc source ~/.vim_runtime/vimrc
set mouse=a
set noerrorbells
set shiftround
set hlsearch
set expandtab
set ignorecase
"Set 7 lines to the curors - when moving vertical..
set so=7
" Fix arrows and bashspace
set t_ku=OA
set t_kd=OB
set t_kr=OC
set t_kl=OD
set t_kb=
set bs=2
"Set grey numbers
highlight LineNr cterm=NONE ctermfg=DarkGrey ctermbg=NONE
set statusline=%t\ %y\ format:\ %{&ff};\ [%c,%l]
set laststatus=2
set number
" Do not need backup
set nobackup
set nowritebackup
set noswapfile
set expandtab ts=4 sw=4 ai
filetype plugin indent on
set nocp " non vi compatible mode
set wildmenu
" HighLighting menu
hi Pmenu ctermbg=green ctermfg=black gui=bold
hi PmenuSel ctermbg=grey ctermfg=black gui=bold
hi PmenuSbar ctermbg=lightgreen gui=bold
set completeopt=menu,menuone
" -- configs --
let OmniCpp_MayCompleteDot = 1 " autocomplete with .
let OmniCpp_MayCompleteArrow = 1 " autocomplete with ->
let OmniCpp_MayCompleteScope = 1 " autocomplete with ::
let OmniCpp_SelectFirstItem = 2 " select first item (but don't insert)
let OmniCpp_NamespaceSearch = 2 " search namespaces in this and included files
" show function prototype (i.e. parameters) in popup window
let OmniCpp_ShowPrototypeInAbbr = 1
" don't require special style of function opening braces
let OmniCpp_LocalSearchDecl = 1
if has("mac")
" open a file in TextMate from vi: "
nmap mate :w<CR>:!mate %<CR>
set gfn=Menlo:h14
set shell=/bin/bash
elseif has("unix")
" do stuff under linux and "
set gfn=Monospace\ 10
set shell=/bin/bash
elseif has("win32")
" do stuff under windows "
set gfn=Bitstream\ Vera\ Sans\ Mono:h10
set guifont=Consolas:h9:cANSI
endif
hi StatusLine term=reverse
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment