Skip to content

Instantly share code, notes, and snippets.

@thenamankumar
Last active August 27, 2019 18:08
Show Gist options
  • Save thenamankumar/4ce4c2269a65abea1f930f0e95192395 to your computer and use it in GitHub Desktop.
Save thenamankumar/4ce4c2269a65abea1f930f0e95192395 to your computer and use it in GitHub Desktop.
set nocompatible
filetype off
filetype plugin on " plugins are enabled
set rtp+=~/.vim/bundle/Vundle.vim
" vundlevim plugins
call vundle#begin()
Plugin 'SirVer/ultisnips'
Plugin 'digitaltoad/vim-pug'
Plugin 'nathanaelkane/vim-indent-guides'
Plugin 'leafgarland/typescript-vim'
Plugin 'junegunn/goyo.vim'
Plugin 'Quramy/tsuquyomi'
Plugin 'ruanyl/vim-fixmyjs'
Plugin 'octol/vim-cpp-enhanced-highlight'
Plugin 'alvan/vim-closetag'
Plugin 'wesQ3/vim-windowswap'
Plugin 'osyo-manga/vim-over'
Plugin 'enricobacis/vim-airline-clock'
Plugin 'romgrk/winteract.vim'
Plugin 'jparise/vim-graphql'
Plugin 'wavded/vim-stylus'
Plugin 'prettier/vim-prettier'
Plugin 'honza/vim-snippets'
Plugin 'hereisnaman/vim-minimal-react-snippets'
Plugin 'airblade/vim-gitgutter'
Plugin 'jistr/vim-nerdtree-tabs'
Plugin 'thaerkh/vim-workspace'
Plugin 'pangloss/vim-javascript'
Plugin 'Alvarocz/vim-fresh'
Plugin 'yuttie/comfortable-motion.vim'
Plugin 'ap/vim-buftabline'
Plugin 'mustache/vim-mustache-handlebars'
Plugin 'maxmellon/vim-jsx-pretty'
Plugin 'vim-airline/vim-airline'
Plugin 'VundleVim/Vundle.vim'
Plugin 'scrooloose/nerdtree'
Plugin 'wakatime/vim-wakatime'
Plugin 'jeetsukumaran/vim-buffergator'
Plugin 'elzr/vim-json'
Plugin 'Raimondi/delimitMate'
Plugin 'Xuyuanp/nerdtree-git-plugin'
Plugin 'KeitaNakamura/neodark.vim'
Plugin 'tpope/vim-eunuch'
Plugin 'wellle/visual-split.vim'
Plugin 'tpope/vim-surround'
Plugin 'flazz/vim-colorschemes'
call vundle#end()
autocmd BufRead,BufNewFile *.vue setlocal filetype=vue.html.javascript.css
au BufReadPost *.hbs set syntax=mustache
au BufReadPost *.tsx set syntax=typescript
let g:goyo_width=120
" NERDTree
let NERDTreeShowHidden=1
let NERDTreeIgnore=['\.swp$', '.git$', 'DS_Store', '\.idea$']
let NERDTreeMinimalUI=1
let NERDTreeDirArrows=1
let g:nerdtree_tabs_focus_on_files=1
let g:nerdtree_tabs_synchronize_view=1
" gitgutter
set signcolumn=yes
set updatetime=100
" workspace config
let g:workspace_autosave_always = 1
" visual config
syntax on
set wildmenu
"set termguicolors
set pyxversion=3
let g:deoplete#enable_at_startup = 1
let g:airline_theme='neodark'
let g:neodark#terminal_transparent=1
let g:neodark#background='#101421'
let g:neodark#use_256color = 0
let g:neodark#solid_vertsplit=1
let g:vim_json_syntax_conceal=0
let g:jsx_ext_required=1
let g:vim_jsx_pretty_colorful_config=1
let g:closetag_filenames = '*.html,*.js,*.jsx,*.vue'
let g:buftabline_show=1
let g:one_allow_italics=1
let g:UltiSnipsExpandTrigger="<tab>"
let g:UltiSnipsJumpForwardTrigger="<c-b>"
let g:UltiSnipsJumpBackwardTrigger="<c-z>"
filetype plugin indent on
colorscheme neodark
" prettier
let g:prettier#autoformat = 0
autocmd BufWritePre *.js,*.jsx,*.json,*.vue,*.css,*.scss,*.less,*.graphql PrettierAsync
" comfort motion
let g:comfortable_motion_friction=80.0
let g:comfortable_motion_air_drag=5.0
" mapping
let g:UltiSnipsExpandTrigger="<tab>"
let g:windowswap_map_keys=0
nnoremap <C-l> :bnext<CR>
nnoremap <C-h> :bprev<CR>
nnoremap <C-j> :m .+1<CR>==
nnoremap <C-k> :m .-2<CR>==
vnoremap <C-j> :m '>+1<CR>gv=gv
vnoremap <C-k> :m '<-2<CR>gv=gv
inoremap <C-j> <Esc>:m .+1<CR>==gi
inoremap <C-k> <Esc>:m .-2<CR>==gi
noremap <silent> <C-s> :call WindowSwap#EasyWindowSwap()<CR>
map <C-n> :NERDTreeFocusToggle<CR>
nnoremap <C-p> :PrettierAsync<CR>
nnoremap <leader>s :ToggleWorkspace<CR>
noremap <leader>f :Fixmyjs<CR>
" vim defaults
set number
set autoread
set showbreak=+++
set encoding=UTF-8
set textwidth=120
set smartindent
set expandtab
set showmatch
set visualbell
set hlsearch
set smartcase
set ignorecase
set incsearch
set autoindent
set shiftwidth=2
set smarttab
set softtabstop=2
set undolevels=1000
set backspace=indent,eol,start
@thenamankumar
Copy link
Author

Delete line 51 to 55 if don't need workspaces, Keep line 54 if need autosave.
Delete line 80 to disable prettier autoformat on insert mode exit.

Vundle Install via git clone and then :PluginInstall in vim

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