Created
August 25, 2015 05:35
-
-
Save mauriciosilva/86839ab128919a3b348d to your computer and use it in GitHub Desktop.
vimrc-8.15
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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' | |
Plugin 'fatih/vim-go' | |
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