diff --git a/download_plug_nvim.sh b/download_plug_nvim.sh new file mode 100644 index 0000000..20db480 --- /dev/null +++ b/download_plug_nvim.sh @@ -0,0 +1 @@ +curl -fLo ~/.local/share/nvim/site/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim diff --git a/init.vim b/init.vim new file mode 100644 index 0000000..ce1601d --- /dev/null +++ b/init.vim @@ -0,0 +1,84 @@ +"************************** +"Defaults + +set exrc +set nohlsearch +set incsearch +set relativenumber +set number +set encoding=utf-8 +set colorcolumn=80 +highlight ColorColumn ctermbg=lightgrey guibg=lightgrey + +set noswapfile +set nobackup +set undodir=~/.vim/undodir +set undofile + +"Tabbing +set autoindent tabstop=4 shiftwidth=4 + +"************************** +"Commands + +command JsonFormat :%!python3 -m json.tool + +"************************** +"Key Remaps + +let mapleader = " " + +"Window management +nnoremap w +nnoremap ws :vsp +nnoremap wi :sp +nnoremap wt :tabnew + +"Vim stuff +nnoremap fs :w +nnoremap fer :source ~/.config/nvim/init.vim +nnoremap r :registers:normal! "p +nnoremap p :set paste! + +nnoremap c "+ +vnoremap c "+ + +"Plugins + +"Telescope +nnoremap ff Telescope find_files +nnoremap fg Telescope live_grep +nnoremap fb Telescope buffers +nnoremap fh Telescope help_tags + +"************************** +" Bracket completion + +inoremap { {}O +inoremap [ [] +inoremap { {} +inoremap {{ {{}} +inoremap ({ ({})O +inoremap ( () +inoremap {) {});O + +"************************** +" Plugins + +call plug#begin(expand('~/.vim/plugged')) +Plug 'editorconfig/editorconfig-vim' +Plug 'alvan/vim-closetag' +Plug 'tpope/vim-surround' +Plug 'tpope/vim-commentary' +Plug 'tpope/vim-fugitive' +Plug 'jonsmithers/vim-html-template-literals', { 'branch': 'dev' } +Plug 'godlygeek/tabular' +"Plug 'neoclide/coc.nvim', { 'branch': 'release' } +Plug 'plasticboy/vim-markdown' +Plug 'yuezk/vim-js' +Plug 'fatih/vim-go' +" Plug 'ctrlpvim/ctrlp.vim' +Plug 'nvim-treesitter/nvim-treesitter', {'do': ':TSUpdate'} +Plug 'nvim-lua/plenary.nvim' +Plug 'nvim-telescope/telescope.nvim' +call plug#end()