Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
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'
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
"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
" 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 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

This comment has been minimized.

Copy link
Owner Author

KhaledMohamedP commented Nov 3, 2016

vundle: git clone ~/.vim/bundle/Vundle.vim



This comment has been minimized.

Copy link
Owner Author

KhaledMohamedP commented Jul 9, 2019

for monokai theme

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

copy the theme from here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.