Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- call plug#begin('~/.vim/plug-plugins/')
- Plug 'scrooloose/nerdtree'
- Plug 'tpope/vim-eunuch'
- Plug 'airblade/vim-gitgutter'
- Plug 'sollidsnake/vterm'
- Plug 'Valloric/YouCompleteMe'
- Plug 'pangloss/vim-javascript'
- Plug 'othree/javascript-libraries-syntax.vim'
- Plug 'leafgarland/typescript-vim'
- Plug 'Quramy/vim-js-pretty-template'
- Plug 'jason0x43/vim-js-indent'
- call plug#end()
- set updatetime=50 " good for live updates from plugins
- set mouse+=a
- " extended mouse mode for tmux mouse mode
- if &term =~ '^screen'
- set ttymouse=xterm2
- endif
- let g:gitgutter_enabled=0 " off by default, toggle with map below
- let g:gitgutter_max_signs=100000 " [some absurdly large number]
- map <C-a>a <Esc>:NERDTreeToggle<CR>
- map <C-a><tab> <Esc>:tabnext<CR>
- map <C-a><S-tab> <Esc>:tabprevious<CR>
- map <C-a>c <Esc>:tabnew<CR>
- map <C-a>q <Esc>:tabclose<CR>
- map <C-a>n <Esc>:set invnumber<CR><Esc>:GitGutterToggle<CR><Esc>:GitGutterLineHighlightsToggle<CR>
- map <C-w>v <Esc>:vsp<CR>
- map <C-w>c <Esc>:sp<CR>
- " rename tmux windows that open vim to 'vim' (used to be name of file... using vim tabs for that now)
- autocmd BufReadPost,FileReadPost,BufNewFile * call system('tmux rename-window vim')
- " run NERDTree if vim is opened on a 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
- " close vim if NERDTree is the only split open
- autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTree") && b:NERDTree.isTabTree()) | q | endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement