Skip to content

Instantly share code, notes, and snippets.

@vascoosx
Last active December 17, 2018 08:22
Show Gist options
  • Save vascoosx/a8c344813c15fd289303 to your computer and use it in GitHub Desktop.
Save vascoosx/a8c344813c15fd289303 to your computer and use it in GitHub Desktop.
vimrc
execute pathogen#infect()
filetype plugin indent on " filetype detection and settings
syntax on " syntax highlighting
silent! runtime macros/matchit.vim " matchit comes with Vim
set nocompatible " not strictly necessary but useful in some scenarii
set backspace=indent,eol,start " let the backspace key work "normally"
set hidden " hide unsaved buffers
set incsearch " incremental search rules
set laststatus=2 " not strictly necessary but good for consistency
set ruler " shows line number in the status line
set switchbuf=useopen,usetab " better behavior for the quickfix window and :sb
set tags=./tags;/,tags;/ " search tags files efficiently
set wildmenu " better command line completion, shows a list of matches
nnoremap gb :buffers<CR>:sb<Space> " quick buffer navigation
set number
set ff=unix
"advanced settings
let mapleader = "\<Space>"
map <leader>h :set hlsearch!<cr>
"map <leader>N :setlocal number!<cr>
nmap <C-N><C-N> :set invnumber<CR>
map <leader>p :set paste!<cr>
set fileformats=unix,dos,mac
set background=dark
let powershell=$POWERSHELL
if powershell == '1'
colorscheme pablo
else
colorscheme solarized
endif
let g:pymode_folding=0
let g:solarized_termcolors=256
if &diff
colorscheme evening
endif
" ~/.vim/after/ftplugin/python.vim
setlocal expandtab "new tab characters entered will be changed to spaces
setlocal tabstop=4 "insert 4 spaces for a tab
setlocal shiftwidth=4 " number of space characters inserted for indentation
setlocal softtabstop=4 "delete
" ~/.vim/after/ftplugin/ruby.vim
setlocal expandtab
setlocal tabstop=2
setlocal shiftwidth=2
setlocal softtabstop=2 "delete
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment