Skip to content

Instantly share code, notes, and snippets.

@mauriciosilva
Created August 4, 2015 22:05
Show Gist options
  • Save mauriciosilva/28aeada2104bc3b4c4d0 to your computer and use it in GitHub Desktop.
Save mauriciosilva/28aeada2104bc3b4c4d0 to your computer and use it in GitHub Desktop.
vimrc.7.31.15
set nocompatible
set clipboard+=unnamed
set noswapfile
set nowritebackup
set nobackup
set hlsearch
set ignorecase
set smartcase
set nowrap
set tabstop=2
set softtabstop=2
set shiftwidth=2
set expandtab
set smarttab
set ruler
set paste
set autoindent
set cindent
set nu
" reset my leader key
let mapleader = ","
" allow saving of files as sudo when i forget to start vim with sudo
cmap w!! w !sudo tee > /dev/null %
" format json
map <leader>j !python -m json.tool<CR>
" kill highlight
:nnoremap <CR> :nohlsearch<cr>
syntax on
filetype plugin off
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
Plugin 'gmarik/Vundle.vim'
Plugin 'scrooloose/nerdtree'
Plugin 'scrooloose/syntastic'
Plugin 'kien/ctrlp.vim'
Plugin 'flazz/vim-colorschemes'
Plugin 'vim-ruby/vim-ruby'
Plugin 'godlygeek/tabular'
Plugin 'plasticboy/vim-markdown'
Plugin 'tpope/vim-fugitive'
Plugin 'airblade/vim-gitgutter'
call vundle#end()
filetype plugin on
colorscheme darth
" nerdtree specific shorties
map <C-l> :tabn<CR>
map <C-h> :tabp<CR>
map <C-n> :tabnew<CR>
map <C-i> i'<Esc>ea'<Esc>
nmap <C-t> :OpenNERDTree<CR>
nmap <C-c> :CloseNERDTree<CR>
nmap <ESC>c :CloseNERDTree<CR>
nmap <ESC>t :OpenNERDTree<CR>
function NumberToggle()
if(&relativenumber==1)
set number
else
set relativenumber
end
endfunc
function OpenNERDTree()
execute ":NERDTree"
endfunction
function CloseNERDTree()
execute ":NERDTreeClose"
endfunction
command -nargs=0 CloseNERDTree :call CloseNERDTree()
command -nargs=0 OpenNERDTree :call OpenNERDTree()
" end nerdtree shorties
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment