Skip to content

Instantly share code, notes, and snippets.

@moaalaa
Last active May 18, 2018 16:05
Show Gist options
  • Save moaalaa/890d9436b2c4809ae8c3241071d76e8a to your computer and use it in GitHub Desktop.
Save moaalaa/890d9436b2c4809ae8c3241071d76e8a to your computer and use it in GitHub Desktop.
After Install Vundle.vim Do The Next Note For windows .vimrc will be _vimrc and for .vim it will be vimfiles
set nocompatible " We ant latest vim settings/options.
so $HOME/vimfiles/plugins.vim
syntax enable
set backspace=indent,eol,start "Make Backspace behave like every other editors.
let mapleader = ',' "The defualt leader is \, but , is much better.
set number "Let's activate the line number.
"-----------------------Visuals------------------------"
colorscheme onedark
set t_CO=256 "Use 256 colors. this is useful for terminal vim.
set guifont=Fira_Code:h11
set linespace=15
set guioptions-=l
set guioptions-=L
set guioptions-=m
set guioptions-=r
set guioptions-=R
set guioptions-=T
"---------------------Split Managment----------------"
set splitbelow
set splitright
nmap <C-J> <C-W><C-J>
nmap <C-K> <C-W><C-K>
nmap <C-H> <C-W><C-H>
nmap <C-L> <C-W><C-L>
"-----------------------Searching----------------------"
set hlsearch
set incsearch
"-----------------------Mappings----------------------"
"Make it easy to edit the vimrc file.
nmap <leader>ev :tabedit $MYVIMRC<cr>
"Add simple heighlight removal.
nmap <leader><space> :nohlsearch<cr>
"Make NERDTree Easier To Toggle.
nmap <C-\> :NERDTreeToggle<cr>
"Make CtrlP Easier To Toggle.
nmap <C-P> :CtrlP<cr>
"-----------------------Auto-Commands----------------------"
" Automaticlly save the Vimrc file on save.
augroup autosourcing
autocmd!
autocmd BufWritePost _vimrc source %
augroup END
filetype off " required
" set the runtime path to include Vundle and initialize
set rtp+=$HOME/.vim/bundle/Vundle.vim
call vundle#begin('$HOME/.vim/bundle/')
" let Vundle manage Vundle, required
Plugin 'VundleVim/Vundle.vim'
Plugin 'tpope/vim-vinegar'
Plugin 'joshdick/onedark.vim'
Plugin 'scrooloose/nerdtree'
Plugin 'kien/ctrlp.vim'
" All of your Plugins must be added before the following line
call vundle#end() " required
filetype plugin indent on " required
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment