Skip to content

Instantly share code, notes, and snippets.

@KhaledMohamedP
Created September 26, 2016 13:40
Show Gist options
  • Save KhaledMohamedP/39bb159a011bebdfb37e45b55465c8f0 to your computer and use it in GitHub Desktop.
Save KhaledMohamedP/39bb159a011bebdfb37e45b55465c8f0 to your computer and use it in GitHub Desktop.
set nocompatible " be iMproved:, required
filetype off " required
set shell=bash
set number
set incsearch
set relativenumber
" Map nerdmap toggle the sidebar
map <C-n> :NERDTreeToggle<CR>
imap jj <ESC>
" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
" let Vundle manage Vundle, required
Plugin 'VundleVim/Vundle.vim'
Plugin 'scrooloose/nerdtree'
Plugin 'jistr/vim-nerdtree-tabs'
Plugin 'jelera/vim-javascript-syntax'
Plugin 'pangloss/vim-javascript'
Plugin 'ctrlpvim/ctrlp.vim'
Plugin 'tpope/vim-fugitive'
Plugin 'scrooloose/syntastic'
Plugin 'airblade/vim-gitgutter'
Plugin 'editorconfig/editorconfig-vim'
" TAG
Plugin 'vim-airline/vim-airline'
Plugin 'vim-airline/vim-airline-themes'
Plugin 'majutsushi/tagbar'
Plugin 'mattn/emmet-vim'
Plugin 'reedes/vim-lexical'
Plugin 'mhinz/vim-hugefile'
call vundle#end() " required
filetype plugin indent on " required
" nerdtree settings
let g:nerdtree_tabs_smart_startup_focus = 1
let g:nerdtree_tabs_autoclose = 1
let g:nerdtree_tabs_open_on_console_startup=0
autocmd FileType nerdtree noremap <buffer> <tab> <nop>
au BufNewFile,BufRead *.ejs set filetype=html
autocmd! bufwritepost .vimrc source %
"autocmd BufRead,BufNewFile * setlocal spell
"NERDTREE SETTINGS
"Make NerdTree size much smaller
let NERDTreeShowLineNumbers=1
let g:NERDTreeWinSize=24
" stop formating for hug files, set huge files as .5mb
let g:hugefile_trigger_size=0.5
" eslint/syntastic
syntax on
set statusline+=%#warningmsg#
set statusline+=%{SyntasticStatuslineFlag()}
set statusline+=%*
let g:syntastic_always_populate_loc_list = 1
let g:syntastic_loc_list_height = 5
let g:syntastic_auto_loc_list = 0
let g:syntastic_check_on_open = 1
let g:syntastic_check_on_wq = 1
let g:syntastic_javascript_checkers = ['eslint']
highlight link SyntasticErrorSign SignColumn
highlight link SyntasticWarningSign SignColumn
highlight link SyntasticStyleErrorSign SignColumn
highlight link SyntasticStyleWarningSign SignColumn
" ctrlp setting hide
let g:ctrlp_dotfiles = 0
" Themes settings
colorscheme monokai
let g:airline_theme='dark'
" setting ag | grep
" The Silver Searcher
if executable('ag')
" Use ag over grep
set grepprg=ag\ --nogroup\ --nocolor
" Use ag in CtrlP for listing files. Lightning fast and respects .gitignore
let g:ctrlp_user_command = 'ag %s -l --nocolor -g ""'
" ag is fast enough that CtrlP doesn't need to cache
let g:ctrlp_use_caching = 0
endif
" toolbar at the bottom
let g:airline#extensions#tabline#enabled = 1
let g:airline#extensions#tabline#left_sep = ' '
let g:airline#extensions#tabline#left_alt_sep = '|'
nmap <F8> :TagbarToggle<CR>
" emmet html setting
let g:user_emmet_leader_key='<C-E>'
let g:user_emmet_install_global = 0
autocmd FileType html,css EmmetInstall
" spelling
let g:lexical#spell = 1 " 0=disabled, 1=enabled
let g:lexical#spelllang = ['en_us']
augroup lexical
autocmd!
autocmd FileType textile call lexical#init()
autocmd FileType text call lexical#init({ 'spell': 0 })
augroup END
" powerline
let g:Powerline_symbols = 'fancy'
Plugin 'Lokaltog/vim-powerline'
set guifont=Liberation_Mono_for_Powerline:h10
let g:airline_powerline_fonts = 1
@KhaledMohamedP
Copy link
Author

vundle: git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim

:PluginInstall

@KhaledMohamedP
Copy link
Author

for monokai theme

 mkdir ~/.vim/colors/
vim ~/.vim/colors/monokai.vim

copy the theme from here
https://raw.githubusercontent.com/sickill/vim-monokai/master/colors/monokai.vim

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment