Skip to content

Instantly share code, notes, and snippets.

@psaia
Last active September 24, 2015 10:27
Show Gist options
  • Save psaia/733618 to your computer and use it in GitHub Desktop.
Save psaia/733618 to your computer and use it in GitHub Desktop.
My .vimrc file
# Path.
export PATH=/usr/local/bin:/usr/local/sbin:/usr/local/share/python:/usr/local/Cellar/php54/5.4.3/bin/:$PATH
# Black 0;30 Dark Gray 1;30
# Blue 0;34 Light Blue 1;34
# Green 0;32 Light Green 1;32
# Cyan 0;36 Light Cyan 1;36
# Red 0;31 Light Red 1;31
# Purple 0;35 Light Purple 1;35
# Brown 0;33 Yellow 1;33
# Light Gray 0;37 White 1;37
# Prompt line
# Example: /you/are/here ::
export PS1="\[\033[0;33m\]\w ::\[\033[00m\] "
# Tell ls to be colourful
export CLICOLOR=1
# Tell grep to highlight matches
export GREP_OPTIONS='--color=auto'
# Node NVM
. ~/.nvm/nvm.sh
""""""""""""""""""""""""""""""""""
" => General
""""""""""""""""""""""""""""""""""
" https://github.com/tpope/vim-pathogen
execute pathogen#infect()
set nocompatible
filetype on
filetype plugin on
filetype indent on
syntax on
" Basic.
set hlsearch
set incsearch
set ignorecase
set smartcase
set autoindent
set cindent
set autochdir
" Use spaces. 2 spaces...
set expandtab
set shiftwidth=2
set softtabstop=2
set tabstop=2
" Trust yourself.
set nobackup
set nowb
set noswapfile
" No bells or flashy shit.
set noerrorbells
set novisualbell
set t_vb=
set showcmd " This shows what you are typing as a command.
set number " Show lines numbers
set linespace=5 " prefer a slightly higher line height
set backspace=2 " setted the backspace!
set so=7 " Set 7 lines to the curors - when moving vertical..
set scrolljump=5 " lines to scroll when cursor leaves screen
set wrap
set textwidth=80
" Snippet files require hard tabs.
au FileType snippets set tabstop=4 softtabstop=4 shiftwidth=4 noexpandtab
au FileType make set tabstop=4 softtabstop=4 shiftwidth=4 noexpandtab
set title " show file in titlebar
" Folding
set foldmethod=indent
set foldlevelstart=1
""""""""""""""""""""""""""""""""""
" => Mappings
""""""""""""""""""""""""""""""""""
" Better leader
let mapleader = ","
" Fast saving
nmap <leader>w :w!<cr>
" Tabbing shortcuts
nmap th :tabnext<CR>
nmap tl :tabprev<CR>
nmap tn :tabnew<CR>
nmap td :tabclose<CR>
nmap <C-Right> :tabnext<cr>
nmap <C-Left> :tabprev<cr>
" Fast saving
nmap <leader>w :w!<cr>
" Folding.
nmap <space> za
nmap <leader><space> zR
" Copy & paste to clipboard
vmap <C-x> :!pbcopy<CR>
vmap <C-c> :w !pbcopy<CR><CR>
" open NERDTree with Ctrl+n
map <C-n> :NERDTreeToggle<CR>
""""""""""""""""""""""""""""""""""
" => Syntax and Colors
""""""""""""""""""""""""""""""""""
" Lucius https://github.com/vim-scripts/Lucius
colorscheme lucius
LuciusDarkLowContrast
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment