Skip to content

Instantly share code, notes, and snippets.

@fizerkhan
Last active November 5, 2015 09:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fizerkhan/c7f05790df3155c48b22 to your computer and use it in GitHub Desktop.
Save fizerkhan/c7f05790df3155c48b22 to your computer and use it in GitHub Desktop.
VIM Configurations
syntax on " enable syntax processing
set tabstop=4 " number of visual spaces per TAB
set softtabstop=4 " number of spaces in tab when editing
set expandtab " tabs are spaces
set number " show line numbers
set cursorline " highlight current line
set showcmd " show command in bottom bar
set ruler " Show ruler right side of the status line at the bottom
filetype indent on " load filetype-specific indent files
set wildmenu " visual autocomplete for command menu
set lazyredraw " redraw only when we need to.
set showmatch " highlight matching [{()}]
set incsearch " search as characters are entered
set hlsearch " highlight matches
" turn off search highlight
nnoremap <leader><space> :nohlsearch<CR>
set foldenable " enable folding
set foldlevelstart=10 " open most folds by default
set foldnestmax=10 " 10 nested fold max
" space open/closes folds
nnoremap <space> za
set foldmethod=indent " fold based on indent level
" move vertically by visual line
nnoremap j gj
nnoremap k gk
" move to beginning/end of line
nnoremap B ^
nnoremap E $
" $/^ doesn't do anything
nnoremap $ <nop>
nnoremap ^ <nop>
" highlight last inserted text
nnoremap gV `[v`]
let mapleader="," " leader is comma
set backupdir=~/.vim/backup
set backup
set directory=~/.vim/tmp
@fizerkhan
Copy link
Author

Don't just copy and use this file. Please read blog before using it

http://dougblack.io/words/a-good-vimrc.html

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