Skip to content

Instantly share code, notes, and snippets.

@akirataguchi115
Last active March 15, 2021 14:11
Show Gist options
  • Save akirataguchi115/87e86ea30f210b1d6401150b2f1bb148 to your computer and use it in GitHub Desktop.
Save akirataguchi115/87e86ea30f210b1d6401150b2f1bb148 to your computer and use it in GitHub Desktop.
init.vim
set nocompatible " be iMproved, required
filetype off " required
" Install vim-plug
if empty(glob('~/.local/share/nvim/site/autoload/plug.vim'))
silent !curl -fLo ~/.local/share/nvim/site/autoload/plug.vim --create-dirs
\ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
autocmd VimEnter * PlugInstall --sync | source $MYVIMRC
endif
" Install Vundle.vim
let iCanHazVundle=1
let vundle_readme=expand('~/.config/nvim/bundle/Vundle.vim/README.md')
if !filereadable(vundle_readme)
echo "Installing Vundle.."
echo ""
silent !mkdir -p ~/.config/nvim/bundle
silent !git clone https://github.com/VundleVim/Vundle.vim.git ~/.config/nvim/bundle/Vundle.vim
let iCanHazVundle=0
endif
set rtp+=~/.vim/bundle/Vundle.vim/
call vundle#rc()
" let Vundle manage Vundle, required
Plugin 'VundleVim/Vundle.vim'
if iCanHazVundle == 0
echo "Installing Bundles, please ignore key map error messages"
echo ""
:source '~/.config/nvim/init.vim'
:PluginInstall
endif
" END - Setting up Vundle - the vim plugin bundler
" set the runtime path to include Vundle and initialize
set rtp+=~/.config/nvim/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 'wakatime/vim-wakatime'
" All of your Plugins must be added before the following line
call vundle#end() " required
filetype plugin indent on " required
call plug#begin('~/.config/nvim')
Plug 'sheerun/vim-polyglot'
Plug 'scrooloose/NERDTree'
Plug 'jiangmiao/auto-pairs'
call plug#end()
" Configurations
let NERDTreeShowHidden=1
" Keymaps
map <C-n> :NERDTreeToggle<CR>
nmap <leader>gr <Plug>(coc-references)
nnoremap <C-p> :GFiles <CR>
nnoremap <C-Left> :tabprevious<CR>
nnoremap <C-Right> :tabnext<CR>
nnoremap <silent> <A-Left> :execute 'silent! tabmove ' . (tabpagenr()-2)<CR>
nnoremap <silent> <A-Right> :execute 'silent! tabmove ' . (tabpagenr()+1)<CR>
" Configurations
set expandtab
set shiftwidth=4
set tabstop=4
set number
filetype plugin indent on
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment