Skip to content

Instantly share code, notes, and snippets.

@serinth
Last active February 17, 2018 09:34
Show Gist options
  • Save serinth/e41d3fbcce50435cd667151a90e70dc5 to your computer and use it in GitHub Desktop.
Save serinth/e41d3fbcce50435cd667151a90e70dc5 to your computer and use it in GitHub Desktop.
vimrc for javascript, go and python (2 spaces for js, 4 for go and python)
" Setup vundle first: https://github.com/VundleVim/Vundle.vim
set nocompatible " be iMproved, required
filetype off " required
" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
" alternatively, pass a path where Vundle should install plugins
"call vundle#begin('~/some/path/here')
" let Vundle manage Vundle, required
Plugin 'VundleVim/Vundle.vim'
Plugin 'scrooloose/nerdTree'
Plugin 'ctrlpvim/ctrlp.vim'
Plugin 'vim-airline/vim-airline'
Plugin 'vim-airline/vim-airline-themes'
Plugin 'pangloss/vim-javascript'
Plugin 'tpope/vim-fugitive'
Plugin 'schickling/vim-bufonly'
Plugin 'fatih/vim-go'
Plugin 'mileszs/ack.vim'
" All of your Plugins must be added before the following line
call vundle#end() " required
filetype plugin indent on " required
" To ignore plugin indent changes, instead use:
"filetype plugin on
"
" Brief help
" :PluginList - lists configured plugins
" :PluginInstall - installs plugins; append `!` to update or just :PluginUpdate
" :PluginSearch foo - searches for foo; append `!` to refresh local cache
" :PluginClean - confirms removal of unused plugins; append `!` to auto-approve removal
"
" see :h vundle for more details or wiki for FAQ
" Put your non-Plugin stuff after this line
" NERDTree show hidden files e.g. dotfiles (.gitignore)
let NERDTreeShowhidden=1
let NERDTreeIgnore = ['\.pyc$']
" Show line numbers by default
set number
" Enable airline and set theme
let g:airline#extensions#tabline#enabled = 1
let g:airline_theme='wombat'
" Ignore node_modules and dist for CTRLP
set wildignore+=*/node_modules/**
set wildignore+=*/dist/**
" Set indenting to 2 spaces
set smartindent
set tabstop=2
set shiftwidth=2
set expandtab
au BufNewFile,BufRead *.py,*.go
\ set tabstop=4 |
\ set softtabstop=4 |
\ set shiftwidth=4 |
\ set textwidth=79 |
\ set expandtab |
\ set autoindent |
\ set fileformat=unix |
let python_highlight_all=1
syntax on
" color fix for tmux
set background=dark
set t_Co=256
" Key Bindings for split windows movement
nnoremap <C-h> <C-w>h
nnoremap <C-j> <C-w>j
nnoremap <C-k> <C-w>k
nnoremap <C-l> <C-w>l
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment