.vim

Vim config and utils
git clone https://git.torresjrjr.com/.vim.git
Log | Files | Refs | README

commit b64344be33094a7d9cb64f6de04d1667b053aff0
parent 46ecb6f99562343db029f86a81aaf39b23d102f9
Author: Byron Torres <b@torresjrjr.com>
Date:   Fri,  6 Nov 2020 17:38:47 +0000

Contents

Diffstat:
A.gitignore | 8++++++++
Abin/setup | 13+++++++++++++
Agvimrc | 4++++
Avimrc | 59+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
4 files changed, 84 insertions(+), 0 deletions(-)

diff --git a/.gitignore b/.gitignore @@ -0,0 +1,8 @@ +autoload/plug.vim* +after/* +plugged/* +spell/* +view/* +*.swp +*.swo +*.netrwhist diff --git a/bin/setup b/bin/setup @@ -0,0 +1,13 @@ +#!/bin/sh -eu +echo 'local.vim...' >&2 +grep -sq 'VimrcLocal' after/plugin/local.vim || { + mkdir -p after/plugin + printf 'VimrcLocal " %s\n\n\n' "$(whoami)@$(uname -n)" \ + >> after/plugin/local.vim +} + +echo 'vim-plug...' >&2 +curl -sSfL -o ~/.vim/autoload/plug.vim --create-dirs \ + https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim + +echo 'Done' >&2 diff --git a/gvimrc b/gvimrc @@ -0,0 +1,4 @@ +" ~/vimfiles/gvimrc +set guifont=Inconsolata:h11:cANSI:qDRAFT +set guioptions=edhkg +colorscheme murphy diff --git a/vimrc b/vimrc @@ -0,0 +1,59 @@ +" vimrc +" Author: Byron Torres (@torresjrjr) <b@torresjrjr.com> +" License: GPLv3 <https://www.gnu.org/licenses/gpl> + +filetype plugin indent on | syntax enable + +set hidden showcmd laststatus=2 showbreak=` +set path+=** wildmenu wildignorecase backspace=2 +set number scrolloff=5 splitbelow splitright +set hlsearch incsearch ignorecase smartcase +set autoindent smartindent shiftwidth=0 tabstop=4 +set nowrap textwidth=72 linebreak breakindent +set mouse+=a guioptions+=d highlight=Sn,su colorcolumn=73,81 +set viminfofile=$XDG_CACHE_HOME/vim/viminfo nojoinspaces +set list listchars=tab:\:\ ,lead:.,trail:#,nbsp:% +set ruler rulerformat=%17(%l,%c%V%)%=`%B + +colorscheme elflord +hi LineNr ctermfg=DarkMagenta +hi NonText ctermfg=DarkBlue +hi SpecialKey ctermfg=DarkBlue +hi ColorColumn ctermbg=Black + +let g:netrw_home='$XDG_CACHE_HOME/vim/' +let g:netrw_banner=0 +let g:netrw_liststyle=3 +let g:netrw_browse_split=3 + +command VV <mods> new $MYVIMRC +command VL <mods> new $MYVIMRCLOCAL +command VimrcLocal let $MYVIMRCLOCAL = expand('<sfile>:p:~') + +noremap! kj <esc> +noremap Q q: +noremap <C-L> :nohls<CR><C-L> +noremap <C-W>v :vnew<CR> +noremap <C-J> :bnext<CR> +noremap <C-K> :bprev<CR> +noremap <C-N> :cnext<CR> +noremap <C-P> :cprev<CR> + +let mapleader="\<space>" +noremap <leader><tab> :.term sh<CR> +noremap <leader>q :.!sh<CR> +noremap <leader>r :.r ! +noremap <leader>w :.w ! +noremap <leader>f :Files<CR> +noremap <leader>b :Buffers<CR> + +" Plugin Manager: junegunn/vim-plug +if !filereadable(expand('~/.vim/autoload/plug.vim')) | finish | endif +call plug#begin('~/.vim/plugged') +Plug 'https://github.com/junegunn/fzf.git', { 'do': { -> fzf#install() } } +Plug 'https://github.com/junegunn/fzf.vim.git' +Plug 'https://github.com/tpope/vim-surround.git' +call plug#end() +let g:plug_window='0tabnew' + +" @torresjrjr