Last active
October 29, 2021 12:49
-
-
Save anujmiddha/7c3924a8ce6b10bab994afb861df9e00 to your computer and use it in GitHub Desktop.
vimrc
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
call plug#begin('~/.vim/plugged') | |
Plug 'vim-airline/vim-airline' | |
Plug 'vim-airline/vim-airline-themes' | |
Plug 'bling/vim-bufferline' | |
Plug 'scrooloose/nerdtree' | |
Plug 'elixir-editors/vim-elixir' | |
Plug 'slashmili/alchemist.vim' | |
Plug 'wincent/command-t' | |
Plug 'junegunn/fzf', { 'do': { -> fzf#install() } } | |
Plug 'junegunn/fzf.vim' | |
Plug 'pangloss/vim-javascript' | |
if has('nvim') | |
Plug 'Shougo/deoplete.nvim', { 'do': ':UpdateRemotePlugins' } | |
else | |
Plug 'Shougo/deoplete.nvim' | |
Plug 'roxma/nvim-yarp' | |
Plug 'roxma/vim-hug-neovim-rpc' | |
endif | |
Plug 'neoclide/coc.nvim', {'branch': 'release'} | |
Plug 'elixir-lsp/coc-elixir', {'do': 'yarn install && yarn prepack'} | |
" Git integration | |
Plug 'tpope/vim-fugitive' | |
Plug 'airblade/vim-gitgutter' | |
call plug#end() | |
let g:airline_powerline_fonts = 1 | |
let g:NERDTreeDirArrowExpandable = '▸' | |
let g:NERDTreeDirArrowCollapsible = '▾' | |
autocmd StdinReadPre * let s:std_in=1 | |
" Auto show NERDTree when starting vim | |
" autocmd VimEnter * if argc() == 0 && !exists("s:std_in") | NERDTree | endif | |
" FZF | |
set rtp+=/usr/local/opt/fzf | |
nnoremap <silent> <C-f> :GFiles<CR> | |
nnoremap <silent> <Leader>f :Rg<CR> | |
" Colors | |
colorscheme onedark | |
syntax on | |
set number | |
highlight Normal ctermbg=None | |
highlight LineNr ctermfg=DarkGrey | |
set backspace=indent,eol,start | |
" Enables filetype detection, loads ftplugin, and loads indent | |
filetype plugin indent on | |
" Deoplete | |
let g:deoplete#enable_at_startup = 1 | |
" <TAB>: completion. | |
inoremap <expr><TAB> pumvisible() ? "\<C-n>" : "\<TAB>" | |
" HTML tag completion | |
imap ,/ </<C-X><C-O> | |
" Auto save files | |
set autowriteall | |
set tabstop=2 | |
set shiftwidth=2 | |
set expandtab | |
nnoremap <silent> <tab> :if &modifiable && !&readonly && &modified <CR> :write<CR> :endif<CR>:bnext<CR> | |
nnoremap <silent> <s-tab> :if &modifiable && !&readonly && &modified <CR> :write<CR> :endif<CR>:bprevious<CR> | |
" Edit vimrc | |
:nnoremap <leader>ev :vsplit $MYVIMRC<cr> | |
:nnoremap <leader>sv :source $MYVIMRC<cr> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment