set runtimepath^=$XDG_CONFIG_HOME/vim set runtimepath+=$XDG_DATA_HOME/vim set runtimepath+=$XDG_CONFIG_HOME/vim/after set packpath^=$XDG_DATA_HOME/vim,$XDG_CONFIG_HOME/vim set packpath+=$XDG_CONFIG_HOME/vim/after,$XDG_DATA_HOME/vim/after let g:netrw_home = $XDG_DATA_HOME."/vim" call mkdir($XDG_DATA_HOME."/vim/spell", 'p') set viewdir=$XDG_DATA_HOME/vim/view | call mkdir(&viewdir, 'p') set viminfofile=$XDG_CACHE_HOME/vim/viminfo set backupdir=$XDG_CACHE_HOME/vim/backup | call mkdir(&backupdir, 'p') set directory=$XDG_CACHE_HOME/vim/swap | call mkdir(&directory, 'p') set undodir=$XDG_CACHE_HOME/vim/undo | call mkdir(&undodir, 'p') set undofile let data_dir = '$XDG_DATA_HOME/vim' if empty(glob(data_dir . '/autoload/plug.vim')) silent execute '!curl -fLo '.data_dir.'/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim' endif autocmd VimEnter * if len(filter(values(g:plugs), '!isdirectory(v:val.dir)')) \| PlugInstall --sync | source $MYVIMRC \| endif call plug#begin(data_dir . '/plugged') Plug 'tpope/vim-surround' Plug 'tpope/vim-commentary' call plug#end() filetype indent plugin on syntax enable set mouse=a set nocompatible set hidden set wildmenu set wildignorecase set fileignorecase set showcmd set hlsearch set incsearch set ignorecase set smartcase set backspace=indent,eol,start set autoindent set ruler set confirm set visualbell set number relativenumber set notimeout ttimeout ttimeoutlen=200 set pastetoggle= set shiftwidth=4 set softtabstop=4 set expandtab set noswapfile set nowrap set splitright set splitbelow map Y y$ nnoremap :nohl nnoremap n nzzzv nnoremap N Nzzzv " inoremap kj tnoremap kj inoremap , ,u inoremap . .u inoremap [ [u inoremap ! !u inoremap ? ?u vnoremap J :m '>+1gv=gv vnoremap K :m '<-2gv=gv let mapleader=" " nnoremap h :wincmd h nnoremap j :wincmd j nnoremap k :wincmd k nnoremap l :wincmd l nnoremap :wincmd h nnoremap :wincmd j nnoremap :wincmd k nnoremap :wincmd l set runtimepath^=$XDG_CONFIG_HOME/vim set runtimepath+=$XDG_DATA_HOME/vim set runtimepath+=$XDG_CONFIG_HOME/vim/after set packpath^=$XDG_DATA_HOME/vim,$XDG_CONFIG_HOME/vim set packpath+=$XDG_CONFIG_HOME/vim/after,$XDG_DATA_HOME/vim/after let g:netrw_home = $XDG_DATA_HOME."/vim" call mkdir($XDG_DATA_HOME."/vim/spell", 'p') set viewdir=$XDG_DATA_HOME/vim/view | call mkdir(&viewdir, 'p') set viminfofile=$XDG_CACHE_HOME/vim/viminfo set backupdir=$XDG_CACHE_HOME/vim/backup | call mkdir(&backupdir, 'p') set directory=$XDG_CACHE_HOME/vim/swap | call mkdir(&directory, 'p') set undodir=$XDG_CACHE_HOME/vim/undo | call mkdir(&undodir, 'p') set undofile