Skip to content

Instantly share code, notes, and snippets.

@micmania1
Last active February 18, 2017 05:23
Show Gist options
  • Save micmania1/aaf3df2d716db5fa30ff to your computer and use it in GitHub Desktop.
Save micmania1/aaf3df2d716db5fa30ff to your computer and use it in GitHub Desktop.
dotfiles
tags
phptags
.DS_STORE
*.swp
*.swo
*.swn
.nfs*
" Show liner numbers
set number
set relativenumber
syntax on
set shiftwidth=4
set tabstop=4
":set omnifunc=phpcomplete#CompletePHP
set nocompatible
set ignorecase
filetype on
filetype plugin indent on
au BufNewFile,BufRead *.ts set filetype=typescript
" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
" let Vundle manage Vundle, equired
Plugin 'VundleVim/Vundle.vim'
Plugin 'scrooloose/syntastic'
Plugin 'scrooloose/nerdtree'
Bundle 'joonty/vdebug.git'
Bundle 'Shougo/vimproc'
Bundle 'Shougo/unite.vim'
Bundle 'ctrlpvim/ctrlp.vim'
Bundle 'editorconfig/editorconfig-vim'
Bundle 'leafgarland/typescript-vim'
Bundle 'isRuslan/vim-es6'
call vundle#end()
let mapleader = ","
" ctags + ctrlp lookup
nnoremap <C-t> :CtrlPTag<CR>
" Ex mode is EVIL
nnoremap Q <nop>
let g:ctrlp_custom_ignore = '\v[\/](\.(git|hg|svn|map)|node_modules|assets|dev|compiled)$'
let g:ctrlp_clear_cache_on_exit = 0
" Map ctrl+n to nerdtree
map <C-n> :NERDTreeToggle<CR>
" Next two thing for nerdtree require this. I don't know what it is.
autocmd StdinReadPre * let s:std_in=1
" Open nerdtree automatically when vim is opened with no files
autocmd VimEnter * if argc() == 0 && !exists("s:std_in") | NERDTree | endif
" Open nerdtree automatically when opening a directory
" autocmd VimEnter * if argc() == 1 && isdirectory(argv()[0]) && !exists("s:std_in") | exe ':e' argv()[0] endif
" Close vim and nerdtree if only nerdtree window is left open
autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTree") && b:NERDTree.isTabTree()) | q | endif
" tell it to use an undo file
set undofile
" set a directory to store the undo history
set undodir=~/.vimundo/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment