Skip to content

Instantly share code, notes, and snippets.

@ahm507
Created May 22, 2018 03:49
Show Gist options
  • Save ahm507/a724cc7c750df8b8579910e3d78b368a to your computer and use it in GitHub Desktop.
Save ahm507/a724cc7c750df8b8579910e3d78b368a to your computer and use it in GitHub Desktop.
My .vimrc
syntax on " Syntax coloring
set hlsearch " set search highlighting
set incsearch " search as characters are entered
filetype plugin indent on " enable filetype detection and indentation
set smartindent
" On pressing tab, insert 4 spaces
set expandtab
" show existing tab with 4 spaces width
set tabstop=4
set softtabstop=4
" when indenting with '>', use 4 spaces width
set shiftwidth=4
"Auto add to .js extention to files that miss them, so gf works
autocmd FileType javascript setl suffixesadd+=.js
"autocmd BufRead,BufNewFile *.coffee set suffixesadd+=.coffee,.hbs
"change cursor shape based on mode
let &t_SI.="\e[5 q"
let &t_SR.="\e[4 q"
let &t_EI.="\e[1 q"
"Mappings to swith betweeb tabs
map <C-Left> <Esc>:tabprev<CR>
map <C-Right> <Esc>:tabnext<CR>
"show list of buffers
nmap <C-b> <esc>:buffers<CR>
set wildmenu " visual autocomplete for command menu
" Don't offer to open certain files/directories
set wildignore+=*.bmp,*.gif,*.ico,*.jpg,*.png,*.ico
set wildignore+=*.pdf,*.psd,*.class,*.jar
set wildignore+=*.tar,*.qz
set wildignore+=node_modules/*,bower_components/*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment