Skip to content

Instantly share code, notes, and snippets.

@pouya-abbassi
Last active May 9, 2018 10:37
Show Gist options
  • Save pouya-abbassi/89bbfd5f326553a7b0ca29970f950c0f to your computer and use it in GitHub Desktop.
Save pouya-abbassi/89bbfd5f326553a7b0ca29970f950c0f to your computer and use it in GitHub Desktop.
.vimrc
set nocompatible
filetype off
filetype plugin indent on
set encoding=utf-8 " default encoding method
set number " show line number
set laststatus=2 " airline
let g:netrw_liststyle = 3 " airline
let g:netrw_banner = 0 " airline
syntax on " enable syntax highlight
colorscheme badwolf " colorscheme
set foldenable " enable folding
set foldmethod=indent " auto fold files based on indent
set foldlevel=99 " fold level
filetype indent on " load filetype-specific indent files
set background=dark " better contrast for dark background
set tabstop=2 " each <tab> will be 2 <space> width
set softtabstop=0 noexpandtab " use tab instead of tab
set shiftwidth=2 " auto indent
set noexpandtab " Use tabs, not spaces
%retab! " Retabulate the whole file
set showcmd " show command in bottom bar
set cursorline " highlight current line
hi CursorLine ctermbg=8 " set cursor line to gray
set wildmenu " visual autocomplete for command menu
set showmatch " highlight matching [{()}]
set incsearch " search as characters are entered
set hlsearch " highlight matches
nnoremap <leader><space> :nohlsearch<CR> " use \<space> to clear search highlight
nnoremap gV `[v`] " visually select last inserted text
inoremap jk <esc> " map jkl as <scape> " map jkl as <scape>
nnoremap <leader>u :GundoToggle<cr> " map \u to toggle gundo
let mapleader="," " map , to \
set colorcolumn=80 " highlight column after 'textwidth'
highlight ColorColumn ctermbg=black guibg=lightgrey
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment