Skip to content

Instantly share code, notes, and snippets.

@iamsaso
Last active May 24, 2016 03:37
Show Gist options
  • Save iamsaso/d8c67b23e2fe276e1b9cba439a03bf2f to your computer and use it in GitHub Desktop.
Save iamsaso/d8c67b23e2fe276e1b9cba439a03bf2f to your computer and use it in GitHub Desktop.
"├── autoload
"│   └── pathogen.vim
"└── bundle
" ├── molokai
" ├── nerdtree
" ├── vim-airline
" └── vim-airline-themes
set nocompatible " be iMproved, required
set clipboard=unnamed
let mapleader=","
set noeb vb t_vb=
filetype off " required
filetype plugin indent on " required
execute pathogen#infect()
syntax enable
colorscheme molokai
set backspace=2 " backspace in insert mode works like normal editor
syntax on " syntax highlighting
filetype indent on " activates indenting for files
set nobackup " get rid of annoying ~file
set noswapfile
let NERDTreeQuitOnOpen=1
let NERDTreeWinSize=35
map <silent> <leader>n :NERDTreeToggle<CR> :silent NERDTreeMirror<CR>
"set number " Show line numbers
set linebreak " Break lines at word (requires Wrap lines)
set showbreak=+++ " Wrap-broken line prefix
set textwidth=100 " Line wrap (number of cols)
set showmatch " Highlight matching brace
"set spell " Enable spell-checking
set visualbell " Use visual bell (no beeping)
set hlsearch " Highlight all search results
set smartcase " Enable smart-case search
set ignorecase " Always case-insensitive
set incsearch " Searches for strings incrementally
set autoindent " Auto-indent new lines
set shiftwidth=2 " Number of auto-indent spaces
set smartindent " Enable smart-indent
set smarttab " Enable smart-tabs
set softtabstop=2 " Number of spaces per Tab
set ruler " Show row and column ruler information
set showtabline=2 " Show tab bar
set autochdir " Change working directory to open buffer
set undolevels=1000 " Number of undo levels
set backspace=indent,eol,start " Backspace behaviour
set encoding=utf-8
"set mouse=a
" Easy window navigation
map <C-h> <C-w>h
map <C-j> <C-w>j
map <C-k> <C-w>k
map <C-l> <C-w>l
map <leader>l :bn<cr>
map <leader>h :bp<cr>
map <leader>d :bd<cr>
nnoremap <silent> <CR> :let @/=""<CR><CR> " Reset highlighted search
nnoremap j gj " move visual line down
nnoremap k gk " move visual line up
set wildmode=longest,list,full
set wildmenu
" Stop using pointers
"map <up> <nop>
"map <down> <nop>
"map <left> <nop>
"map <right> <nop>
" Quickly edit/reload the vimrc file
nmap <silent> <leader>ev :e $MYVIMRC<CR>
nmap <silent> <leader>sv :so $MYVIMRC<CR>
let g:airline#extensions#tabline#enabled = 1
set laststatus=2
" mac copy & paste
vnoremap <silent><leader>y :<CR>:let @a=@" \| execute "normal! vgvy" \| let res=system("pbcopy", @") \| let @"=@a<CR>
vnoremap <silent> <leader>yy :<CR>:let @a=@" \| execute "normal! vgvy" \| let res=system("pbcopy", @") \| let @"=@a<CR>
vnoremap <silent> <leader>dd :<CR>:let @a=@" \| execute "normal! vgvd" \| let res=system("pbcopy", @") \| let @"=@a<CR>
map <silent> <leader>y :<CR>:let @a=@" \| execute "normal! y" \| let res=system("pbcopy", @") \| let @"=@a<CR>
map <silent> <leader>d :<CR>:let @a=@" \| execute "normal! d" \| let res=system("pbcopy", @") \| let @"=@a<CR>
map <silent> <leader>yy :<CR>:let @a=@" \| execute "normal! yy" \| let res=system("pbcopy", @") \| let @"=@a<CR>
map <silent> <leader>dd :<CR>:let @a=@" \| execute "normal! dd" \| let res=system("pbcopy", @") \| let @"=@a<CR>
map <leader>p :r !pbpaste<CR>
map <leader>rr :!time ruby %<CR>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment