Skip to content

Instantly share code, notes, and snippets.

@arvind-iyer
Last active September 27, 2018 05:40
Show Gist options
  • Save arvind-iyer/4f7b36805c0446185779897172210110 to your computer and use it in GitHub Desktop.
Save arvind-iyer/4f7b36805c0446185779897172210110 to your computer and use it in GitHub Desktop.
set nocompatible
filetype off
syntax on
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
Plugin 'VundleVim/Vundle.vim'
Plugin 'tpope/vim-fugitive'
Plugin 'nvie/vim-flake8'
Plugin 'tpope/vim-surround'
Plugin 'scrooloose/nerdtree'
Plugin 'kien/ctrlp.vim'
Plugin 'vim-airline/vim-airline'
Plugin 'scrooloose/syntastic'
Plugin 'davidhalter/jedi-vim'
Plugin 'scrooloose/nerdcommenter'
Plugin 'easymotion/vim-easymotion'
Plugin 'mattn/emmet-vim'
Plugin 'airblade/vim-gitgutter'
call vundle#end()
filetype plugin indent on
set number
"" NERDTree
"Open nerdtree when no files specified
autocmd StdinReadPre * let s:std_in=1
autocmd VimEnter * if argc() == 0 && !exists("s:std_in") | NERDTree | endif
"Open nerdtree when opening directory
autocmd StdinReadPre * let s:std_in=1
autocmd VimEnter * if argc() == 1 && isdirectory(argv()[0]) && !exists("s:std_in") | exe 'NERDTree' argv()[0] | wincmd p | ene | endif
nnoremap <F5> :NERDTreeToggle<CR>
nnoremap <C-L> :tabnext<CR>
nnoremap <C-Right> :tabnext<CR>
nnoremap <C-H> :tabp<CR>
nnoremap <C-Left> :tabp<CR>
nnoremap <silent> <C-n> :tabedit <CR>
set splitbelow
set splitright
set mouse=a
" Tab Navigation
"" For Mac OS
nnoremap <silent> ˙ :wincmd h<CR>
nnoremap <silent> ∆ :wincmd j<CR>
nnoremap <silent> ˚ :wincmd k<CR>
nnoremap <silent> ¬ :wincmd l<CR>
"" For Linux
"nnoremap <silent> <A-Up> :wincmd k<CR>
"nnoremap <silent> <A-k> :wincmd k<CR>
"nnoremap <silent> <A-Down> :wincmd j<CR>
"nnoremap <silent> <A-j> :wincmd j<CR>
"nnoremap <A-Left> :wincmd h<CR>
"nnoremap <silent> <A-h> :wincmd h<CR>
"nnoremap <A-Right> :wincmd l<CR>
"nnoremap <silent> <A-l> :wincmd l<CR>
" Easymotion
" Fuzzy Search
function! s:config_easyfuzzymotion(...) abort
return extend(copy({
\ 'converters': [incsearch#config#fuzzyword#converter()],
\ 'modules': [incsearch#config#easymotion#module({'overwin': 1})],
\ 'keymap': {"\<CR>": '<Over>(easymotion)'},
\ 'is_expr': 0,
\ 'is_stay': 1
\ }), get(a:, 1, {}))
endfunction
noremap <silent><expr> <Space>/ incsearch#go(<SID>config_easyfuzzymotion())
#!/bin/bash
git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim
mv ~/.vimrc ~/.vimrc.backup
curl https://gist.githubusercontent.com/arvind-iyer/4f7b36805c0446185779897172210110/raw/30332e2552f19217bcb44ce7fafe2b2aef645f89/.vimrc -o ~/.vimrc
vim -c "PluginInstall"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment